From 14501e85e5c0d924c7ad0e369317297fc11a53a0 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Sun, 2 Apr 2023 15:42:34 +0200 Subject: [PATCH] update dry-run docs --- README.md | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bb6e0fa2..97604383 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,37 @@ Make sure you have setup Rust environment (>= 1.64). - Use option `--output-path=` to print out JSON file - Use option `--html` to generate storage diff preview (add `--open` to automatically open file) +## Dry-run + +- Dry run hep: + ``` + yarn start dry-run --help + ``` + - Dry run extrinsic, same as `run-block`, example: - - `yarn start dry-run --config=configs/mandala.yml --html --open --extrinsic=0x39028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01183abac17ff331f8b65dbeddd27f014dedd892020cfdc6c40b574f6930f8cf391bde95997ae2edc5b1192a4036ea97804956c4b5497175c8d68b630301685889450200000a00008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480284d717` - - Dry run call `yarn start dry-run --config=configs/mandala.yml --html --open --extrinsic=0xff00000080969800 --address=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY --at=0x5f660b32489966cc707ecde831864aeecf9092c4983e75f9880313e9158d62b9` +``` +yarn start dry-run --config=configs/mandala.yml --html --open --extrinsic=0x39028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01183abac17ff331f8b65dbeddd27f014dedd892020cfdc6c40b574f6930f8cf391bde95997ae2edc5b1192a4036ea97804956c4b5497175c8d68b630301685889450200000a00008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480284d717 +``` + +- Dry run call, make sure `mock-signature-host: true` to fake caller's signature: +``` +yarn start dry-run --config=configs/mandala.yml --html --open --extrinsic=0xff00000080969800 --address=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY --at= +``` + +- Dry run a preimage: + ``` +yarn start dry-run --endpoint=wss://rpc.polkadot.io --preimage= --open + ``` + +- Dry run a preimage and execute an extrinsic after that: +``` +yarn start dry-run --endpoint=wss://rpc.polkadot.io --preimage= --extrinsic= --open +``` + +- Dry run a preimage and execute a call after that, make sure `mock-signature-host: true` to fake caller's signature: + ``` +yarn start dry-run --config=configs/mandala.yml --preimage= --extrinsic= --address= --open + ``` - Run a test node - `yarn start dev --endpoint=wss://acala-rpc-2.aca-api.network/ws` @@ -40,6 +68,7 @@ Make sure you have setup Rust environment (>= 1.64). - You can use [Polkadot.js Apps](https://polkadot.js.org/apps/) to connect to this node - Submit any transaction to produce a new block in the in parallel reality - (Optional) Pre-define/override storage using option `--import-storage=storage.[json/yaml]`. See example storage below. + ```json5 { "Sudo": { @@ -60,18 +89,20 @@ Make sure you have setup Rust environment (>= 1.64). } } ``` + - Run Kusama fork - Edit configs/kusama.yml if needed. (e.g. update the block number) - `yarn start dev --config=configs/kusama.yml` - Setup XCM multichain **_NOTE:_** You can also connect multiple parachains without a relaychain + ```bash yarn start xcm --relaychain=configs/kusama.yml --parachain=configs/karura.yml --parachain=configs/statemine.yml ``` ## Documentation -External documentation on Chopsticks can be found at the following links: +External documentation on Chopsticks can be found at the following links: - [Moonbeam documentation site](https://docs.moonbeam.network/builders/build/substrate-api/chopsticks/)