implement self balance

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-09-09 09:40:24 +02:00
parent d77ee1e0d4
commit 2955f77772
10 changed files with 396 additions and 358 deletions
@@ -1159,7 +1159,9 @@ where
let address = arguments[0].into_int_value();
revive_llvm_context::polkavm_evm_ether_gas::balance(context, address).map(Some)
}
InstructionName::SELFBALANCE => todo!(),
InstructionName::SELFBALANCE => {
revive_llvm_context::polkavm_evm_ether_gas::self_balance(context).map(Some)
}
InstructionName::GASLIMIT => {
revive_llvm_context::polkavm_evm_contract_context::gas_limit(context).map(Some)