https://github.com/vaporyjs/vap-bin-to-ops
Simple tool for parsing EVM bytecode into opcodes
https://github.com/vaporyjs/vap-bin-to-ops
opcodes
Last synced: 4 months ago
JSON representation
Simple tool for parsing EVM bytecode into opcodes
- Host: GitHub
- URL: https://github.com/vaporyjs/vap-bin-to-ops
- Owner: vaporyjs
- Created: 2018-03-04T04:42:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T13:59:42.000Z (over 2 years ago)
- Last Synced: 2025-01-14T11:58:10.045Z (5 months ago)
- Topics: opcodes
- Language: JavaScript
- Homepage: https://vapory.org
- Size: 83 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### vap-bin-to-ops
Simple tool for parsing EVM bytecode into opcodes.
The primary difference from the raw code is that inline PUSH data is attached to the opcode metadata.example:
```js
const binToOps = require('./index.js')var data = new Buffer('6107608061000e600039', 'hex')
console.log(binToOps(data))
```gives you:
```js
[ { name: 'PUSH2',
fee: 3,
in: 0,
out: 1,
dynamic: false,
async: undefined,
pc: 0,
pushData: },
{ name: 'DUP1',
fee: 3,
in: 0,
out: 1,
dynamic: false,
async: undefined,
pc: 3 },
{ name: 'PUSH2',
fee: 3,
in: 0,
out: 1,
dynamic: false,
async: undefined,
pc: 4,
pushData: },
{ name: 'PUSH1',
fee: 3,
in: 0,
out: 1,
dynamic: false,
async: undefined,
pc: 7,
pushData: },
{ name: 'CODECOPY',
fee: 3,
in: 3,
out: 0,
dynamic: false,
async: undefined,
pc: 9 } ]
```