-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update readme for generating types
- Loading branch information
Showing
1 changed file
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
1. Create a new branch from **main** and name it **rpc/***, where the asterisk represents any desired identifier. | ||
2. Initially, in the **packages/type-definitions** directory, include **rpc** and **types** (specifically for Polkadot apps). | ||
3. Incorporate new RPCs and types under **mTypes** and **mRpc**. | ||
4. After that you need to add those **rpc** and **types** into **packages/types** | ||
5. Within the **interfaces/definitions.ts** file, append new types if any changes occur | ||
6. For new RPCs like **xyk** or **pos**, insert their RPC into either **interfaces/xyk/definitions.ts** or **interfaces/pos/definitions.ts**. | ||
7. If there is new rpc you need to create a new folder inside **interfaces** directory like for example **rolldown** directory and inside this directory you need to create **definitions.ts** file | ||
8. Inside the **interfaces/rolldown/definitions.ts** file, ensure to export these RPCs as defaults (refer to the **xyk** or **pos** directory for guidance) | ||
9. These steps encompass the process of adding new RPCs and Types. | ||
10. Subsequently, proceed to push to the branch. | ||
11. Once the changes are committed to the branch, manually initiate the release of all packages containing new RPCs and types. | ||
12. ![Trigger](trigger.png) | ||
13. **User workflow from** change from **main** to your branch in this case **rpc/types/generation**. Customize the elements depicted in the image as per your requirements. | ||
In the Mangata Node repository, the **pr-automation-types.yml** process is triggered, which helps release type definitions, types, and sdk. If you want to add your own custom RPC and types, please follow these instructions: | ||
|
||
1. In the **packages/type-definitions** directory, include **rpc** and **types**. | ||
2. Incorporate new RPCs and types under **mTypes** and **mRpc**. | ||
3. After that you need to add those **rpc** and **types** into **packages/types** | ||
4. Within the **interfaces/definitions.ts** file, append new types if any changes occur | ||
5. For new RPCs like **xyk** or **pos**, insert their RPC into either **interfaces/xyk/definitions.ts** or **interfaces/pos/definitions.ts**. | ||
6. If there is new rpc you need to create a new folder inside **interfaces** directory like for example **rolldown** directory and inside this directory you need to create **definitions.ts** file | ||
7. Inside the **interfaces/rolldown/definitions.ts** file, ensure to export these RPCs as defaults (refer to the **xyk** or **pos** directory for guidance) | ||
8. These steps encompass the process of adding new RPCs and Types. | ||
9. Subsequently, proceed to push to the branch. | ||
10. Once the changes are committed to the branch, trigger the CI on the mangata node and it will trigger again this workflow in mangata-dev-kit. |