-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Create xcm-tools (#1605 #1605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Create xcm-tools (#1605 #1605
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
16ec732
Create xcm-tools
gmajor-encrypt 1008ac9
modify Milestone 1
gmajor-encrypt ad77a80
modify Milestone 1
gmajor-encrypt 0a3c339
fix wording
gmajor-encrypt 0f996aa
improve xcm-tools.md
gmajor-encrypt c2f445f
improve application
gmajor-encrypt 4676b89
increase some costs
gmajor-encrypt 85b580e
decrease some costs
gmajor-encrypt 55b2b45
improve wording
gmajor-encrypt 8bf2bfd
decrease some costs
gmajor-encrypt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| # XCM Tools | ||
|
|
||
| * **Team Name:** [gmajor](https://github.com/gmajor-encrypt) | ||
| * **Payment Address:** 0xC3094f0ddce699a1Ad9Ef2621DF68Cd297a4c44F(USDC) | ||
| * **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 2 | ||
|
|
||
| ## Project Overview :page_facing_up: | ||
|
|
||
| RFPs [https://github.com/w3f/Grants-Program/blob/master/docs/RFPs/Open/xcm-tool.md](https://github.com/w3f/Grants-Program/blob/master/docs/RFPs/Open/xcm-tool.md) | ||
|
|
||
| ### Overview | ||
|
|
||
| XCM (Cross-Consensus Message) is a cross-chain message between parachain and relaychain because the xcm format ( | ||
| Instruction, MultiAssets, and MultiLocation) are too complex, and no good tool exists. It has yet to be widely used. | ||
|
|
||
| XCM Tools is a tool and an SDK. This library is written in golang. It provides the following functions: sending xcm | ||
| messages, parsing xcm message instructions and getting the execution result of the execution after sending xcm. | ||
|
|
||
| ### Project Details | ||
|
|
||
| We only have two libs to choose from, and some functions still need to be included. | ||
|
|
||
| [Go-Substrate-RPC-Client](https://github.com/centrifuge/go-substrate-rpc-client) | ||
| Centrifuge's open source and supports transaction and chain status queries. Scale Codec is | ||
| a [static](https://pkg.go.dev/github.com/centrifuge/go-substrate-rpc-client#hdr-Types) and strongly typed library. | ||
| All types of analysis require user definition. | ||
gmajor-encrypt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [Substrate-API-rpc](https://github.com/itering/substrate-api-rpc), [scale.go](https://github.com/itering/scale.go) | ||
| Subscan open source, support chain status query, Scale Codec supports dynamic types, good serialization, and back-order | ||
| functions, history version types support. But lack the function of transaction sending. | ||
gmajor-encrypt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| After comparison, I chose [Substrate-API-rpc](https://github.com/itering/substrate-api-RPC) as dependence, but because | ||
| of the lack of the function of sending transactions, I also need to change dependence. | ||
gmajor-encrypt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Improve [substrate-api-rpc](https://github.com/itering/substrate-api-rpc), add extrinsic encode, sign transaction | ||
| (sr25519, ed25519), and send transaction feature. | ||
| Create pull request merge into [substrate-api-rpc](https://github.com/itering/substrate-api-rpc) | ||
| and [scale.go](https://github.com/itering/scale.go) | ||
|
|
||
| 2. Send xcm messages between relay chain and parachain and between parachain and parachain, support VMP(UMP & DMP), | ||
| HRMP,XCMP(XCM V3) and supports the following methods | ||
|
|
||
| * LimitedReserveTransferAssets | ||
| * LimitedTeleportAssets | ||
| * TeleportAssets | ||
| * ReserveWithdrawAssets | ||
| * LimitedReserveWithdrawAssets | ||
| * Execute | ||
| * Sent | ||
gmajor-encrypt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 3. Get the execution result and the block_hash (block_num) of the execution after sending xcm | ||
|
|
||
| 4. Parse xcm transaction instructions, deserialized encode the raw message into readable json | ||
|
|
||
| ### Ecosystem Fit | ||
|
|
||
| - Where and how does your project fit into the ecosystem? | ||
| XCM developers or users who want to use XCM Feature. A solution is provided here. You can send and track your XCM | ||
| transaction | ||
|
|
||
| - Who is your target audience (parachain/dapp/wallet/UI developers, designers, your own user base, some dapp's userbase, | ||
| yourself)? | ||
| wallet & explorer & parachain developer | ||
|
|
||
| - What need(s) does your project meet? | ||
| Provide a solution for parachain and parachain, transactions between parachain and relaychain, xcm message parse, and | ||
| xcm trans tracking. It can be easily integrated into the application of Golang or directly used as Tools. | ||
|
|
||
| - Are there any other projects similar to yours in the Substrate / Polkadot / Kusama ecosystem? | ||
|
|
||
| [xcm-sdk](https://github.com/blockcoders/xcm-sdk), written in Javascript/Typescript, has to send the xcm feature. | ||
|
|
||
| [xcm-tools](https://github.com/PureStake/xcm-tools) written in Typescript, a set of scripts to help XCM | ||
| initialization, asset registration, and channel setup, | ||
|
|
||
| ## Team :busts_in_silhouette: | ||
|
|
||
| ### Team members | ||
|
|
||
| * gmajor | ||
|
|
||
| ### Contact | ||
|
|
||
| * **Contact Name:** gmajor | ||
| * **Contact Email:** gmajorencrypt@gmail.com | ||
| * **Website:** <https://github.com/gmajor-encrypt> | ||
|
|
||
| ### Legal Structure | ||
|
|
||
| individual | ||
|
|
||
| ### Team's experience | ||
|
|
||
| I have many years of PHP development experience and nearly five years of blockchain development experience, familiar | ||
| with PHP, GOLANG, PYTHON, Nodejs, Rust | ||
|
|
||
| ### Team Code Repos | ||
|
|
||
| - https://github.com/gmajor-encrypt/php-scale-codec | ||
| - https://github.com/gmajor-encrypt/php-substrate-api | ||
| - https://github.com/gmajor-encrypt/scale-codec-comparator | ||
| - https://github.com/gmajor-encrypt/sr25519-bindings | ||
|
|
||
| ## Development Status :open_book: | ||
|
|
||
| Not yet | ||
|
|
||
| ## Development Roadmap :nut_and_bolt: | ||
|
|
||
| ### Overview | ||
|
|
||
| * **Total Estimated Duration:** 4.5 months | ||
| * **Total Costs:** 30000 USDC | ||
|
|
||
| ### Milestone 1 | ||
|
|
||
| Improve [substrate-api-rpc](https://github.com/itering/substrate-api-rpc) and [scale.go](https://github.com/itering/scale.go), support signed & send transaction | ||
|
|
||
| * **Estimated duration:** 3 week | ||
| * **FTE:** 1 | ||
| * **Costs:** 6000 USDC | ||
|
|
||
| | Number | Deliverable | Specification | | ||
| |-------:|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | 0a. | License | MIT or Apache 2.0 | | ||
| | 0b. | Documentation | Simple documentation on how to use and how to test | | ||
| | 0c. | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. | | ||
| | 0d. | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. | | ||
| | 1. | Sign message | Add sr25519 & ed25519 sign message | | ||
| | 2. | extrinsic encode | [extrinsic.go](https://github.com/itering/scale.go/blob/master/extrinsic.go#L19) Add encode feature | | ||
| | 3. | Send extrinsic | Send transaction support, include ed25519&sr25519 | | ||
| | 4. | Pull request | Create pull request merge into [substrate-api-rpc](https://github.com/itering/substrate-api-rpc) and [scale.go](https://github.com/itering/scale.go) | | ||
|
|
||
| ### Milestone 2 | ||
|
|
||
| * **Estimated duration:** 2.5 month | ||
| * **FTE:** 1 | ||
| * **Costs:** 14000 USDC | ||
|
|
||
| | Number | Deliverable | Specification | | ||
| |-------:|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | 0a. | License | MIT or Apache 2.0 | | ||
| | 0b. | Documentation | Simple documentation on how to use and how to test | | ||
| | 0c. | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. | | ||
| | 0d. | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. | | ||
| | 1. | Send UMP message | support [UMP](https://wiki.polkadot.network/docs/learn-xcm-transport#vmp-vertical-message-passing) message send | | ||
| | 2. | Send DMP message | support [DMP](https://wiki.polkadot.network/docs/learn-xcm-transport#vmp-vertical-message-passing) message send | | ||
| | 3. | Send HRMP message | support [HRMP](https://wiki.polkadot.network/docs/learn-xcm-transport#hrmp-xcmp-lite) message send | | ||
| | 4. | Send XCMP message(XCM V3) | support [XCMP](https://wiki.polkadot.network/docs/learn-xcm-transport#xcmp-cross-chain-message-passing) message send | | ||
|
|
||
| ### Milestone 3 | ||
|
|
||
| * **Estimated duration:** 6 week | ||
| * **FTE:** 1 | ||
| * **Costs:** 10000 USDC | ||
|
|
||
| | Number | Deliverable | Specification | | ||
| |-------:|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | 0a. | License | MIT or Apache 2.0 | | ||
| | 0b. | Documentation | Simple documentation on how to use and how to test | | ||
| | 0c. | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. | | ||
| | 0d. | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. | | ||
| | 1. | Parse xcm instructions | Parse instructions raw data, support xcm format v1 & v2 & v3 | | ||
| | 2. | Tracing transaction | Support xcm format v1 & v2 & v3 | | ||
| | 3. | Cli support | Add command line tool to send message & parse xcm instructions && tracking transaction | | | ||
|
|
||
| ## Future Plans | ||
|
|
||
| I have been maintaining [php-scale-code](https://github.com/gmajor-encrypt/php-scale-codec) | ||
| and [php-api-lib](https://github.com/gmajor-encrypt/php-substrate-api) for three years, and this application will also | ||
| be maintained continuously | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.