-
Notifications
You must be signed in to change notification settings - Fork 81
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
cli: improve VM CLI a bit more #2740
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67b5e12
to
54f8db1
Compare
Codecov Report
@@ Coverage Diff @@
## master #2740 +/- ##
==========================================
- Coverage 85.40% 85.23% -0.17%
==========================================
Files 324 324
Lines 40064 40080 +16
==========================================
- Hits 34217 34163 -54
- Misses 4494 4551 +57
- Partials 1353 1366 +13
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Closed
d84e66a
to
2fe8aad
Compare
2fe8aad
to
3b3be62
Compare
Share parameters parsing code between 'contract invokefunction' and 'vm run' commands. It allows VM CLI to parse more complicated parameter types including arrays and file-backed bytestrings.
3b3be62
to
0152db4
Compare
Share signers parsing code between 'contract invokefunction' and 'vm load*' commands, quite a useful thing when it comes to witness checks.
Load script from provided transaction if so.
Close #2606.
Usage message is shown on common --help command, thus it should be meaningful and short. If user needs more detailed command description, then he can use command-specific help. As a result, current VM help looks pretty simple: ``` NEO-GO-VM > help NAME: VM CLI - Official VM CLI for Neo-Go USAGE: [global options] command [command options] [arguments...] VERSION: 0.99.5-pre-15-g5463ec41 COMMANDS: exit Exit the VM prompt ip Show current instruction break Place a breakpoint jump Jump to the specified instruction (absolute IP value) estack Show evaluation stack contents istack Show invocation stack contents sslot Show static slot contents lslot Show local slot contents aslot Show arguments slot contents loadnef Load a NEF-consistent script into the VM optionally attaching to it provided signers with scopes loadbase64 Load a base64-encoded script string into the VM optionally attaching to it provided signers with scopes loadhex Load a hex-encoded script string into the VM optionally attaching to it provided signers with scopes loadgo Compile and load a Go file with the manifest into the VM optionally attaching to it provided signers with scopes loadtx Load transaction into the VM from chain or from parameter context file loaddeployed Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes reset Unload compiled script from the VM and reset context to proper (possibly, historic) state parse Parse provided argument and convert it into other possible formats run Execute the current loaded script cont Continue execution of the current loaded script step Step (n) instruction in the program stepinto Stepinto instruction to take in the debugger stepout Stepout instruction to take in the debugger stepover Stepover instruction to take in the debugger ops Dump opcodes of the current loaded program events Dump events emitted by the current loaded program env Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration) storage Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation changes Dump storage changes as is at the current stage of loaded script invocation help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --help, -h show help --version, -v print the version ```
1. UsageText shows the command usage rule. Fixed/added where needed. 2. Description shows the command description, huh. It is shown right after UsageText, so there's no need to repeat the command usage rule. If Description contains Example, then it should be printed on a new line.
0152db4
to
8b91428
Compare
roman-khimov
approved these changes
Oct 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #2729, close #2606.
(p *Parameter) ToStackItem()
.