crytic / evm-opcodes Goto Github PK
View Code? Open in Web Editor NEWEthereum opcodes and instruction reference
License: Apache License 2.0
Ethereum opcodes and instruction reference
License: Apache License 2.0
Some pending instructions not implemented by any eth clients (such as JUMPTO) are current listed in the main table. There are also instructions like SSTOREBYTES references in ethereum/EIPs#97 that are not actually implemented. These should be split into a separate tables
maybe it's caused by typo
btw, i think the gas of 0x0a should be "depend on byte size of exponent"
After EIP-2929 (https://eips.ethereum.org/EIPS/eip-2929) gas cost for the BALANCE opcode is increased to 2600 unless the address is already accessed by the transaction
It seems that EIP 615 specifies
0xb0 JUMPTO
0xb1 JUMPIF
0xb2 JUMPV
0xb3 JUMPSUB
0xb4 JUMPSUBV
0xb5 BEGINSUB
0xb6 BEGINDATA
0xb7 RETURNSUB
0xb8 PUTLOCAL
0xb9 GETLOCAL
Which doesn't quite gel with your list aroudn 0xb2.
It would be beneficial to add explanation on the usage of asterisks on this repo
On the gas column, the gas specification has a [NUMBER]*
โ like SSTORE
uses 20000**
units of gas. I'm guessing that the *
is differentiating warm/cold accesses, but it would be helpful to specify exactly what it refers to.
It would be useful to know which EIP is responsible for each instruction and also which fork/block number the instructions became valid
Recently two more opcodes have been introduced, via EIP1153. TSTORE and TLOAD. We should add them here.
Edit: PUSH0(0x5f) is also missing.
(node:3067) UnhandledPromiseRejectionWarning: RangeError: Maximum BigInt size exceeded
at eval (eval at <anonymous> (/tmp/test/node_modules/evm/lib/EVM.node.js:1:12359), <anonymous>:1:9)
at NativeBigInt.pow (/tmp/test/node_modules/evm/lib/EVM.node.js:1:12653)
at Object.d.default [as EXP] (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10281826)
at g.parse (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273112)
at Object.d.default [as JUMPI] (/tmp/test/node_modules/evm/lib/EVM.node.js:1:6408475)
at g.parse (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273112)
at Object.d.default [as JUMPI] (/tmp/test/node_modules/evm/lib/EVM.node.js:1:6408475)
at g.parse (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273112)
at Object.d.default [as JUMPI] (/tmp/test/node_modules/evm/lib/EVM.node.js:1:6408517)
at g.parse (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273112)
at Object.d.default [as JUMPI] (/tmp/test/node_modules/evm/lib/EVM.node.js:1:6408475)
at g.parse (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273112)
at g.decompile (/tmp/test/node_modules/evm/lib/EVM.node.js:1:10273172)
at web3.eth.getCode.then.code (/tmp/test/index.js:9:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
To reproduce:
const { EVM } = require("evm");
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.HttpProvider("https://goerli.prylabs.net"));
web3.eth.getCode("0xB880162F8b188E9D7b075081f6E38fc3657ae10e").then(code => { /* ETH2 deposit contract */
const evm = new EVM(code);
console.log(evm.getFunctions()); /* Get functions */
console.log(evm.getEvents()); /* Get events */
console.log(evm.decompile()); /* Decompile bytecode */
});
Several instructions have imprecise gas information. https://github.com/djrtwo/evm-opcode-gas-costs/blob/master/opcode-gas-costs_EIP-150_revision-1e18248_2017-04-12.csv has collected more accurate information
I think it should be invalid/unused.
Could the list of EVM opcodes also include the number of parameters needed by each opcode if any? Similar to the Ethereum Yellow paper.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.