git.delta.rocks / unique-network / refs/commits / e67fafd19a27

difftreelog

source

README.md2.3 KiBsourcehistory
1![Docker build](https://github.com/usetech-llc/nft_parachain/workflows/Docker%20build/badge.svg)23# NFT Parachain45## Application Development67If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).89## Building1011Install Rust:1213```bash14curl https://sh.rustup.rs -sSf | sh15rustup default nightly16sudo apt-get install libssl-dev pkg-config libclang-dev clang1718```1920Install required tools:2122```bash23./scripts/init.sh24```2526Build the WebAssembly binary:2728```bash29./scripts/build.sh30```3132Build all native code:3334```bash35cargo build --release36```3738## Run3940You can start a development chain with:4142```bash43cargo run -- --dev44```4546Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.4748If 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.4950We'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:5152```bash53cargo run -- \54  --base-path /tmp/alice \55  --chain=local \56  --alice \57  --node-key 0000000000000000000000000000000000000000000000000000000000000001 \58  --telemetry-url ws://telemetry.polkadot.io:1024 \59  --validator60```6162In 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:6364```bash65cargo run -- \66  --base-path /tmp/bob \67  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \68  --chain=local \69  --bob \70  --port 30334 \71  --telemetry-url ws://telemetry.polkadot.io:1024 \72  --validator73```7475Additional CLI usage options are available and may be shown by running `cargo run -- --help`.