Skip to content

Commit

Permalink
feat: update opBNB chain config to support opstack plugin (#2659)
Browse files Browse the repository at this point in the history
* config: update opBNB chain config to support opstack plugin

* Create lazy-planes-knock.md

---------

Co-authored-by: jxom <j@wevm.dev>
  • Loading branch information
owen-reorg and jxom authored Sep 9, 2024
1 parent 6dfadec commit 24bdc50
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-planes-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added OP Stack addresses to opBNB Chain.
20 changes: 20 additions & 0 deletions src/chains/definitions/opBNB.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { chainConfig } from '../../op-stack/chainConfig.js'
import { defineChain } from '../../utils/chain/defineChain.js'

const sourceId = 56 // bsc mainnet

export const opBNB = /*#__PURE__*/ defineChain({
id: 204,
name: 'opBNB',
Expand All @@ -18,9 +21,26 @@ export const opBNB = /*#__PURE__*/ defineChain({
},
},
contracts: {
...chainConfig.contracts,
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 512881,
},
l2OutputOracle: {
[sourceId]: {
address: "0x153CAB79f4767E2ff862C94aa49573294B13D169",
},
},
portal: {
[sourceId]: {
address: "0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519",
},
},
l1StandardBridge: {
[sourceId]: {
address: "0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea",
},
},
},
sourceId,
})
20 changes: 20 additions & 0 deletions src/chains/definitions/opBNBTestnet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { chainConfig } from '../../op-stack/chainConfig.js'
import { defineChain } from '../../utils/chain/defineChain.js'

const sourceId = 97 // bsc testnet

export const opBNBTestnet = /*#__PURE__*/ defineChain({
id: 5611,
name: 'opBNB Testnet',
Expand All @@ -18,10 +21,27 @@ export const opBNBTestnet = /*#__PURE__*/ defineChain({
},
},
contracts: {
...chainConfig.contracts,
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 3705108,
},
l2OutputOracle: {
[sourceId]: {
address: "0xFf2394Bb843012562f4349C6632a0EcB92fC8810",
},
},
portal: {
[sourceId]: {
address: "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31",
},
},
l1StandardBridge: {
[sourceId]: {
address: "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840",
},
},
},
testnet: true,
sourceId,
})

0 comments on commit 24bdc50

Please sign in to comment.