Return

STOP

Original EVM instruction.

This instruction is a RETURN with an empty data payload.

LLVM IR

The same as for RETURN.

RETURN

Original EVM instruction.

This instruction works differently in deploy code. For more information, see the ZKsync Era documentation.

LLVM IR

define void @__return(i256 %0, i256 %1, i256 %2) "noinline-oz" #5 personality i32()* @__personality {
entry:
  %abi = call i256@__aux_pack_abi(i256 %0, i256 %1, i256 %2)
  tail call void @llvm.syncvm.return(i256 %abi)
  unreachable
}

REVERT

Original EVM instruction.

LLVM IR

define void @__revert(i256 %0, i256 %1, i256 %2) "noinline-oz" #5 personality i32()* @__personality {
entry:
  %abi = call i256@__aux_pack_abi(i256 %0, i256 %1, i256 %2)
  tail call void @llvm.syncvm.revert(i256 %abi)
  unreachable
}

EraVM

See also EraVM instruction revert: when returning from near calls and when returning from far calls.

INVALID

Original EVM instruction.

This instruction is a REVERT with an empty data payload, but it also burns all available gas.

LLVM IR

The same as for REVERT.

EraVM

See also EraVM instruction revert: when returning from near calls and when returning from far calls.