MCPcopy Index your code
hub / github.com/cennznet/cennznet

github.com/cennznet/cennznet @2.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.1.2 ↗ · + Follow
1,732 symbols 4,947 edges 125 files 471 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CENNZnet Node

license: LGPL v3 ci status badge PRs Welcome

CENNZnet node built on Substrate. For getting started and technical guides, please refer to the CENNZnet Wiki.

Contributing

All PRs are welcome! Please follow our contributing guidelines here.


Community

Join our official CENNZnet Discord server 🤗

  • Get CENNZnet technical support 🛠
  • Meet startups and DApp developers 👯‍♂️
  • Learn more about CENNZnet and blockchain 🙌
  • Get updates on CENNZnet bounties and grants 💰
  • Hear about the latest hackathons, meetups and more 👩‍💻

Join the Discord server by clicking on the badge below!

Support Server

Run with Docker

Use the latest CENNZnet docker image to get started quickly

# Start a local validator on a development chain
$ docker run \
    -p 9933:9933 -p 9944:9944 \
    cennznet/cennznet:latest \
    --dev \
    --unsafe-ws-external \
    --unsafe-rpc-external

9944 is Websocket port, 9933 is the HTTP RPC port. Majority of DApps should use 9944, which is accessible via ws://localhost:9944

Run from Source

Follow the steps to build and run a CENNZnet node from the source code.

1) Set up build environment

For Linux (the example below is for Debian-based machines):

$ sudo apt install -y build-essential clang cmake gcc git libclang-dev libssl-dev pkg-config

For MacOS (via Homebrew):

$ brew install openssl cmake llvm

2) Install Rust

Install Rust on your machine through here, and the following rust version and toolchains.

$ cargo --version
$ rustup install nightly
$ rustup target add --toolchain=nightly wasm32-unknown-unknown

3) Build and Run

Clone the repo, build the binary and run it.

$ git clone https://github.com/cennznet/cennznet.git
$ cd cennznet
$ cargo build --release # or remove  '--release' for quick debug build
$ ./target/release/cennznet --help

# start a validator node for development
$ ./target/release/cennznet --dev

Build Docker Image

Prepare your docker engine, and make sure it is running.

# To use the default image name and tag
$ make 

# To custom your image name and tag
$ IMAGE_NAME='cennznet' IMAGE_TAG='v1.5.1' DOCKER_BUILD_ARGS='--no-cache --quiet' make build

# Without using make
$ docker build --no-cache -t cennznet:v1.5.1 .

Extension points exported contracts — how you extend this code

EvmData (Interface)
Data that can be converted from and to EVM data types. [8 implementers]
evm-precompiles/utils/src/data.rs
Get (Interface)
(no doc) [9 implementers]
cli/rpc-core/txpool/src/types/mod.rs
Config (Interface)
(no doc) [32 implementers]
crml/nft/src/lib.rs
Config (Interface)
(no doc) [7 implementers]
crml/staking/src/lib.rs
Config (Interface)
The module's configuration trait. [4 implementers]
crml/token-approvals/src/lib.rs
EthAbiCodec (Interface)
Something that can be decoded from eth log data/ ABI TODO: ethabi crate would be better for this however no support for [3 …
crml/support/src/lib.rs
MultiplierUpdate (Interface)
Something that can convert the current multiplier to the next one. [2 implementers]
crml/transaction-payment/src/lib.rs
Config (Interface)
This is the pallet's configuration trait [2 implementers]
crml/eth-bridge/src/lib.rs

Core symbols most depended-on inside this repo

into
called by 222
crml/cennzx/src/types.rs
build
called by 95
crml/cennzx/src/mock.rs
iter
called by 83
crml/staking/src/slashing.rs
len
called by 81
crml/nft/src/types.rs
into
called by 80
evm-precompiles/utils/src/data.rs
build
called by 63
crml/nft/src/mock.rs
run_to_block
called by 62
crml/staking/src/mock.rs
start_active_era
called by 60
crml/staking/src/mock.rs

Shape

Function 756
Method 676
Class 192
Interface 57
Enum 51

Languages

Rust100%

Modules by API surface

crml/staking/src/tests.rs101 symbols
crml/cennzx/src/tests.rs86 symbols
crml/staking/src/lib.rs79 symbols
crml/generic-asset/src/tests.rs77 symbols
crml/transaction-payment/src/lib.rs66 symbols
crml/staking/src/mock.rs64 symbols
runtime/src/impls.rs57 symbols
crml/staking/src/rewards/mod.rs57 symbols
crml/nft/src/tests.rs54 symbols
crml/generic-asset/src/lib.rs45 symbols
evm-precompiles/utils/src/tests.rs43 symbols
crml/staking/src/offchain_election.rs39 symbols

For agents

$ claude mcp add cennznet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page