1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-16 04:24:56 +02:00
thalos/abi/helpers.go

19 lines
338 B
Go

package abi
import (
"encoding/json"
eos "github.com/eoscanada/eos-go"
)
func DecodeAction(eos_ABI *eos.ABI, data []byte, actionName eos.ActionName) (interface{}, error) {
var v interface{}
bytes, err := eos_ABI.DecodeAction(data, actionName)
if err != nil {
return v, err
}
err = json.Unmarshal(bytes, &v)
return v, err
}