Building pallets and testchain
Last updated
Was this helpful?
Last updated
Was this helpful?
Make sure you have completed the basic Rust setup, see for more information
A pallet cannot run by itself in an isolated way. It needs to be part of a runtime to expose its functionality. In this chapter, you're going to build the first fundamental part of our testing scenario, which is a local testnet that already contains the Spacewalk pallet.
If you navigate to , you'll see that the repository is structured as follows this:
clients -> contains the runtime and vault's logic needed to perform the vault operations
pallets -> contains the actual Spacewalk pallet
testchain -> a simple standalone chain that includes and makes use of the pallet
We can start testing by running the following commands:
The last command will compile the testchain and the pallet as well, and then it will run the testnet on localhost:9944
.
It may take a while to build it the first time so if you already did this step before and you only want to run the testnet, just do:
Note: If you only want to build or test the pallet itself, you could of course navigate to pallets/spacewalk
and run cargo build
, or cargo test.