Skip to content

Commit

Permalink
add base mainnet as a supported superchain
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-bayardo committed Jul 11, 2023
1 parent 15be618 commit 951b229
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ export const NETWORK_DATA: Record<Chain, Network> = {
),
layer: 2,
},
base: {
id: 8543,
name: 'Base',
provider: new ethers.providers.StaticJsonRpcProvider(
// Update to 'https://mainnet.base.org' once live
'https://developer-access-mainnet.base.org',
),
layer: 2,
},
goerli: {
id: 5,
name: 'Goerli',
Expand Down Expand Up @@ -58,6 +67,9 @@ export const L2_STANDARD_BRIDGE_INFORMATION: Record<
optimism: {
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
},
base: {
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
},
'optimism-goerli': {
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
},
Expand All @@ -68,6 +80,7 @@ export const L2_STANDARD_BRIDGE_INFORMATION: Record<

export const L2_TO_L1_PAIR: Partial<Record<L2Chain, L1Chain>> = {
optimism: 'ethereum',
base: 'ethereum',
'optimism-goerli': 'goerli',
'base-goerli': 'goerli',
}
Expand All @@ -81,6 +94,10 @@ export const L1_STANDARD_BRIDGE_INFORMATION: Record<
l2Chain: 'optimism',
l1StandardBridgeAddress: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',
},
{
l2Chain: 'base',
l1StandardBridgeAddress: '0x3154Cf16ccdb4C6d922629664174b904d80F2C35',
},
],
goerli: [
{
Expand Down
2 changes: 2 additions & 0 deletions src/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const TOKEN_DATA_SCHEMA = {
properties: {
ethereum: TOKEN_SCHEMA,
optimism: TOKEN_SCHEMA,
base: TOKEN_SCHEMA,
'base-goerli': TOKEN_SCHEMA,
goerli: TOKEN_SCHEMA,
'optimism-goerli': TOKEN_SCHEMA,
Expand All @@ -68,6 +69,7 @@ export const TOKEN_DATA_SCHEMA = {
anyOf: [
{ required: ['ethereum'] },
{ required: ['optimism'] },
{ required: ['base'] },
{ required: ['base-goerli'] },
{ required: ['goerli'] },
{ required: ['optimism-goerli'] },
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface Token {
export type Chain =
| 'ethereum'
| 'optimism'
| 'base'
| 'goerli'
| 'optimism-goerli'
| 'base-goerli'
Expand Down

0 comments on commit 951b229

Please sign in to comment.