Anna Shaleva
d09a0c18a7
cli: unify signers parsing
...
Share signers parsing code between 'contract invokefunction' and
'vm load*' commands, quite a useful thing when it comes to witness
checks.
2022-10-13 16:07:34 +03:00
Anna Shaleva
7eb87afab8
cli: unify parameters parsing
...
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.
2022-10-13 08:20:27 +03:00
Anna Shaleva
3fba4e4f17
cli: support 'loaddeployed' VM CLI command
2022-10-12 14:57:13 +03:00
Anna Shaleva
9977606e40
cli: support 'loadtx' VM CLI command
2022-10-12 14:57:10 +03:00
Anna Shaleva
343ce4d4bb
cli: properly cleanup state-dependand VM CLI
...
Close #2736 .
2022-10-10 08:26:22 +03:00
Roman Khimov
4d2afa2624
cli/vm: use ParseInt to properly (and easily) check for int32
2022-10-07 17:10:04 +03:00
Anna Shaleva
eac5e1526e
cli: rename VMCLI to CLI
2022-10-07 15:57:33 +03:00
Anna Shaleva
16f5ae3812
cli: add upper bound check for contract ID for 'storage' VM CLI cmd
2022-10-07 15:57:33 +03:00
Anna Shaleva
95cbddf19e
cli: use custom logger to filter out runtime.Log messages
...
```
anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ ./bin/neo-go vm -p
_ ____________ __________ _ ____ ___
/ | / / ____/ __ \ / ____/ __ \ | | / / |/ /
/ |/ / __/ / / / /_____/ / __/ / / /____| | / / /|_/ /
/ /| / /___/ /_/ /_____/ /_/ / /_/ /_____/ |/ / / / /
/_/ |_/_____/\____/ \____/\____/ |___/_/ /_/
NEO-GO-VM > loadgo ./1-print/1-print.go
READY: loaded 21 instructions
NEO-GO-VM 0 > run
2022-10-07T15:28:20.461+0300 INFO runtime log {"tx": "", "script": "db03ceb3f672ee8cd0d714989b4d103ff7eed2f3", "msg": "Hello, world!"}
[]
```
2022-10-07 15:57:33 +03:00
Anna Shaleva
b3c8192d2e
cli: add 'changes' command for VM CLI
2022-10-07 15:57:31 +03:00
Anna Shaleva
cac4f6a4a6
cli: allow to dump storage diff for 'storage' VM CLI command
2022-10-07 15:56:34 +03:00
Anna Shaleva
8c78177806
vm: add 'storage' VM CLI command to dump storage items
...
Another nice one, very useful for debugging.
2022-10-07 15:56:34 +03:00
Anna Shaleva
ff03c33e6d
vm: allow historic calls inside VM CLI
2022-10-07 15:56:34 +03:00
Anna Shaleva
79e13f73d8
core, rpc: move getFakeNextBlock to Blockchain
...
It's needed for VM CLI as far and may be improved later.
2022-10-07 15:56:34 +03:00
Anna Shaleva
0036c89d63
vm: add 'env' command showing state of the blockchain-backed VM CLI
...
A useful one.
2022-10-07 15:56:34 +03:00
Anna Shaleva
f1ecdb82cc
vm: add 'events' command to VM CLI
...
And dump events automatically after HALTed or FAULTed end of execution.
2022-10-07 15:56:34 +03:00
Anna Shaleva
33ae8d0ddc
vm: clear manifest on VM CLI reset
...
Fix the bug when outdated manifest was stored after new program was loaded.
2022-10-07 15:56:34 +03:00
Anna Shaleva
513821cfff
vm: allow to provide state for VM CLI
...
Close #2528 .
Also, add new simple testchain as an analogue for basicchain.
2022-10-07 15:56:34 +03:00
Anna Shaleva
0b717b0c22
vm: move vm CLI to cli/vm package
2022-10-07 15:56:34 +03:00
Anna Shaleva
c4c93b591e
cli: remove debug flag from VM CLI
...
It's not used.
2022-10-06 14:01:56 +03:00
Roman Khimov
1518019be8
cli: add excessive arguments checks
...
Some commands don't accept arguments, but users try giving them and don't
notice a mistake. It's a bit more user-friendly to tell the user that there is
something wrong with the way he tries to use the command.
2022-08-05 15:50:12 +03:00
Anna Shaleva
563c3a4baa
vm: replace ishell with urfave/cli
...
Use github.com/chzyer/readline for readline capabilities (including
history and ANSI escape sequences handling).
2022-02-18 16:34:50 +03:00
Evgeniy Stratonikov
f6176b30f2
cli: support escape codes
2021-02-11 16:06:11 +03:00
Roman Khimov
e41d434a49
*: move all packages from CityOfZion to nspcc-dev
2020-03-03 17:21:42 +03:00
Roman Khimov
e319c6c638
cli: move avm inspect from vm to contract command
...
Make inspect work with avms by default and with go files if told so. In the
end this makes our CLI interface more consistent and usable. Drop useless
CompileAndInspect() compiler method along the way.
2019-10-29 12:56:44 +03:00
Roman Khimov
3cbb699eb7
Merge pull request #426 from nspcc-dev/logger_247
...
Change fmt.Println to log, close #247 .
2019-10-22 14:41:30 +03:00
Vsevolod Brekelov
e2bfff8666
vm: removed mute mode and pushed logging to upper lvl
...
VM should be responsible for code execution and in case anyone interested in additional logging or errors they could handle them like we do it iin cli.
2019-10-22 13:44:14 +03:00
Roman Khimov
dafd385f57
cli: extend NewCommand() to NewCommands()
...
So that each module could now return an array of commands. It's gonna be used
in the future to extend them.
2019-10-19 23:58:45 +03:00
Roman Khimov
dca332f333
vm: use new Context.Next() to properly dump programs
...
Fix #295 , deduplicate code and add `inspect` parameter to the vm command to
dump AVMs (`contract inspect` works with Go code).
2019-10-04 16:13:39 +03:00
Anthony De Meulemeester
931388b687
Cross platform virtual machine implementation ( #60 )
...
* Virtual machine for the NEO blockhain.
* fixed big.Int numeric operation pointer issue.
* added appcall
* Added README for vm package.
* removed main.go
* started VM cli (prompt) integration
* added support for printing the stack.
* moved cli to vm package
* fixed vet errors
* updated readme
* added more test for VM and fixed some edge cases.
* bumped version -> 0.37.0
2018-03-30 18:15:06 +02:00