Create parallel reality of your Substrate network.
Fork Acala mainnet: yarn dlx @acala-network/chopsticks dev --endpoint=wss://acala-rpc-2.aca-api.network/ws
It is recommended to use config file. You can check configs for examples.
You can run a test node with config with yarn dlx @acala-network/chopsticks dev --config=<config_file_path>
Make sure you have setup Rust environment (>= 1.64).
- Clone repository with submodules (smoldot)
git clone --recurse-submodules https://github.com/AcalaNetwork/chopsticks.git && cd chopsticks
- Install deps
yarn
- Build wasm
yarn build-wasm
- Replay latest block
yarn start run-block --endpoint=wss://acala-rpc-2.aca-api.network/ws
- This will replay the last block and print out the changed storages
- Use option
--output-path=<file_path>
to print out JSON file
- Run a test node
yarn start dev --endpoint=wss://acala-rpc-2.aca-api.network/ws
- You have a test node running at
ws://localhost:8000
- You can use Polkadot.js 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.
// prettier-ignore { "Sudo": { "Key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" }, "TechnicalCommittee": { "Members": ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"] }, "Tokens": { "Accounts": [ [ ["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", { "token": "KAR" }], { "free": 1000000000000000, } ] ] } }
- Run Kusama fork
- Edit configs/kusama.yml if needed. (e.g. update the block number)
yarn start dev --config=configs/kusama.yml