Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update chain IDs #2104

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- [#2104](https://github.com/NibiruChain/nibiru/pull/2074) - chore: update chain IDs

### Nibiru EVM

- [#2119](https://github.com/NibiruChain/nibiru/pull/2119) - fix(evm): Guarantee
Expand All @@ -63,12 +65,12 @@ preparation for a second audit starting in November 2024.
and the [related comments from @Unique-Divine and @berndartmueller](https://github.com/NibiruChain/nibiru/issues/2059#issuecomment-2408625724).
- [#2084](https://github.com/NibiruChain/nibiru/pull/2084) - feat(evm-forge): foundry support and template for Nibiru EVM development
- [#2086](https://github.com/NibiruChain/nibiru/pull/2086) - fix(evm-precomples):
Fix state consistency in precompile execution by ensuring proper journaling of
state changes in the StateDB. This pull request makes sure that state is
committed as expected, fixes the `StateDB.Commit` to follow its guidelines more
closely, and solves for a critical state inconsistency producible from the
FunToken.sol precompiled contract. It also aligns the precompiles to use
consistent setup and dynamic gas calculations, addressing the following tickets.
Fix state consistency in precompile execution by ensuring proper journaling of
state changes in the StateDB. This pull request makes sure that state is
committed as expected, fixes the `StateDB.Commit` to follow its guidelines more
closely, and solves for a critical state inconsistency producible from the
FunToken.sol precompiled contract. It also aligns the precompiles to use
consistent setup and dynamic gas calculations, addressing the following tickets.
- <https://github.com/NibiruChain/nibiru/issues/2083>
- <https://github.com/code-423n4/2024-10-nibiru-zenith/issues/43>
- <https://github.com/code-423n4/2024-10-nibiru-zenith/issues/47>
Expand Down
46 changes: 23 additions & 23 deletions app/appconst/appconst.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,39 +53,39 @@ func RuntimeVersion() string {

// EIP 155 Chain IDs exported for tests.
const (
ETH_CHAIN_ID_MAINNET int64 = 7200
ETH_CHAIN_ID_MAINNET int64 = 6900

ETH_CHAIN_ID_TESTNET_1 int64 = 7210
ETH_CHAIN_ID_TESTNET_2 int64 = 7211
ETH_CHAIN_ID_TESTNET_3 int64 = 7212
ETH_CHAIN_ID_TESTNET_1 int64 = 6910
ETH_CHAIN_ID_TESTNET_2 int64 = 6911
ETH_CHAIN_ID_TESTNET_3 int64 = 6912

ETH_CHAIN_ID_DEVNET_1 int64 = 7220
ETH_CHAIN_ID_DEVNET_2 int64 = 7221
ETH_CHAIN_ID_DEVNET_3 int64 = 7222
ETH_CHAIN_ID_DEVNET_1 int64 = 6920
ETH_CHAIN_ID_DEVNET_2 int64 = 6921
ETH_CHAIN_ID_DEVNET_3 int64 = 6922

ETH_CHAIN_ID_LOCALNET_0 int64 = 7230
ETH_CHAIN_ID_LOCALNET_1 int64 = 7231
ETH_CHAIN_ID_LOCALNET_2 int64 = 7232
ETH_CHAIN_ID_LOCALNET_3 int64 = 7233
ETH_CHAIN_ID_LOCALNET_0 int64 = 6930
ETH_CHAIN_ID_LOCALNET_1 int64 = 6931
ETH_CHAIN_ID_LOCALNET_2 int64 = 6932
ETH_CHAIN_ID_LOCALNET_3 int64 = 6933

ETH_CHAIN_ID_DEFAULT int64 = 7230
ETH_CHAIN_ID_DEFAULT int64 = 6930
)

var knownEthChainIDMap = map[string]int64{
"cataclysm-1": 7200,
"cataclysm-1": 6900,

"nibiru-testnet-1": 7210,
"nibiru-testnet-2": 7211,
"nibiru-testnet-3": 7212,
"nibiru-testnet-1": 6910,
"nibiru-testnet-2": 6911,
"nibiru-testnet-3": 6912,

"nibiru-devnet-1": 7220,
"nibiru-devnet-2": 7221,
"nibiru-devnet-3": 7222,
"nibiru-devnet-1": 6920,
"nibiru-devnet-2": 6921,
"nibiru-devnet-3": 6922,

"nibiru-localnet-0": 7230,
"nibiru-localnet-1": 7231,
"nibiru-localnet-2": 7232,
"nibiru-localnet-3": 7233,
"nibiru-localnet-0": 6930,
"nibiru-localnet-1": 6931,
"nibiru-localnet-2": 6932,
"nibiru-localnet-3": 6933,
}

// GetEthChainID: Maps the given chain ID from the block's `sdk.Context` to an
Expand Down
Loading