Add Error fields to RPC responses (#84)

Also add `Script` field to `InvokeResult` structure.
This commit is contained in:
Evgenii Stratonikov 2018-05-13 21:32:45 +03:00 committed by Anthony De Meulemeester
parent 1d9045877c
commit f69451d36d
2 changed files with 5 additions and 2 deletions

View file

@ -1 +1 @@
0.44.3
0.44.4

View file

@ -2,7 +2,8 @@ package rpc
type InvokeScriptResponse struct {
responseHeader
Result *InvokeResult
Error *Error `json:"error,omitempty"`
Result *InvokeResult `json:"result,omitempty"`
}
// InvokeResult represents the outcome of a script that is
@ -10,6 +11,7 @@ type InvokeScriptResponse struct {
type InvokeResult struct {
State string `json:"state"`
GasConsumed string `json:"gas_consumed"`
Script string `json:"script"`
Stack []*StackParam
}
@ -68,5 +70,6 @@ type responseHeader struct {
type response struct {
responseHeader
Error *Error `json:"error"`
Result interface{} `json:"result"`
}