Skip to content

Commit

Permalink
change to abi.Unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
ququzone committed Mar 10, 2021
1 parent 5519c60 commit dd0b38a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions iotex/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ type Data struct {
}

// Unmarshal unmarshals data into a data holder object.
func (d Data) Unmarshal(v interface{}) (err error) {
v, err = d.abi.Unpack(d.method, d.Raw)
return
}
func (d Data) Unmarshal() ([]interface{}, error) { return d.abi.Unpack(d.method, d.Raw) }

type contract struct {
address address.Address
Expand All @@ -40,6 +37,7 @@ func (c *contract) Read(method string, args ...interface{}) ReadContractCaller {
sender: c.account.Address(),
}
}

func (c *contract) Execute(method string, args ...interface{}) ExecuteContractCaller {
return &executeContractCaller{
abi: c.abi,
Expand Down

0 comments on commit dd0b38a

Please sign in to comment.