Skip to content

Latest commit

 

History

History
97 lines (85 loc) · 1.19 KB

notes.org

File metadata and controls

97 lines (85 loc) · 1.19 KB

YUL model

YUL ops

care

add(x, y) sub(x, y) mul(x, y) div(x, y) sdiv(x, y) mod(x, y) smod(x, y) exp(x, y) not(x) lt(x, y) gt(x, y) slt(x, y) sgt(x, y) eq(x, y) iszero(x) and(x, y) or(x, y) xor(x, y) byte(n, x) shl(x, y) shr(x, y) sar(x, y) addmod(x, y, m) mulmod(x, y, m) signextend(i, x) keccak256(p, n)

mload(p) mstore(p, v) mstore8(p, v) sload(p) sstore(p, v) tstore(p, v) msize()

calldataload(p) calldatasize() – this we cannot??? calldatacopy(t, f, s)

mcopy(t, f, s)

return(p, s) revert(p, s) invalid()

staticcall(g, a, in, insize, out, outsize)

don’t care

log0(p, s) log1(p, s, t1) log2(p, s, t1, t2) log3(p, s, t1, t2, t3) log4(p, s, t1, t2, t3, t4) chainid() basefee() blobbasefee() origin() gasprice() blockhash(b) blobhash(i) coinbase() timestamp() number() difficulty() prevrandao() gaslimit() stop() pc() pop(x) gas()

address() balance(a) selfbalance() caller() callvalue()

codesize() codecopy(t, f, s) extcodesize(a)

extcodecopy(a, t, f, s) returndatasize() returndatacopy(t, f, s)

extcodehash(a) create(v, p, n) create2(v, p, n, s) call(g, a, v, in, insize, out, outsize) callcode(g, a, v, in, insize, out, outsize) delegatecall(g, a, in, insize, out, outsize)

selfdestruct(a)