shaunxw / xcm-simulator

Test kit to simulate cross-chain message passing and XCM execution
Apache License 2.0
43 stars 45 forks source link

XCM Simulator

Test kit to simulate cross-chain message passing and XCM execution.

Different level of simulation are provided: xcm-simulator and xcm-emulator.

xcm-simulator

UPDATE: xcm-simulator has been merged into Polkadot repo, and not actively maintained here anymore.

xcm-simulator uses mock relay chain and parachain runtime. It allows minimum runtime modules for XCM testing and playground, and thus has less compiling overhead depending on the specific config. Typical use case is unit tests of XCM related pallets.

xcm-emulator

xcm-emulator uses production relay chain and parachain runtime. Users could plug in Kusama, Statemine, and Karura runtime etc. With up-to-date chain specs, it's able to verify if specific XCM messages work in live networks.

Limitations

xcm-emulator emulates the delivery and execution of XCM messages, with the assumption that the message can always be delivered to and executed in destination. There are some reasons which could prevent messages being delivered or executed, such as:

Use cases

Typical use cases: