Skip to main content

Opcodes

All opcodes are supported in UniFi and are EVM equivalent unless stated otherwise.

Modified Opcodes

OpcodeNameSolidity EquivalentRollup BehaviourEthereum L1 Behaviour
32ORIGINtx.originIf the transaction is an L1 ⇒ L2 transaction triggered by a smart contract on L1, then tx.origin is set to the aliased address of the address that triggered the L1 ⇒ L2 transaction. Otherwise, this opcode behaves normally.Get execution origination address
33CALLERmsg.senderIf the transaction is an L1 ⇒ L2 transaction triggered by a smart contract on L1, and this is the first call frame (rather than an internal transaction from one contract to another), the same address aliasing behavior applies.Get caller address
41COINBASEblock.coinbaseReturns the address of the L2 block proposerGets the block's beneficiary address
42TIMESTAMPblock.timestampTimestamp of the L2 blockTimestamp of the L1 block
43NUMBERblock.numberL2 block numberGets the L1 block number
44PREVRANDAOblock.prevrandaoReturns the PREVRANDAO (the most recent RANDAO) value of L1 at the current L1 origin blockReturns the output of the randomness beacon provided by the beacon chain
49BLOBHASHblobhash(index)N/AGet versioned hashes
4ABLOBBASEFEEblock.blobasefeeReturns 1Returns the value of the blob base-fee of the current block