mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-13 00:31:02 +00:00
implement address and msg.sender
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -907,10 +907,12 @@ impl FunctionCall {
|
||||
Ok(Some(arguments[0]))
|
||||
}
|
||||
|
||||
Name::Address | Name::Caller => {
|
||||
Ok(Some(context.integer_const(256, 0).as_basic_value_enum()))
|
||||
Name::Address => {
|
||||
revive_llvm_context::polkavm_evm_contract_context::address(context).map(Some)
|
||||
}
|
||||
Name::Caller => {
|
||||
revive_llvm_context::polkavm_evm_contract_context::caller(context).map(Some)
|
||||
}
|
||||
|
||||
Name::CallValue => revive_llvm_context::polkavm_evm_ether_gas::value(context).map(Some),
|
||||
Name::Gas => revive_llvm_context::polkavm_evm_ether_gas::gas(context).map(Some),
|
||||
Name::Balance => {
|
||||
|
||||
Reference in New Issue
Block a user