ethers-multicall
Advanced tools
Comparing version 0.1.3 to 0.1.4
import { Contract } from './contract'; | ||
import { Provider } from './provider'; | ||
import { Provider, setMulticallAddress } from './provider'; | ||
import { ContractCall } from './types'; | ||
export { Contract, Provider, ContractCall }; | ||
export { Contract, Provider, ContractCall, setMulticallAddress }; | ||
declare const _default: { | ||
Contract: typeof Contract; | ||
Provider: typeof Provider; | ||
setMulticallAddress: typeof setMulticallAddress; | ||
}; | ||
export default _default; |
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.Provider = provider_1.Provider; | ||
exports.default = { Contract: contract_1.Contract, Provider: provider_1.Provider }; | ||
exports.setMulticallAddress = provider_1.setMulticallAddress; | ||
exports.default = { Contract: contract_1.Contract, Provider: provider_1.Provider, setMulticallAddress: provider_1.setMulticallAddress }; |
@@ -11,1 +11,2 @@ import { ethers } from 'ethers'; | ||
} | ||
export declare function setMulticallAddress(chainId: number, address: string): void; |
@@ -81,11 +81,15 @@ "use strict"; | ||
exports.Provider = Provider; | ||
var multicallAddresses = { | ||
1: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', | ||
4: '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821', | ||
42: '0x2cc8688c5f75e365aaeeb4ea8d6a480405a48d2a', | ||
100: '0xb5b692a88bdfc81ca69dcb1d924f59f0413a602a', | ||
1337: '0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e', | ||
}; | ||
function setMulticallAddress(chainId, address) { | ||
multicallAddresses[chainId] = address; | ||
} | ||
exports.setMulticallAddress = setMulticallAddress; | ||
function getAddressForChainId(chainId) { | ||
var addresses = { | ||
1: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', | ||
4: '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821', | ||
42: '0x2cc8688c5f75e365aaeeb4ea8d6a480405a48d2a', | ||
100: '0xb5b692a88bdfc81ca69dcb1d924f59f0413a602a', | ||
1337: '0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e', | ||
}; | ||
return addresses[chainId]; | ||
return multicallAddresses[chainId]; | ||
} | ||
@@ -92,0 +96,0 @@ function getAddress(provider) { |
{ | ||
"name": "ethers-multicall", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Make multiple Ethereum network requests in a single HTTP query. ethcall for ethers v5.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24985
582