mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 06:48:03 +00:00
Implement the PUSHDEPLOYADDRESS instruction.
Introduction and raison d'être in solc: https://github.com/ethereum/solidity/pull/3203 TL;DR: Exists to guard libraries from being called directly. Hence we substitute PUSHDEPLOYADDRESS (the zero address) via a call to the address API to let the library constructor fetch its own address. In the zkSync target they do exactly the same. Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -168,7 +168,9 @@ where
|
||||
crate::evmla::assembly::instruction::stack::push(context, value).map(Some)
|
||||
}
|
||||
}
|
||||
InstructionName::PUSHDEPLOYADDRESS => todo!(),
|
||||
InstructionName::PUSHDEPLOYADDRESS => {
|
||||
revive_llvm_context::polkavm_evm_contract_context::address(context).map(Some)
|
||||
}
|
||||
|
||||
InstructionName::DUP1 => crate::evmla::assembly::instruction::stack::dup(
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user