We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code:
import { Provider } from 'ethers-multicall'; import { ethers } from 'ethers'; (async function() { const provider = new ethers.providers.JsonRpcProvider('http://localhost:8545/'); const ethcallProvider = new Provider(provider); await ethcallProvider.init(); const ganche_account_0 = '0x66aB6D9362d4F35596279692F0251Db635165871'; const ethBalance = await provider.getBalance(ganche_account_0); const [ethBalanceMulticall] = await ethcallProvider.all([ethcallProvider.getEthBalance(ganche_account_0)]); console.log('ETH Balance:', ethers.utils.formatUnits(ethBalance)); console.log('ETH Balance multicall:', ethers.utils.formatUnits(ethBalanceMulticall)); })()
Output:
ETH Balance: 100.0 ETH Balance multicall: 180143885.09481982
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code:
Output:
The text was updated successfully, but these errors were encountered: