graph-node
graph-node copied to clipboard
Support for calling Ether Balances in mappings
Right now there is no way to call an ether balance of an account or a contract.
This functionality is very useful in protocols that use ether - this includes Uniswap and Compound, and likely also Dharma and Maker.
This might block me on Uniswap (figuring out if I can work around it right now). With compound we were able to get around it, because they added a getter function that allowed us to read the ether balance of their smart contracts.
It should return the Eth balance in WEI.
This would be super nice...is it still yet to be implemented?
yes still yet to be implemented :(
This is a must-have API. Quite surprising this is not yet available.
~~Are there any general purpose contracts available on all chains that lets you query the eth balance? Could be used as a workaround for this.~~
Edit: can use Multicall's getEthBalance()
: https://github.com/makerdao/multicall or https://github.com/mds1/multicall