Skip to content

netcloth/netcloth-chain

Repository files navigation

NetCloth Chain

version license LoC Go Report Card Codacy Badge CodeFactor codecov Build Status

Welcome to the official Go implementation of the NetCloth blockchain!

Founded in February 2019, NetCloth is a next-generation high-performance public chain network with the consensus of BPoS. NetCloth chain assists developers and users to create their own "personal network" by providing virtual machines (compatible with EVM), IPAL on-chain addressing protocol, native support for meta transactions, loop transactions and other infrastructures, and promotes the "personal network" to become The basic network unit and application service provider of the Web3.0. NetCloth assists users to truly master their personal data and establish a digital economic system based on data assets.

QuickStart

Install

Install nch from here

Run

init

# Initialize configuration files and genesis file
nchd init local-nch --chain-id nch-chain

# Copy the `Address` output here and save it for later use 
nchcli keys add jack

# Copy the `Address` output here and save it for later use
nchcli keys add alice

# Add both accounts, with coins to the genesis file
nchd add-genesis-account $(nchcli keys show jack -a) 50000000000000000000pnch
nchd add-genesis-account $(nchcli keys show alice -a) 50000000000000000000pnch

# create validator
nchd gentx \
  --amount 1000000000000pnch \
  --commission-rate "0.10" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.10" \
  --pubkey $(nchd tendermint show-validator) \
  --name alice

# collect gentx
nchd collect-gentxs


# Configure your CLI to eliminate need for chain-id flag
nchcli config chain-id nch-chain
nchcli config output json
nchcli config indent true
nchcli config trust-node true

run nchd

nchd start --log_level "*:debug" --trace

transfer asset

# transfer asset
nchcli send --from $(nchcli keys show jack -a)  --to $(nchcli keys show alice -a) --amount 1000000000000pnch

query account

nchcli query account  $(nchcli keys show jack -a)
nchcli query account  $(nchcli keys show alice -a)