The goal of Polket is to create more commercial application scenarios for NFTs and connect to the Polkadot/Kusama network in a parachain manner. Based on the Polket chain, we will develop a smart fitness-type Web3 application. We will name it ToEarnFun.
Follow the steps below to get started with the Node Template, or get it up and running right from your browser in just a few clicks using Playground 🛠️
Install nix and optionally direnv and
lorri for a fully plug and play experience for setting up the
development environment. To get all the correct dependencies activate direnv direnv allow and
lorri lorri shell.
First, complete the basic Rust setup instructions.
make buildIf this error message appears when compiling the source code:
Rust WASM toolchain not installed, please install it!
# Plesae install toolchain nightly
rustup target install wasm32-unknown-unknown --toolchain nightly-2022-08-30
rustup target add wasm32-unknown-unknown --toolchain nightly-2022-08-30
This command will start the single-node development chain with persistent state:
make runPurge the development chain's state:
make purge-chainStart the development chain with detailed logging:
RUST_BACKTRACE=1 ./target/release/polket-node -ldebug --devmake testOnce the node template is running locally, you can connect it with Polkadot-JS Apps front-end to interact with your chain. Click here connecting the Apps to your local node template.
If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.
First, install Docker and Docker Compose.
Then run the following command to start a single node development chain.
./scripts/docker_run.shThis command will firstly compile your code, and then start a local development network. You can
also replace the default command
(cargo build --release && ./target/release/polket-node --dev --ws-external)
by appending your own. A few useful ones are as follow.
# Run Substrate node without re-compiling
./scripts/docker_run.sh ./target/release/polket-node --dev --ws-external
# Purge the local dev chain
./scripts/docker_run.sh ./target/release/polket-node purge-chain --dev
# Check whether the code is compilable
./scripts/docker_run.sh cargo check# pull latest docker image
docker pull polketio/polket-node:latest
mkdir -p ~/chain-data
chown 1000.1000 ~/chain-data -R
docker run -d \
-v ~/chain-data:/chain-data \
-p 9944:9944 \
-p 9933:9933 \
-p 30333:30333 \
polketio/polket-node:latest \
--base-path "/chain-data" \
--chain "/specs/testnet.json" \
--pruning archive \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--ws-external \
--rpc-cors all \
--rpc-external \
--name your-fullnode-name