diff --git a/pkg/rpc/request/txBuilder.go b/pkg/rpc/request/txBuilder.go index 044db0b2e..e98afec8f 100644 --- a/pkg/rpc/request/txBuilder.go +++ b/pkg/rpc/request/txBuilder.go @@ -97,7 +97,7 @@ func ExpandArrayIntoScript(script *io.BinWriter, slice []Param) error { return fmt.Errorf("parameter type %v is not supported", fp.Type) } } - return nil + return script.Err } // CreateFunctionInvocationScript creates a script to invoke given contract with diff --git a/pkg/rpc/request/tx_builder_test.go b/pkg/rpc/request/tx_builder_test.go index b5d056667..62ae926d1 100644 --- a/pkg/rpc/request/tx_builder_test.go +++ b/pkg/rpc/request/tx_builder_test.go @@ -135,6 +135,10 @@ func TestExpandArrayIntoScript(t *testing.T) { { {RawMessage: []byte(`{"type": "Array", "value": null}`)}, }, + { + {RawMessage: []byte(`{"type": "Integer", "value": "` + + new(big.Int).Lsh(big.NewInt(1), 255).String() + `"}`)}, + }, } for _, c := range errorCases { script := io.NewBufBinWriter()