@truffle/code-utils
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

@truffle/code-utils

Utilities for parsing and managing EVM-compatible bytecode

Usage

const { parseCode } = require("@truffle/code-utils");

const contractHexCode = "0x608060...";

// parseCode returns an array of instructions
// Ex.
// [ { pc: 0, name: 'PUSH1', pushData: '0x80' },
//   { pc: 2, name: 'PUSH1', pushData: '0x40' },
//   ... ]
const parsedCode = parseCode(contractHexCode);

Keywords

none

Install

npm i @truffle/code-utils

DownloadsWeekly Downloads

16,570

Version

3.0.2

License

MIT

Unpacked Size

39.4 kB

Total Files

19

Last publish

Collaborators

  • cliffoo
  • kevinbluer
  • gnidan
  • haltman
  • eggplantzzz
  • fainashalts
  • cds-amal