From f06437e8f51130a2a5fe20a5205a15cec83ca2bd Mon Sep 17 00:00:00 2001 From: Manuel Bilbao Date: Wed, 10 Apr 2024 19:07:21 -0300 Subject: [PATCH] Add origin opcode --- system-contracts/contracts/EvmInterpreter.yul | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system-contracts/contracts/EvmInterpreter.yul b/system-contracts/contracts/EvmInterpreter.yul index 8aca049d4..65ba9d8f6 100644 --- a/system-contracts/contracts/EvmInterpreter.yul +++ b/system-contracts/contracts/EvmInterpreter.yul @@ -485,6 +485,11 @@ object "EVMInterpreter" { // TODO: Handle cold/warm slots and updates, etc for gas costs. evmGasLeft := chargeGas(evmGasLeft, 100) } + case 0x32 { // OP_ORIGIN + sp := pushStackItem(sp, origin()) + + evmGasLeft := chargeGas(evmGasLeft, 2) + } // NOTE: We don't currently do full jumpdest validation // (i.e. validating a jumpdest isn't in PUSH data) case 0x56 { // OP_JUMP