Skip to content

Commit

Permalink
Add origin opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelBilbao committed Apr 10, 2024
1 parent fa36d6c commit f06437e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions system-contracts/contracts/EvmInterpreter.yul
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f06437e

Please sign in to comment.