MCPcopy Index your code
hub / github.com/chainx-org/ChainX

github.com/chainx-org/ChainX @v5.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.2.4 ↗ · + Follow
1,759 symbols 2,861 edges 183 files 318 documented · 18% updated 6mo agov5.2.4 · 2025-12-22★ 3261 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChainX

License: GPL v3 CI

ChainX is a community-driven project built on the next-generation blockchain framework substrate, the largest Layer-2 network of Bitcoin using the Light-client protocol with smart contract support, spawn as the third relay chain besides Polkadot/Kusama. SherpaX and MiniX will be added as a parachain.

Based on the LayerZero protocol, the EVM Layer2 ecology on ChainX can share the liquidity of the EVM ecology such as ETH/BSC, and the POW payment coin such as BTC/DogeCoin can share the DAPP ecology of the EVM. light white paper. website

The Fragmented Web3 Crypto World

There has always been many problems in the crypto world, but there has never been a shortage of reforms and innovations. * In order to solve the payment performance and scalability problems of BTC, various altcoins such as Dogecoin, LTC, and BCH have been introduced. * In order to solve the problems of too expensive gas fees in Ethereum and the scalability of dapps, people have successively developed public chains such as BSC, EOS, Polkadot, and Avalanche, which now seem to have a wide users.

However, the establishment of dapps on these mainstream public chains still faces some problems: the ecosystems of different public chains are separated from each other, and the isolation will disperse the value, until the value returns to 0, the aggregation can accumulate the value, making the value like The piles of wood are piled higher and higher. Also, we cannot exchange tokens on pancakeswap with those on Uniswap because they come from different ecosystems. This will prevent DEXs from having as much liquidity as CEXs. But we must embrace DEXs, because we all know that decentralization is the fundamental attribute and future of the encrypted world, and the meaning of encryption algorithms and even the whole web3 world is decentralization.

Based on this, ChainX, the layer 2 network of Bitcoin, will be committed to solving the above problems and aggregating these divided communities and ecology.

How ChainX solves the above problems

To solve the scalability problem of isolated POW tokens such as Bitcoin and Dogecoin

First, we adopted the mode of light node + multi-centralized hosting (integrated with Taproot aggregated signature + MAST contract + Signal distributed computing protocol). Then, we will adopt the on chain lightning network model to completely solve the scalability problem of POW tokens such as BTC in a completely decentralized way.

To solve the isolation problem of EVM public chains such as ETH/BSC

There are already many solutions for the decentralized cross-chain between EVM chains. We will absorb the LayerZero protocol to realize the cross-chain between decentralized EVM chains.

Later, an aggregation protocol will be deployed on ChainX EVM, so that our DEX can unify liquidity across platforms and chains: for example, pools on UniSwap and pools on PancakeSwap can share liquidity.

In addition, ChainX will realize the consistent mapping between ENS and other various public chain domain name systems. For example, the CID of ComingChat can be mapped with ENS, and ENS can be mapped with BTC addresses.

Aggregation and unification are eternal themes in the crypto world. Aggregation can make the crypto world closer and make web3 competitive enough to replace the web2 world. At the same time, aggregation also prevents LTC, BCH and other DAPP ecologically unprosperous communities from slowly going silent, and the prosperous EVM ecology will also become more prosperous because of aggregation.

ChainX Ecological Project:

  • ComingChat:Integrated web3 portal for encrypted social, digital identity, NFT, digital wallet, smart contract platform portal and other functions. Committed to being a secure and trusted web3 portal. Combining decentralized encryption algorithms and blockchain knowledge to solve trusted information transmission and asset management problems.
  • SherpaX: ChainX's EVM & WASM Smart Contract Parachain.
  • MiniX: ChainX's digital identity, NFT, reputation system parachain.
  • SoSwap: Omni-chain DEX, a distributed financial platform dedicated to allowing multiple chains to share liquidity.
  • ComFuture: Digital identity, NFT creation auction trading platform.
  • USB: The decentralized expansion of BTC that allows BTC and any EVM ecological chain to be integrated with each other.

The crypto world is not perfect, but ChainX is working hard to make it better and better.

Please refer to the docs for building and developing on ChainX platform.

Contribution

Any kinds of contributions are highly welcome. Feel free to submit an issue if you have any question or run into any issues.

Metamask config for BTC

Network name: ChainX
RPC URL: https://mainnet.chainx.org/rpc
Chain ID: 1501
Currency symbol: BTC
Block explorer URL (Optional): https://evm.chainx.org/

PCX(ERC20): 0xf3607524cAB05762cB5F0cAb17e4cA3A0F0b4E87

License

GPL v3

Extension points exported contracts — how you extend this code

TreasuryAccount (Interface)
This trait provides a simple way to get the treasury account. [8 implementers]
xpallets/support/src/traits.rs
RewardPotAccountFor (Interface)
A function that generates an `AccountId` for the reward pot of a mining entity. The reward of all individual miners wil [6 …
primitives/mining/common/src/lib.rs
Config (Interface)
(no doc) [8 implementers]
xpallets/mining/asset/src/lib.rs
Config (Interface)
(no doc) [138 implementers]
xpallets/assets/src/lib.rs
Config (Interface)
(no doc) [7 implementers]
xpallets/assets-bridge/src/lib.rs
Config (Interface)
(no doc) [11 implementers]
xpallets/gateway/bitcoin/src/lib.rs
Config (Interface)
(no doc) [5 implementers]
xpallets/dex/spot/src/lib.rs
RegistrarHandler (Interface)
Trait for doing some stuff on the registration/deregistration of a foreign asset. [3 implementers]
primitives/assets-registrar/src/lib.rs

Core symbols most depended-on inside this repo

iter
called by 80
xpallets/assets/src/types.rs
hash
called by 51
runtime/dev/src/precompiles.rs
execute
called by 42
scripts/chainx-js/types_gen.py
as_ref
called by 40
primitives/runtime/src/lib.rs
assimilate_storage
called by 25
xpallets/btc-ledger/src/lib.rs
expect_event
called by 24
xpallets/assets-bridge/src/mock.rs
contains
called by 24
runtime/dev/src/lib.rs
hash
called by 21
cli/src/genesis/bitcoin.rs

Shape

Method 982
Function 388
Class 273
Interface 61
Enum 55

Languages

Rust98%
Python2%
TypeScript1%

Modules by API surface

xpallets/mining/staking/src/lib.rs76 symbols
xpallets/btc-ledger/src/lib.rs53 symbols
xpallets/gateway/common/src/lib.rs52 symbols
xpallets/assets/src/lib.rs41 symbols
runtime/malan/src/lib.rs37 symbols
runtime/dev/src/lib.rs37 symbols
runtime/chainx/src/lib.rs37 symbols
cli/src/command.rs37 symbols
xpallets/gateway/bitcoin/src/lib.rs34 symbols
xpallets/dex/spot/src/types.rs34 symbols
xpallets/mining/asset/src/lib.rs33 symbols
xpallets/gateway/records/src/lib.rs33 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page