Skip to content

Commit

Permalink
feat(sdk): Add mode constants (#9973)
Browse files Browse the repository at this point in the history
* Adding
L2ChainID.MODE_MAINNET addresses
L2ChainID.MODE_MAINNET
DEPOSIT_CONFIRMATION_BLOCKS for MODE_MAINNET

* adding mode sepolia costants

* adding pnpm changeset
  • Loading branch information
raffaele-oplabs committed Mar 27, 2024
1 parent 5137f3b commit 87093b0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-months-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/sdk': patch
---

Added support for MODE sepolia and MODE mainnet
2 changes: 2 additions & 0 deletions packages/sdk/src/interfaces/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export enum L2ChainID {
BASE_MAINNET = 8453,
ZORA_GOERLI = 999,
ZORA_MAINNET = 7777777,
MODE_SEPOLIA = 919,
MODE_MAINNET = 34443,
}

/**
Expand Down
38 changes: 38 additions & 0 deletions packages/sdk/src/utils/chain-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export const DEPOSIT_CONFIRMATION_BLOCKS: {
[L2ChainID.BASE_MAINNET]: 10 as const,
[L2ChainID.ZORA_GOERLI]: 12 as const,
[L2ChainID.ZORA_MAINNET]: 50 as const,
[L2ChainID.MODE_SEPOLIA]: 25 as const,
[L2ChainID.MODE_MAINNET]: 50 as const,
}

export const CHAIN_BLOCK_TIMES: {
Expand Down Expand Up @@ -302,6 +304,42 @@ export const CONTRACT_ADDRESSES: {
},
l2: DEFAULT_L2_CONTRACT_ADDRESSES,
},
[L2ChainID.MODE_SEPOLIA]: {
l1: {
AddressManager: '0x83D45725d6562d8CD717673D6bb4c67C07dC1905' as const,
L1CrossDomainMessenger:
'0xc19a60d9E8C27B9A43527c3283B4dd8eDC8bE15C' as const,
L1StandardBridge: '0xbC5C679879B2965296756CD959C3C739769995E2' as const,
StateCommitmentChain:
'0x0000000000000000000000000000000000000000' as const,
CanonicalTransactionChain:
'0x0000000000000000000000000000000000000000' as const,
BondManager: '0x0000000000000000000000000000000000000000' as const,
OptimismPortal: '0x320e1580effF37E008F1C92700d1eBa47c1B23fD' as const,
L2OutputOracle: '0x2634BD65ba27AB63811c74A63118ACb312701Bfa' as const,
OptimismPortal2: '0x0000000000000000000000000000000000000000' as const,
DisputeGameFactory: '0x0000000000000000000000000000000000000000' as const,
},
l2: DEFAULT_L2_CONTRACT_ADDRESSES,
},
[L2ChainID.MODE_MAINNET]: {
l1: {
AddressManager: '0x50eF494573f28Cad6B64C31b7a00Cdaa48306e15' as const,
L1CrossDomainMessenger:
'0x95bDCA6c8EdEB69C98Bd5bd17660BaCef1298A6f' as const,
L1StandardBridge: '0x735aDBbE72226BD52e818E7181953f42E3b0FF21' as const,
StateCommitmentChain:
'0x0000000000000000000000000000000000000000' as const,
CanonicalTransactionChain:
'0x0000000000000000000000000000000000000000' as const,
BondManager: '0x0000000000000000000000000000000000000000' as const,
OptimismPortal: '0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07' as const,
L2OutputOracle: '0x4317ba146D4933D889518a3e5E11Fe7a53199b04' as const,
OptimismPortal2: '0x0000000000000000000000000000000000000000' as const,
DisputeGameFactory: '0x0000000000000000000000000000000000000000' as const,
},
l2: DEFAULT_L2_CONTRACT_ADDRESSES,
},
}

/**
Expand Down

0 comments on commit 87093b0

Please sign in to comment.