Skip to content
/ PINT Public

A Polkadot ecosystem index for investors. A self sustaining auction treasury for parachains.

License

Notifications You must be signed in to change notification settings

ChainSafe/PINT

Repository files navigation

Polkadot Index Network Token (PINT 🍺)

License: LGPL v3 rustdocs

A Polkadot ecosystem index for investors. A self sustaining auction treasury for parachains.

Organized by the Stateless Money validator, governed by a community that includes Polychain Capital, Hypersphere Ventures, HashKey Capital, Acala, and built by ChainSafe as a StakerDAO product.

For more information on the project please visit Polkadot Index Network Token documentation.

Current development should be considered a work in progress.

Upstream

This project is a fork of the Substrate Developer Hub Node Template.

Build & Run

Follow these steps to prepare a local Substrate development environment 🛠️

Setup

This project currently builds against Rust nightly-2021-08-01. Assuming you have rustup already insatlled set up your local environment:

rustup install nightly-2021-08-01
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-08-01
rustup override set nightly-2021-08-01

Build

Once the development environment is set up, build the node template. This command will build the Wasm and native code:

cargo build --release

Note: If the build fails with (signal: 9, SIGKILL: kill) it has probably run out of memory. Try freeing some memory or build on another machine.

Run

Development Chain

You can start a standalone development chain with instant sealing:

cargo run -- --tmp --dev --instant-sealing

Use a chain spec file with pre funded Developer accounts

cargo run -- --tmp --chain ./resources/pint-dev.json --instant-sealing

NOTE: the amount of PINT in all the endowed accounts (dev accounts) of the balances pallet ( see pint-dev.json) directly affects the NAV, since this is the total amount of PINT in curculation at genesis

Or if already built

./target/release/pint --tmp --dev --instant-sealing

This will use the node/src/chain_spec/dev.rs chain spec.

Local Testnet

Polkadot (release-v0.9.x branch)

cargo build --release

./target/release/polkadot build-spec --chain rococo-local --raw --disable-default-bootnode > rococo_local.json

./target/release/polkadot --chain ./rococo_local.json -d cumulus_relay0 --validator --alice --port 9844

./target/release/polkadot --chain ./rococo_local.json -d cumulus_relay1 --validator --bob --port 9955

PINT Parachain:

# this command assumes the chain spec is in a directory named polkadot that is a sibling of the pint directory
./target/release/pint --collator --alice --chain pint-dev --ws-port 9945 --parachain-id 200 --rpc-cors all -- --execution wasm --chain ../polkadot/rococo_local.json --ws-port 9977 --rpc-cors all

Registering on Local Relay Chain

In order to produce blocks you will need to register the parachain as detailed in the Substrate Cumulus Workshop by going to

Developer -> sudo -> paraSudoWrapper -> sudoScheduleParaInitialize(id, genesis)

Ensure you set the ParaId to 200 and the parachain: Bool to Yes.

cargo build --release
# Build the Chain spec
./target/release/pint build-spec --disable-default-bootnode > ./pint-local-plain.json
# Build the raw file
./target/release/pint build-spec --chain=./pint-local-plain.json --raw --disable-default-bootnode > ./pint-local.json


# export genesis state and wasm
./target/release/pint export-genesis-state --parachain-id 200 > ./resources/para-200-genesis
./target/release/pint export-genesis-wasm > ./para-200.wasm
  • polkadot-launch can be run by dropping the proper polkadot binary in the ./bin folder and
    • Run globally
      • polkadot-launch config.json
    • Run locally, navigate into polkadot-launch,
      • yarn
      • yarn start

Documentation

Commands

  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs -h - Print help message and exit.

About

A Polkadot ecosystem index for investors. A self sustaining auction treasury for parachains.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages