1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-20 09:56:47 +02:00

abi.go: move DecodeAction to ship_processor.

This commit is contained in:
Henrik Hautakoski 2023-01-12 16:33:06 +01:00
parent 9c3bd1e879
commit 0ded3ee6fe
2 changed files with 14 additions and 13 deletions

12
abi.go
View file

@ -41,15 +41,3 @@ func GetAbi(account eos.AccountName) (*eos.ABI, error) {
}
return abi, nil
}
func DecodeAction(abi *eos.ABI, data []byte, actionName eos.ActionName) (interface{}, error) {
var v interface{}
bytes, err := abi.DecodeAction(data, actionName)
if err != nil {
return v, err
}
err = json.Unmarshal(bytes, &v)
return v, err
}