Skip to content

Commit 080a2fa

Browse files
committed
support binance smart chain multicall
1 parent 83c6e7b commit 080a2fa

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ Multicall allows multiple smart contract constant function calls to be grouped i
99

1010
ethereum-multicall is fully written in typescript so has full compile time support. The motivation of this package was to expose a super simple and easy to understand interface for you to take the full benefits of the multicalls. Also to not being opinionated on how you use it, you can use it with web3, ethers or even pass in a custom nodeUrl and we do it for you. This package takes care of the decoding for you but at the same time if you dont want it to you can turn that part off.
1111

12+
## Supports
13+
14+
- mainnet
15+
- kovan
16+
- rinkeby
17+
- ropsten
18+
- binance smart chain
19+
- custom network with your own instance of multicall deployed
20+
1221
## Installation
1322

1423
### npm:
@@ -366,6 +375,7 @@ by default it looks at your network from the provider you passed in and makes th
366375
- kovan > '0x2cc8688c5f75e365aaeeb4ea8d6a480405a48d2a'
367376
- rinkeby > '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821'
368377
- ropsten > '0x53c43764255c17bd724f74c4ef150724ac50a3ed'
378+
- binance smart chain > '0x949f41e8a6197f2a19854f813fd361bab9aa7d2d'
369379
370380
If you wanted this to point at a different multicall contract address just pass that in the options when creating the multicall instance, example:
371381

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-multicall",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Multicall allows multiple smart contract constant function calls to be grouped into a single call and the results aggregated into a single result",
55
"main": "dist/index.js",
66
"scripts": {

src/enums/networks.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export enum Networks {
22
mainnet = 1,
33
ropsten = 3,
44
rinkeby = 4,
5+
bsc = 56,
56
kovan = 42,
67
}

src/multicall.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,11 @@ export class Multicall {
393393
return '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821';
394394
case Networks.ropsten:
395395
return '0x53c43764255c17bd724f74c4ef150724ac50a3ed';
396+
case Networks.bsc:
397+
return '0x949f41e8a6197f2a19854f813fd361bab9aa7d2d';
396398
default:
397399
throw new Error(
398-
`Network - ${network} is not got a contract defined it only supports mainnet, kovan, rinkeby and ropsten`
400+
`Network - ${network} is not got a contract defined it only supports mainnet, kovan, rinkeby, bsc and ropsten`
399401
);
400402
}
401403
}

0 commit comments

Comments
 (0)