diff --git a/pkg/indexer/decode/actions.go b/pkg/indexer/decode/actions.go index f0244e0..b6f5f35 100644 --- a/pkg/indexer/decode/actions.go +++ b/pkg/indexer/decode/actions.go @@ -153,7 +153,9 @@ func parseIbcAction(body *astria.Action_IbcAction, action *storage.Action) error action.Data = make(map[string]any) if body.IbcAction != nil && body.IbcAction.GetRawAction() != nil { - action.Data["raw"] = base64.StdEncoding.EncodeToString(body.IbcAction.GetRawAction().GetValue()) + data := body.IbcAction.GetRawAction().GetValue() + action.Data["raw"] = base64.StdEncoding.EncodeToString(data) + action.Data["type"] = body.IbcAction.GetRawAction().GetTypeUrl() } return nil } diff --git a/pkg/indexer/decode/actions_test.go b/pkg/indexer/decode/actions_test.go index 27ef97c..2a1bb11 100644 --- a/pkg/indexer/decode/actions_test.go +++ b/pkg/indexer/decode/actions_test.go @@ -32,7 +32,8 @@ func TestDecodeActions(t *testing.T) { message := &astria.Action_IbcAction{ IbcAction: &v1.IbcRelay{ RawAction: &anypb.Any{ - Value: []byte{0, 0, 0, 0}, + Value: []byte{0, 0, 0, 0}, + TypeUrl: "msg_type", }, }, } @@ -41,7 +42,8 @@ func TestDecodeActions(t *testing.T) { Height: 1000, Type: types.ActionTypeIbcRelay, Data: map[string]any{ - "raw": "AAAAAA==", + "raw": "AAAAAA==", + "type": "msg_type", }, }