Skip to content

Commit 2e0507b

Browse files
Merge pull request #35 from damianmarti/add-optimism-support
Add support for Optimism
2 parents 9656649 + 2c76e69 commit 2e0507b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ ethereum-multicall is fully written in typescript so has full compile time suppo
2828
- fantom mainnet
2929
- cronos
3030
- harmony (shard 0)
31+
- optimism
32+
- kovanOptimism
3133
- custom network with your own instance of multicall deployed
3234

3335
## Installation
@@ -485,6 +487,8 @@ by default it looks at your network from the provider you passed in and makes th
485487
| fantom mainnet | `0xD98e3dBE5950Ca8Ce5a4b59630a5652110403E5c` |
486488
| cronos | `0x5e954f5972EC6BFc7dECd75779F10d848230345F` |
487489
| harmony | `0x5c41f6817feeb65d7b2178b0b9cebfc8fad97969` |
490+
| optimism | `0xeAa6877139d436Dc6d1f75F3aF15B74662617B2C` |
491+
| kovanOptimism | `0x91c88479F21203444D2B20Aa001f951EC8CF2F68` |
488492
489493
If you wanted this to point at a different multicall contract address just pass that in the options when creating the multicall instance, example:
490494

src/enums/networks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ export enum Networks {
33
ropsten = 3,
44
rinkeby = 4,
55
goerli = 5,
6+
optimism = 10,
67
kovan = 42,
78
bsc = 56,
9+
kovanOptimism = 69,
810
bsc_testnet = 97,
911
xdai = 100,
1012
matic = 137,

src/multicall.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,10 @@ export class Multicall {
549549
return '0x5e954f5972EC6BFc7dECd75779F10d848230345F';
550550
case Networks.harmony:
551551
return '0x5c41f6817feeb65d7b2178b0b9cebfc8fad97969';
552+
case Networks.optimism:
553+
return '0xeAa6877139d436Dc6d1f75F3aF15B74662617B2C';
554+
case Networks.kovanOptimism:
555+
return '0x91c88479F21203444D2B20Aa001f951EC8CF2F68';
552556
default:
553557
throw new Error(
554558
`Network - ${network} doesn't have a multicall contract address defined. Please check your network or deploy your own contract on it.`

0 commit comments

Comments
 (0)