Skip to content

Commit

Permalink
feat: support base, polygon zkevm and zora
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Sep 30, 2023
1 parent 89c4ae7 commit 1582caa
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 59 deletions.
124 changes: 66 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,72 @@ ethereum-multicall is fully written in typescript so has full compile time suppo

The below networks are supported by default, and custom networks can be supported by providing your own instance of a deployed Multicall contract.

| Chain | Chain ID |
| ----------------------- | ---------- |
| Mainnet | 1 |
| Kovan | 3 |
| Rinkeby | 4 |
| Görli | 5 |
| Ropsten | 10 |
| Sepolia | 42 |
| Optimism | 137 |
| Optimism Kovan | 69 |
| Optimism Görli | 100 |
| Arbitrum | 420 |
| Arbitrum Görli | 42161 |
| Arbitrum Rinkeby | 421611 |
| Polygon | 421613 |
| Mumbai | 80001 |
| Gnosis Chain (xDai) | 11155111 |
| Avalanche | 43114 |
| Avalanche Fuji | 43113 |
| Fantom Testnet | 4002 |
| Fantom Opera | 250 |
| BNB Smart Chain | 56 |
| BNB Smart Chain Testnet | 97 |
| Moonbeam | 1284 |
| Moonriver | 1285 |
| Moonbase Alpha Testnet | 1287 |
| Harmony | 1666600000 |
| Cronos | 25 |
| Fuse | 122 |
| Songbird Canary Network | 19 |
| Coston Testnet | 16 |
| Boba | 288 |
| Aurora | 1313161554 |
| Astar | 592 |
| OKC | 66 |
| Heco Chain | 128 |
| Metis | 1088 |
| RSK | 30 |
| RSK Testnet | 31 |
| Evmos | 9001 |
| Evmos Testnet | 9000 |
| Thundercore | 108 |
| Thundercore Testnet | 18 |
| Oasis | 26863 |
| Celo | 42220 |
| Godwoken | 71402 |
| Godwoken Testnet | 71401 |
| Klatyn | 8217 |
| Milkomeda | 2001 |
| KCC | 321 |
| Etherlite | 111 |
| Linea Testnet | 59140 |
| Linea | 59144 |
| Scroll Alpha | 534352 |
| zkSync Era | 324 |
| zkSync Era Testnet | 280 |
| Mantle | 5000 |
| Mantle Testnet | 5001 |
| Chain | Chain ID |
| --------------------- | ---------- |
| Mainnet | 1 |
| Ropsten | 3 |
| Rinkeby | 4 |
| Görli | 5 |
| Optimism | 10 |
| Kovan | 42 |
| Matic | 137 |
| KovanOptimism | 69 |
| xDai | 100 |
| xDaiTestnet | 10200 |
| GoerliOptimism | 420 |
| Arbitrum | 42161 |
| RinkebyArbitrum | 421611 |
| GoerliArbitrum | 421613 |
| Mumbai | 80001 |
| Sepolia | 11155111 |
| AvalancheMainnet | 43114 |
| AvalancheFuji | 43113 |
| FantomTestnet | 4002 |
| Fantom | 250 |
| BSC | 56 |
| BSC_Testnet | 97 |
| Moonbeam | 1284 |
| Moonriver | 1285 |
| MoonbaseAlphaTestnet | 1287 |
| Harmony | 1666600000 |
| Cronos | 25 |
| Fuse | 122 |
| SongbirdCanaryNetwork | 19 |
| CostonTestnet | 16 |
| Boba | 288 |
| Aurora | 1313161554 |
| Astar | 592 |
| OKC | 66 |
| Heco | 128 |
| Metis | 1088 |
| RSK | 30 |
| RSKTestnet | 31 |
| Evmos | 9001 |
| EvmosTestnet | 9000 |
| Thundercore | 108 |
| ThundercoreTestnet | 18 |
| Oasis | 26863 |
| Celo | 42220 |
| Godwoken | 71402 |
| GodwokenTestnet | 71401 |
| Klatyn | 8217 |
| Milkomeda | 2001 |
| KCC | 321 |
| Etherlite | 111 |
| Linea Testnet | 59140 |
| Linea | 59144 |
| Scroll Alpha | 534352 |
| zkSync Era | 324 |
| zkSync Era Testnet | 280 |
| Shibarium | 109 |
| Mantle | 5000 |
| Mantle Testnet | 5001 |
| Base | 8453 |
| Base Testnet | 84531 |
| PolygonZkEvm | 1101 |
| PolygonZkEvmTestnet | 1442 |
| Zora | 7777777 |
| Zora Testnet | 999 |

## Installation

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-multicall",
"version": "2.20.0",
"version": "2.21.0",
"description": "Multicall allows multiple smart contract constant function calls to be grouped into a single call and the results aggregated into a single result",
"main": "dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
7 changes: 7 additions & 0 deletions src/enums/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum Networks {
matic = 137,
kovanOptimism = 69,
xdai = 100,
xDaiTestnet = 10200,
goerliOptimism = 420,
arbitrum = 42161,
rinkebyArbitrum = 421611,
Expand Down Expand Up @@ -56,4 +57,10 @@ export enum Networks {
shibarium = 109,
mantle = 5000,
mantleTestnet = 5001,
base = 8453,
baseTestnet = 84531,
polygonZkEvm = 1101,
polygonZkEvmTestnet = 1442,
zora = 7777777,
zoraTestnet = 999,
}
7 changes: 7 additions & 0 deletions src/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ export class Multicall {
case Networks.matic:
case Networks.kovanOptimism:
case Networks.xdai:
case Networks.xDaiTestnet:
case Networks.goerliOptimism:
case Networks.arbitrum:
case Networks.rinkebyArbitrum:
Expand Down Expand Up @@ -598,6 +599,12 @@ export class Multicall {
case Networks.linea:
case Networks.mantle:
case Networks.mantleTestnet:
case Networks.base:
case Networks.baseTestnet:
case Networks.polygonZkEvm:
case Networks.polygonZkEvmTestnet:
case Networks.zora:
case Networks.zoraTestnet:
return '0xcA11bde05977b3631167028862bE2a173976CA11';
case Networks.etherlite:
return '0x21681750D7ddCB8d1240eD47338dC984f94AF2aC';
Expand Down

0 comments on commit 1582caa

Please sign in to comment.