Skip to content

Latest commit

 

History

History
71 lines (42 loc) · 2.16 KB

README.md

File metadata and controls

71 lines (42 loc) · 2.16 KB

Spawn a local network using Zombienet and try out our XCM domain service.

Prerequisites

You have configured your environment for Substrate development by installing Rust and the Rust toolchain.

Setup instructions

  1. Make the bash script - zombienet.sh executable.
chmod +x zombienet.sh
  1. Install the polkadot, contracts-parachain, zombienet binaries.
./zombienet.sh init

NOTE: This can take a while (around 20+ minutes depending upon the system)...

  1. Spawn the network
./zombienet.sh spawn

This command spawns the following chains:

  • Relay chain (ws_port: 9900)
  • Contracts parachain#1 (ws_port: 9910) {Hub}
  • Contracts parachain#2 (ws_port: 9920) {Spoke}
  1. Deploy the contracts

Open a new shell with the same working directory and run:

cargo run

This will deploy the following contracts:

  • Domain-service on parachain#1 (address: 5Dg8MLVcwDHAv5FjWBeeLute7M9yHXoic6oBYk97fpK2BXKx)

  • Xcm-handler on parachain#1 (address: 5DhGtfSDhZHzQKTjzy2NFEwEXBtHzMEx68WdwJmHWSM6MTZJ)

  • Xc-domain-service on parachain#2 (address: 5CAogDHwRT8pUkRBzBsPczKSMPULuh6Zg6zK3kQQzYtQUwYf)

NOTE: It can take some time (around 2-4 minutes) to complete the deployment.

  1. Interacting with the contracts.

Open two contracts-ui page on your preferred browser, one for each chain. Use the following links:

Click on Add New Contract and choose the Use On-chain Contract Address method. Add the contracts on the respective Contracts-UI page. It will ask for the metadata which you can find in the artefacts folder.

INFO: You can skip this step for Xcm-handler contract.

Faucet - Fund your account

You will need funds in your account for domain purchases/gas payment if not using pre-funded accounts like ALICE. Run the following command that will transfer 100 units of token to the specified addresses:

cargo run -- fund <space-separated addresses>