fix(x/auth/tx): JSON TX encoding/decoding (#20803)

This commit is contained in:
Matt Kocubinski
2024-07-29 18:29:06 +00:00
committed by GitHub
parent 585335690b
commit d80afaa55a
11 changed files with 288 additions and 72 deletions
+4 -1
View File
@@ -6,6 +6,8 @@ import (
"github.com/stretchr/testify/suite"
"google.golang.org/protobuf/types/known/anypb"
"cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -35,7 +37,8 @@ func (s *testMsgSuite) TestMsgTypeURL() {
}
func (s *testMsgSuite) TestGetMsgFromTypeURL() {
msg := new(testdata.TestMsg)
msg := testdata.NewTestMsg()
msg.DecField = math.LegacyZeroDec()
cdc := codec.NewProtoCodec(testdata.NewTestInterfaceRegistry())
result, err := sdk.GetMsgFromTypeURL(cdc, "/testpb.TestMsg")