Skip to content

Commit

Permalink
feat(e2e/lib): added base sepolia config (#1294)
Browse files Browse the repository at this point in the history
adds configuration to support the Base Sepolia chain.

- manifests
- types
- evmchain

uses the same pattern as per other chains.

guidance from @kevinhalliday 

task: https://app.asana.com/0/1206208509925075/1207670642804306/f

Co-authored-by: Pavel Nikolov <pavelnikolov@users.noreply.github.com>
  • Loading branch information
brid and pavelnikolov authored Jun 27, 2024
1 parent 9d4f558 commit 1ec9135
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/site/docs/develop/testnet/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Fields will be updated soon.
| Ethereum Holesky | `17000` | [See ChainList Page](https://chainlist.org/chain/17000) |
| Arbitrum Sepolia | `421614` | `https://sepolia-rollup.arbitrum.io/rpc` |
| Optimism Sepolia | `11155420` | `https://sepolia.optimism.io` |
| Base Sepolia | `84532` | `https://sepolia.base.org` |

## Addresses

Expand Down Expand Up @@ -48,3 +49,4 @@ Precompiles on the Omni EVM are equivalent to the Ethereum EVM precompiles.
| Ethereum Holesky | https://holesky.etherscan.io/ |
| Arbitrum Sepolia | https://sepolia.arbiscan.io/ |
| Optimism Sepolia | https://sepolia-optimism.etherscan.io/ |
| Base Sepolia | https://sepolia.basescan.org/ |
2 changes: 1 addition & 1 deletion e2e/manifests/omega.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
network = "omega"
public_chains = ["holesky","op_sepolia","arb_sepolia"]
public_chains = ["holesky","op_sepolia","arb_sepolia", "base_sepolia"]

multi_omni_evms = true
prometheus = true
Expand Down
10 changes: 10 additions & 0 deletions e2e/types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ var (
IsPublic: true,
Shards: allShards,
}

chainBaseSepolia = EVMChain{
Metadata: mustMetadata(evmchain.IDBaseSepolia),
IsPublic: true,
Shards: allShards,
}
)

// OmniEVMByNetwork returns the Omni evm chain definition by netconf network.
Expand Down Expand Up @@ -77,6 +83,8 @@ func PublicChainByName(name string) (EVMChain, error) {
return chainArbSepolia, nil
case chainOpSepolia.Name:
return chainOpSepolia, nil
case chainBaseSepolia.Name:
return chainBaseSepolia, nil
case chainEthereum.Name:
return chainEthereum, nil
default:
Expand All @@ -93,6 +101,8 @@ func PublicRPCByName(name string) string {
return "https://sepolia-rollup.arbitrum.io/rpc"
case chainOpSepolia.Name:
return "https://sepolia.optimism.io"
case chainBaseSepolia.Name:
return "https://sepolia.base.org"
case chainEthereum.Name:
return "https://ethereum-rpc.publicnode.com"
default:
Expand Down
16 changes: 12 additions & 4 deletions lib/evmchain/evmchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ const (
IDOmniMainnet uint64 = 166

// Testnets.
IDOmniOmega uint64 = 164
IDHolesky uint64 = 17000
IDArbSepolia uint64 = 421614
IDOpSepolia uint64 = 11155420
IDOmniOmega uint64 = 164
IDHolesky uint64 = 17000
IDArbSepolia uint64 = 421614
IDOpSepolia uint64 = 11155420
IDBaseSepolia uint64 = 84532

// Ephemeral.
IDOmniEphemeral uint64 = 1651
Expand Down Expand Up @@ -96,6 +97,13 @@ var static = map[uint64]Metadata{
NativeToken: tokens.ETH,
IsL2: true,
},
IDBaseSepolia: {
ChainID: IDBaseSepolia,
Name: "base_sepolia",
BlockPeriod: 2 * time.Second,
NativeToken: tokens.ETH,
IsL2: true,
},
IDOmniEphemeral: {
ChainID: IDOmniEphemeral,
Name: omniEVMName,
Expand Down

0 comments on commit 1ec9135

Please sign in to comment.