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:
xermicus
2024-06-05 10:34:53 +02:00
parent caa1228720
commit 68ec8be49f
@@ -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,