Opcode Differences
Modified Opcodes
Added Opcodes
Block Numbers and Timestamps
Block production is not constant
- On Ethereum, the
NUMBERopcode (block.numberin Solidity) corresponds to the current Ethereum block number. Similarly, in Lollipop,block.numbercorresponds to the current L2 block number. However, each transaction on L2 is placed in a separate block and blocks are NOT produced at a constant rate. - This is important because it means that
block.numberis currently NOT a reliable source of timing information. If you want access to the current time, you should useblock.timestamp(theTIMESTAMPopcode) instead.
Timestamps
- The
TIMESTAMPopcode (block.timestampin Solidity) uses the timestamp of the transaction itself.
Address Aliasing
- Because of the behaviour of the
CREATEopcode, a user can create a contract on L1 and on L2 that share the same address but have different bytecode. This can break trust assumptions because one contract may be trusted and another be untrusted (see below). - To prevent this problem, the behaviour of the
ORIGINandCALLERopcodes (tx.originandmsg.sender) differs slightly between L1 and L2. - The value of
tx.originis determined as follows:
- The value of
msg.senderat the top-level (the very first contract being called) is always equal totx.origin. Therefore, if the value oftx.originis affected by the rules defined above, the top-level value ofmsg.senderwill also be impacted.
In general, tx.origin should not be used for authorization (https://docs.soliditylang.org/en/latest/security-considerations.html#tx-origin). However, that is a separate issue from address aliasing because address aliasing also affects msg.sender.

