Skip to content

Commit

Permalink
ContractFunctionSelector and ContractFunctionParam Parity
Browse files Browse the repository at this point in the history
  • Loading branch information
janaakhterov committed Jan 9, 2020
1 parent 46b97e3 commit 7d7aaec
Show file tree
Hide file tree
Showing 6 changed files with 587 additions and 406 deletions.
308 changes: 0 additions & 308 deletions call_params.go

This file was deleted.

11 changes: 8 additions & 3 deletions contract_call_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ func (builder *ContractCallQuery) SetGas(gas uint64) *ContractCallQuery {
return builder
}

func (builder *ContractCallQuery) SetFunctionParameters(params CallParams) *ContractCallQuery {
builder.pb.FunctionParameters = params.Finish()
return builder
func (builder *ContractCallQuery) SetFunctionParameters(params ContractFunctionParams) (*ContractCallQuery, error) {
function, err := params.build(nil)
if err != nil {
return builder, err
}

builder.pb.FunctionParameters = function
return builder, nil
}

func (builder *ContractCallQuery) Execute(client *Client) (ContractFunctionResult, error) {
Expand Down
Loading

0 comments on commit 7d7aaec

Please sign in to comment.