mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 09:08:06 +00:00
b316301d61
* begin porting over traits; remove Config use of Hash * port over the Header bits that we need * sp_core_hashing where possible, move Verify to PairSigner, remove unused errors * tidy up Config things and move related bits into one place * fix codegen * copy Era over * move AccountId, Address, Signer to Signer trait and a pass over fixing examples * impl MultiAddress, MultiSignature, AccountId32 and add back to Config (for decoding later) * Copy over StorageKey, StorageData, StorageChangeSet * subxt core compiling with no sp_core or sp_runtime * Get examples compiling * pass over fixing tests * cargo fmt * clippy tweaks and update polkadot.rs * fix codegen docs * port over special DigestItem encoding/decoding * clippy and doc fixes * cargo fmt and example fix * more cargo fmt-ing... * substrate-extra to substrate-compat * cargo.toml comments * simplify PairSigner trait bounds * move RPC types to a separate file * fix docs * Add some tests for things and other PR feedback * bump to latest sp deps * avoid needing substrate-compat feature in a test
test-runtime
The logic for this crate exists mainly in the build.rs file.
At compile time, this crate will:
- Spin up a local
substratebinary (set theSUBSTRATE_NODE_PATHenv var to point to a custom binary, otherwise it'll look forsubstrateon your PATH). - Obtain metadata from this node.
- Export the metadata and a
node_runtimemodule which has been annotated using thesubxtproc macro and is based off the above metadata.
The reason for doing this is that our integration tests (which also spin up a Substrate node) can then use the generated subxt types from the exact node being tested against, so that we don't have to worry about metadata getting out of sync with the binary under test.