Skip to content

Commit

Permalink
Merge branch 'main' of github.com:smartcontractkit/chain-selectors in…
Browse files Browse the repository at this point in the history
…to NONEVM-864/create-aptos-testnet-chain-selector
  • Loading branch information
jlaveracll committed Nov 8, 2024
2 parents bfada8e + 0492aa6 commit 005d974
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Chain Selectors

CCIP uses its own set of chain selectors represented by uint64 to identify blockchains. This repository contains a
CCIP uses its own set of chain selectors represented by uint64 to identify blockchains. It is a random
integer generated as follows:
```python3
python3
>>> import random
>>> random.randint(1, 2**64-1)
```
The scheme is used for several reasons:
- Global uniqueness across blockchain families
- Very unlikely to collide with existing chain ID schemes, reducing confusion
- Efficient on/off-chain representation
- No preference towards any family or chain
- Decoupled from chain name which may change over time with rebrands/forks


This repository contains a
mapping between the custom chain identifiers (`chainSelectorId`) chain names and the chain identifiers
used by the blockchains themselves (`chainId`). For solana we use the base58 encoded genesis hash as the chain id.

Expand Down

0 comments on commit 005d974

Please sign in to comment.