Skip to content
Snippets Groups Projects
Unverified Commit 766ab828 authored by Cyrill Leutwiler's avatar Cyrill Leutwiler Committed by GitHub
Browse files

[pallet-revive] Add balance_of syscyall for fetching foreign balances (#5675)


This adds an API method `balance_of`, corresponding to the
[BALANCE](https://www.evm.codes/#31?fork=cancun) EVM opcode.

In `Ext`, `balance` and `balance_of` are internally routed through the
same new `account_balance` method: `balance` is technically the same as
`balance_of` with the caller address. This avoids duplicating all the
tests and avoids a small inefficiency (in theory, `balance` directly
call `balance_of` however this introduces a round trip of converting the
target address to a H160 and back).

---------

Signed-off-by: default avatarCyrill Leutwiler <bigcyrill@hotmail.com>
Signed-off-by: default avatarxermicus <cyrill@parity.io>
Co-authored-by: command-bot <>
parent 8d0aab81
Branches
No related merge requests found
Pipeline #496922 waiting for manual action with stages
in 18 minutes and 10 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment