mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
19 lines
338 B
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
|
|
}
|