cli, compiler: switch from .avm to .nef
We don't generate clear .avm instructions anymore. Instead, use .nef files with additional metadata.
This commit is contained in:
parent
6b8957243a
commit
c7746da023
6 changed files with 67 additions and 33 deletions
|
@ -37,17 +37,17 @@ functionality as Neo .net Framework library.
|
|||
./bin/neo-go contract compile -i mycontract.go
|
||||
```
|
||||
|
||||
By default the filename will be the name of your .go file with the .avm extension, the file will be located in the same directory where your Go contract is. If you want another location for your compiled contract:
|
||||
By default the filename will be the name of your .go file with the .nef extension, the file will be located in the same directory where your Go contract is. If you want another location for your compiled contract:
|
||||
|
||||
```
|
||||
./bin/neo-go contract compile -i mycontract.go --out /Users/foo/bar/contract.avm
|
||||
./bin/neo-go contract compile -i mycontract.go --out /Users/foo/bar/contract.nef
|
||||
```
|
||||
|
||||
### Debugging
|
||||
You can dump the opcodes generated by the compiler with the following command:
|
||||
|
||||
```
|
||||
./bin/neo-go contract inspect -i mycontract.go
|
||||
./bin/neo-go contract inspect -i mycontract.go -c
|
||||
```
|
||||
|
||||
This will result in something like this:
|
||||
|
@ -116,7 +116,7 @@ Toolkit](https://github.com/neo-project/neo-blockchain-toolkit/). To do that
|
|||
you need to generate debug information using `--debug` option, like this:
|
||||
|
||||
```
|
||||
$ ./bin/neo-go contract compile -i contract.go -o contract.avm --debug contract.debug.json
|
||||
$ ./bin/neo-go contract compile -i contract.go -o contract.nef --debug contract.debug.json
|
||||
```
|
||||
|
||||
This file can then be used by debugger and set up to work just like for any
|
||||
|
@ -144,7 +144,7 @@ project:
|
|||
It's passed to the `deploy` command via `-c` option:
|
||||
|
||||
```
|
||||
$ ./bin/neo-go contract deploy -i contract.avm -c contract.yml -r http://localhost:20331 -w wallet.json -g 0.001
|
||||
$ ./bin/neo-go contract deploy -i contract.nef -c contract.yml -r http://localhost:20331 -w wallet.json -g 0.001
|
||||
```
|
||||
|
||||
Deployment works via an RPC server, an address of which is passed via `-r`
|
||||
|
@ -163,7 +163,7 @@ deployment with neo-go. It's done in the same step with compilation via
|
|||
support the command line will look like this:
|
||||
|
||||
```
|
||||
$ ./bin/neo-go contract compile -i contract.go --config contract.yml -o contract.avm --debug contract.debug.json --abi contract.abi.json
|
||||
$ ./bin/neo-go contract compile -i contract.go --config contract.yml -o contract.nef --debug contract.debug.json --abi contract.abi.json
|
||||
```
|
||||
|
||||
This file can then be used by toolkit to deploy contract the same way
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue