evm-opcodes
[![Build Status](https://travis-ci.org/Hyperdivision/evm-opcodes.svg?branch=master)](https://travis-ci.org/Hyperdivision/evm-opcodes)
Last updated 5 months ago by emilbayes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install evm-opcodes 
SYNC missed versions from official npm registry.

evm-opcodes

Build Status

Map of all EVM opcodes, mnemonic, inputs, outputs, expression and notes

Usage

const evmOpcodes = require('evm-opcodes')

const opcodes = new Map(evmOpcodes.map(o => [o.opcode, o]))
const mnemonic = new Map(evmOpcodes.map(o => [o.mnemonic, o]))

API

const opcodes = [opcodes...]

opcodes are objects of:

{
  opcode: Number, // Hex Opcode
  mnemonic: String, // Mnemonic from Yello Paper / EIPs
  inputs: [String...], // List of stack inputs with human readable names
  outputs: [String...], // List of stack outputs with human readable names
  expression: String, // Expression in pseudo code
  notes: String, // Human readable description of instruction behaviour
  byteLength: Number, // Instruction length in bytes (PUSH* > 1)
  terminal: Boolean, // Ends execution or not
  // Following properties are only present on relevant instructions
  readsMemory: [Number...], // List of `inputs` indexes affecting reads from memory
  writesMemory: [Number...], // List of `inputs` indexes affecting writes to memory
  readsStorage: [Number...], // List of `inputs` indexes affecting reads from storage
  writesStorage: [Number...] // List of `inputs` indexes affecting writes to storage
}

Information is enriched from https://ethervm.io/

Install

npm install evm-opcodes

License

ISC

Current Tags

  • 2.0.0                                ...           latest (5 months ago)

2 Versions

  • 2.0.0                                ...           5 months ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |