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 c4f65c2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/WETH/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"optimism": {
"address": "0x4200000000000000000000000000000000000006"
},
"base": {
"address": "0x4200000000000000000000000000000000000006"
}
"base-goerli": {
"address": "0x4200000000000000000000000000000000000006"
}
Expand Down
8 changes: 8 additions & 0 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export const NETWORK_DATA: Record<Chain, Network> = {
),
layer: 2,
},
base: {
id: 8543,
name: 'Base',
provider: new ethers.providers.StaticJsonRpcProvider(
'https://mainnet.base.org',
),
layer: 2,
},
goerli: {
id: 5,
name: '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 c4f65c2

Please sign in to comment.