-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a466d4d
commit b937398
Showing
6 changed files
with
22,029 additions
and
17,396 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# # Generates the 3 metadata files in `/artifacts` and the polkadot.rs file for integration tests | ||
# | ||
# This script is to be run from the root of the repository: `scripts/artifacts.sh` | ||
# | ||
# It expects a local polkadot node to be running a JSON-RPC HTTP server at 127.0.0.1:9933 | ||
# A local polkadot node can be run via: | ||
# ``` | ||
# git clone https://github.com/paritytech/polkadot.git | ||
# cd polkadot | ||
# cargo build --release | ||
# ./target/release/polkadot --dev --tmp | ||
# ``` | ||
|
||
# get the full metadata | ||
cargo run --bin subxt metadata > artifacts/polkadot_metadata_full.scale | ||
# use it to generate polkadot.rs | ||
cargo run --bin subxt codegen --file artifacts/polkadot_metadata_full.scale | rustfmt > testing/integration-tests/src/codegen/polkadot.rs | ||
# generate a metadata file that only contains the pallets Balances, Staking, System and Multisig | ||
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "Balances,Staking,System,Multisig" > artifacts/polkadot_metadata_small.scale | ||
# generate a metadata file that only contains no pallets | ||
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "" > artifacts/polkadot_metadata_tiny.scale |
Oops, something went wrong.