Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Vyper cbor auxdata in bytecode-utils and in VyperCheckedContract #1783

Merged
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,26 @@
"console": "integratedTerminal"
// "internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Mocha - bytecode-utils",
"cwd": "${workspaceFolder}/packages/bytecode-utils",
"program": "${workspaceRoot}/node_modules/.bin/mocha",
"args": [
"-r",
"ts-node/register",
"./test/**/*.spec.ts",
"--no-timeout",
// Run a single test when debugging
// "--grep=v0.6.12",
"--exit"
],
"sourceMaps": true,
"smartStep": true,
"console": "integratedTerminal"
// "internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
Expand Down
5 changes: 4 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/bytecode-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ yarn add @ethereum-sourcify/bytecode-utils
## Usage

```ts
import { decode } from "@ethereum-sourcify/bytecode-utils";
import { decode, AuxdataStyle } from "@ethereum-sourcify/bytecode-utils";

const bytecodeRaw = "0x60806040526004361061003f5760003560e01...7265206c656e677468a2646970667358221220dceca8706b29e917dacf25fceef95acac8d90d765ac926663ce4096195952b6164736f6c634300060b0033"

decode(bytecodeRaw);
decode(bytecodeRaw, AuxdataStyle.SOLIDITY);
```

### Result
Expand Down
3 changes: 2 additions & 1 deletion packages/bytecode-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"@ethersproject/bytes": "5.7.0",
"base-x": "4.0.0",
"bs58": "5.0.0",
"cbor-x": "1.6.0"
"cbor-x": "1.6.0",
"semver": "^7.6.3"
},
"devDependencies": {
"@types/chai": "4.3.20",
Expand Down
Loading