Code Monkey home page Code Monkey logo

vevm's Introduction

vEVM

example

https://goerli-optimism.etherscan.io/address/0x745470FD2569845798fD48d010cDAE0e77229af9

await evm.execute("0x60016002600360040160005260206000F3");

returns

struct vEVMState {
	uint256 pc;
	bytes32[] stack;
	bytes mem;
	uint256 msize;
	bytes32[] storageKey;
	bytes32[] storageData;
	bytes output;
	bool running;
	bool reverting;
}

0x00 range - arithmetic ops

Mnemonic OpCode Status
STOP 0x0 Done
ADD 0x1 Done
MUL 0x2 Done
SUB 0x3 Done
DIV 0x4 Done
SDIV 0x5 Done
MOD 0x6 Done
SMOD 0x7 Done
ADDMOD 0x8 Done
MULMOD 0x9 Done
EXP 0xa Done
SIGNEXTEND 0xb

0x10 range - comparison ops

Mnemonic OpCode Status
LT 0x10 Done
GT 0x11 Done
SLT 0x12 Done
SGT 0x13 Done
EQ 0x14 Done
ISZERO 0x15 Done
AND 0x16 Done
OR 0x17 Done
XOR 0x18 Done
NOT 0x19 Done
BYTE 0x1a Done
SHL 0x1b Done
SHR 0x1c Done
SAR 0x1d

0x20 range - crypto

Mnemonic OpCode Status
SHA3 0x20 Done

0x30 range - closure state

Mnemonic OpCode Status
ADDRESS 0x30 Done
BALANCE 0x31 Done
ORIGIN 0x32 Done
CALLER 0x33 Done
CALLVALUE 0x34 Done
CALLDATALOAD 0x35
CALLDATASIZE 0x36
CALLDATACOPY 0x37
CODESIZE 0x38 Done
CODECOPY 0x39
GASPRICE 0x3a Done
EXTCODESIZE 0x3b Done
EXTCODECOPY 0x3c
RETURNDATASIZE 0x3d
RETURNDATACOPY 0x3e
EXTCODEHASH 0x3f

0x40 range - block operations

Mnemonic OpCode Status
BLOCKHASH 0x40 Done
COINBASE 0x41 Done
TIMESTAMP 0x42 Done
NUMBER 0x43 Done
DIFFICULTY 0x44
RANDOM 0x44
PREVRANDAO 0x44
GASLIMIT 0x45
CHAINID 0x46 Done
SELFBALANCE 0x47 Done
BASEFEE 0x48 Done

0x50 range - 'storage' and execution

Mnemonic OpCode Status
POP 0x50 Done
MLOAD 0x51 Done
MSTORE 0x52 Done
MSTORE8 0x53 Done
SLOAD 0x54 Done
SSTORE 0x55 Done
JUMP 0x56 Done
JUMPI 0x57 Done
PC 0x58 Done
MSIZE 0x59 Done
GAS 0x5a
JUMPDEST 0x5b Done
PUSH0 0x5f

0x60 range - pushes

Mnemonic OpCode Status
PUSH1 0x60 Done
PUSH2 0x61 Done
PUSH3 0x62 Done
PUSH4 0x63 Done
PUSH5 0x64 Done
PUSH6 0x65 Done
PUSH7 0x66 Done
PUSH8 0x67 Done
PUSH9 0x68 Done
PUSH10 0x69 Done
PUSH11 0x6a Done
PUSH12 0x6b Done
PUSH13 0x6c Done
PUSH14 0x6d Done
PUSH15 0x6e Done
PUSH16 0x6f Done
PUSH17 0x70 Done
PUSH18 0x71 Done
PUSH19 0x72 Done
PUSH20 0x73 Done
PUSH21 0x74 Done
PUSH22 0x75 Done
PUSH23 0x76 Done
PUSH24 0x77 Done
PUSH25 0x78 Done
PUSH26 0x79 Done
PUSH27 0x7a Done
PUSH28 0x7b Done
PUSH29 0x7c Done
PUSH30 0x7d Done
PUSH31 0x7e Done
PUSH32 0x7f Done

0x80 range - dups

Mnemonic OpCode Status
DUP1 0x80 Done
DUP2 0x81 Done
DUP3 0x82 Done
DUP4 0x83 Done
DUP5 0x84 Done
DUP6 0x85 Done
DUP7 0x86 Done
DUP8 0x87 Done
DUP9 0x88 Done
DUP10 0x89 Done
DUP11 0x8a Done
DUP12 0x8b Done
DUP13 0x8c Done
DUP14 0x8d Done
DUP15 0x8e Done
DUP16 0x8f Done

0x90 range - swaps

Mnemonic OpCode Status
SWAP1 0x90 Done
SWAP2 0x91 Done
SWAP3 0x92 Done
SWAP4 0x93 Done
SWAP5 0x94 Done
SWAP6 0x95 Done
SWAP7 0x96 Done
SWAP8 0x97 Done
SWAP9 0x98 Done
SWAP10 0x99 Done
SWAP11 0x9a Done
SWAP12 0x9b Done
SWAP13 0x9c Done
SWAP14 0x9d Done
SWAP15 0x9e Done
SWAP16 0x9f Done

0xa0 range - logging ops

Mnemonic OpCode Status
LOG0 0xa0 Done
LOG1 0xa1 Done
LOG2 0xa2 Done
LOG3 0xa3 Done
LOG4 0xa4 Done

0xb0 range

Mnemonic OpCode Status
TLOAD 0xb3
TSTORE 0xb4

0xf0 range - closures

Mnemonic OpCode Status
CREATE 0xf0
CALL 0xf1
CALLCODE 0xf2
RETURN 0xf3 Done
DELEGATECALL 0xf4
CREATE2 0xf5
STATICCALL 0xfa
REVERT 0xfd
INVALID 0xfe
SELFDESTRUCT 0xff Done

vevm's People

Contributors

kethcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.