git.delta.rocks / unique-network / refs/commits / 6eb7e2baa973

difftreelog

source

README.md2.2 KiBsourcehistory
1# NFT Parachain23## Application Development45If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).67## Building89Install Rust:1011```bash12curl https://sh.rustup.rs -sSf | sh13rustup default nightly14sudo apt-get install libssl-dev pkg-config libclang-dev clang1516```1718Install required tools:1920```bash21./scripts/init.sh22```2324Build the WebAssembly binary:2526```bash27./scripts/build.sh28```2930Build all native code:3132```bash33cargo build --release34```3536## Run3738You can start a development chain with:3940```bash41cargo run -- --dev42```4344Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.4546If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with testnet units. Give each node a name and expose them so they are listed on the Polkadot [telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.4748We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from the `--node-key` value that we specify below:4950```bash51cargo run -- \52  --base-path /tmp/alice \53  --chain=local \54  --alice \55  --node-key 0000000000000000000000000000000000000000000000000000000000000001 \56  --telemetry-url ws://telemetry.polkadot.io:1024 \57  --validator58```5960In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's bootnode ID on TCP port 30333:6162```bash63cargo run -- \64  --base-path /tmp/bob \65  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \66  --chain=local \67  --bob \68  --port 30334 \69  --telemetry-url ws://telemetry.polkadot.io:1024 \70  --validator71```7273Additional CLI usage options are available and may be shown by running `cargo run -- --help`.