forked from TrueCloudLab/neoneo-go
docs: initial RPC wrapper generator doc
This commit is contained in:
parent
3fba1dd8cf
commit
3b635164b7
1 changed files with 13 additions and 0 deletions
|
@ -434,6 +434,19 @@ $ ./bin/neo-go contract compile -i contract.go --config contract.yml -o contract
|
||||||
$ ./bin/neo-go contract generate-wrapper --manifest manifest.json --config contract.bindings.yml --out wrapper.go --hash 0x1b4357bff5a01bdf2a6581247cf9ed1e24629176
|
$ ./bin/neo-go contract generate-wrapper --manifest manifest.json --config contract.bindings.yml --out wrapper.go --hash 0x1b4357bff5a01bdf2a6581247cf9ed1e24629176
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Generating RPC contract bindings
|
||||||
|
To simplify interacting with the contract via RPC you can generate
|
||||||
|
contract-specific RPC bindings with the "generate-rpcwrapper" command. At the
|
||||||
|
moment it only works for safe (read-only) methods. If your contract is NEP-11
|
||||||
|
or NEP-17 that's autodetected and an appropriate package is included as
|
||||||
|
well. Notice that the type data available in the manifest is limited, so in
|
||||||
|
some cases the interface generated may use generic stackitem types. Iterators
|
||||||
|
are not supported yet.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./bin/neo-go contract generate-rpcwrapper --manifest manifest.json --out rpcwrapper.go --hash 0x1b4357bff5a01bdf2a6581247cf9ed1e24629176
|
||||||
|
```
|
||||||
|
|
||||||
## Smart contract examples
|
## Smart contract examples
|
||||||
|
|
||||||
Some examples are provided in the [examples directory](../examples). For more
|
Some examples are provided in the [examples directory](../examples). For more
|
||||||
|
|
Loading…
Reference in a new issue