graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Support for calling Ether Balances in mappings

Open davekaj opened this issue 5 years ago • 3 comments

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.

davekaj avatar Apr 26 '19 16:04 davekaj

This would be super nice...is it still yet to be implemented?

coffee-converter avatar Dec 17 '20 20:12 coffee-converter

yes still yet to be implemented :(

davekaj avatar Dec 18 '20 01:12 davekaj

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

sebastiantf avatar Aug 04 '22 18:08 sebastiantf