1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-18 04:40:03 +02:00

api/message/types.go: Change ActionTrace.Data to a byte slice and provide GetData() function that unmarshalls.

Only the client code should care about the content. So just transmit it as
a byte slice containing json data.
This commit is contained in:
Henrik Hautakoski 2023-04-26 08:46:00 +02:00
parent d5adb71bf2
commit 0650845a0c
4 changed files with 123 additions and 42 deletions

View file

@ -124,11 +124,11 @@ func (processor *ShipProcessor) processTraces(traces []*ship.TransactionTraceV0)
ABI, err := processor.abi.GetAbi(act_trace.Act.Account)
if err == nil {
v, err := abi.DecodeAction(ABI, act_trace.Act.Data, act_trace.Act.Name)
data, err := ABI.DecodeAction(act_trace.Act.Data, act_trace.Act.Name)
if err != nil {
log.WithError(err).Warn("Failed to decode action")
}
act.Data = v
act.Data = data
} else {
log.WithError(err).Errorf("Failed to get abi for contract %s", act_trace.Act.Account)
}