# @truffle/code-utils

> Utilities for parsing and managing EVM-compatible bytecode

Latest version **3.0.4** (published 2023-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @truffle/code-utils
pnpm add @truffle/code-utils
yarn add @truffle/code-utils
bun add @truffle/code-utils
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2023-09-07 |
| First published | 2019-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | ^16.20 \|\| ^18.16 \|\| >=20 |
| Dependencies | 1 |
| Unpacked size | 38.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13914 |
| Maintainers | rizedr, joshuafernandes, cliffoo, kevinbluer, gnidan, haltman, eggplantzzz, fainashalts, cds-amal |

## Links

- npm: https://www.npmjs.com/package/@truffle/code-utils
- Repository: https://github.com/trufflesuite/truffle
- Homepage: https://github.com/trufflesuite/truffle/tree/master/packages/code-utils#readme
- Issues: https://github.com/trufflesuite/truffle/issues
- npm.io page: https://npm.io/package/@truffle/code-utils

## Dependencies (1)

- [cbor](https://npm.io/package/cbor.md) ^5.2.0

## Recent versions

- 3.0.4 (latest) — 2023-09-07
- 1.2.17-next.0 (next) — 2020-07-09
- 1.3.0-tezos.1 (tezos) — 2020-04-07
- 1.2.14-alphaTez.9 (alphaTez) — 2020-02-13
- 1.2.11-micah.0 (micah) — 2019-11-08
- 1.3.0-ens-events.0 (ens-events) — 2019-09-27
- 3.0.3 — 2023-06-06
- 3.0.2 — 2023-02-17
- 3.0.1 — 2022-11-23
- 3.0.0 — 2022-09-22
- 2.0.1 — 2022-08-17
- 2.0.0 — 2022-08-10
- 1.2.34 — 2022-04-13
- 1.2.33 — 2022-04-08
- 1.2.32 — 2022-02-03
- … 48 more at https://npm.io/package/@truffle/code-utils/versions

## README

# @truffle/code-utils
Utilities for parsing and managing EVM-compatible bytecode

### Usage

```javascript
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);
```

---
_Source: https://npm.io/package/@truffle/code-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
