implement address and msg.sender

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-05-08 16:10:48 +02:00
parent ea63991617
commit 864e40901f
6 changed files with 58 additions and 10 deletions
@@ -1134,8 +1134,12 @@ where
.map(Some)
}
InstructionName::ADDRESS => todo!(),
InstructionName::CALLER => todo!(),
InstructionName::ADDRESS => {
revive_llvm_context::polkavm_evm_contract_context::address(context).map(Some)
}
InstructionName::CALLER => {
revive_llvm_context::polkavm_evm_contract_context::caller(context).map(Some)
}
InstructionName::CALLVALUE => {
revive_llvm_context::polkavm_evm_ether_gas::value(context).map(Some)