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

feat(cli): add support for outputting .avm and .debug files from @neo-one/cli #2071

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

danwbyrne
Copy link
Contributor

@danwbyrne danwbyrne commented Jun 23, 2020

Issues

#2002 #2000

Description

Adds several new CLI flags for the neo-one compile command. These flags are:
--json - defaults to true, outputs a .contract.json and .neoone.abi.json.
--avm - defaults to false, outputs the contract bytecode as a .avm file and a compatible .abi.json file.
--opcodes - defaults to false, outputs a .avm.txt of disassembled bytecode from the .avm file.
--debug - defaults to false, if json is specified outputs the uncompressed .debug.json. If avm is specified outputs the compressed .avmdbgnfo.

Testing

If you have a contract/neo-one config you can build this and run:

node packages/neo-one-cli/bin/neo-one.js compile

against your test contract(s) with the various flags.

Further Work

While we are able to output .avm and .abi files now there is still some work to be done in integrating with the neo toolkit. See #2113 for more information

Copy link
Collaborator

@spencercorwin spencercorwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try to output something better for the id and entrypoint properties. Maybe by looking at what the debugger uses them for and then just creating something to fit that purpose? Idk. We should discuss more over VC.

We should update the compile e2e test for this too. Which should be very easy. I can do it in a separate PR if you want since I wrote that test originally.

packages/neo-one-cli/src/compile/writeContract.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/compile/writeContract.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/compile/writeContract.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/compile/writeContract.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/compile/writeContract.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/cmd/compile.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/cmd/compile.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/cmd/compile.ts Outdated Show resolved Hide resolved
@danwbyrne danwbyrne force-pushed the debugger branch 2 times, most recently from 3eb6964 to 82ce408 Compare June 25, 2020 20:42
packages/neo-one-cli/src/cmd/compile.ts Outdated Show resolved Hide resolved
packages/neo-one-cli/src/__e2e__/cmd/build.test.ts Outdated Show resolved Hide resolved
packages/neo-one-build-tests/environments/e2e/jestSetup.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

❗ No coverage uploaded for pull request head (debugger@2397010). Click here to learn what that means.
The diff coverage is n/a.

@danwbyrne danwbyrne force-pushed the debugger branch 2 times, most recently from 01038fd to 3fccc93 Compare July 21, 2020 20:11
@danwbyrne danwbyrne changed the title feat(cli): add initial debug support for the neo dev toolkit feat(cli): add support for outputting .avm and .debug files from @neo-one/cli Jul 21, 2020
@danwbyrne danwbyrne force-pushed the debugger branch 4 times, most recently from 5cc5a50 to 0aa817c Compare July 21, 2020 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants