From f43ac7551fa09dd625585a44a7be41e3ca05520f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:40:44 +0100 Subject: [PATCH] build(deps): Bump cosmossdk.io/math from 1.1.3-rc.1 to 1.2.0 (#5034) * build(deps): Bump cosmossdk.io/math from 1.1.3-rc.1 to 1.2.0 Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.1.3-rc.1 to 1.2.0. - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.1.3-rc.1...log/v1.2.0) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: tidy all --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Damian Nolan add UnmarshalMsgResponse ibctesting: add UnmarshalMsgResponse to utils --- e2e/go.mod | 2 +- e2e/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- modules/apps/callbacks/go.mod | 2 +- modules/apps/callbacks/go.sum | 4 ++-- testing/utils.go | 19 +++++++++++++++++++ 7 files changed, 28 insertions(+), 9 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index 930dee161375..83f0dfa1ce8d 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( cosmossdk.io/errors v1.0.0 - cosmossdk.io/math v1.1.3-rc.1 + cosmossdk.io/math v1.2.0 cosmossdk.io/x/upgrade v0.0.0-20231026141021-0469fc17e158 github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231026141021-0469fc17e158 diff --git a/e2e/go.sum b/e2e/go.sum index 81a5a1cb3834..18bf4df1e6a4 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -201,8 +201,8 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= -cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= cosmossdk.io/x/circuit v0.0.0-20231026141021-0469fc17e158 h1:w1WHpy0McqngZXmpYamLfwFytT5lY/EfnDrJIgLeG8w= diff --git a/go.mod b/go.mod index 3e945d0b336c..e1fc2c9d6360 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.0 cosmossdk.io/log v1.2.1 - cosmossdk.io/math v1.1.3-rc.1 + cosmossdk.io/math v1.2.0 cosmossdk.io/store v1.0.0 cosmossdk.io/tools/confix v0.0.0-20231026141021-0469fc17e158 cosmossdk.io/x/circuit v0.0.0-20231026141021-0469fc17e158 diff --git a/go.sum b/go.sum index 587e715c2a34..938121bc2d5b 100644 --- a/go.sum +++ b/go.sum @@ -201,8 +201,8 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= -cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= cosmossdk.io/tools/confix v0.0.0-20231026141021-0469fc17e158 h1:JUU+qAuoT7koMP3Au8uj0pJggSPfyNqUBxBQOwLE3Js= diff --git a/modules/apps/callbacks/go.mod b/modules/apps/callbacks/go.mod index 7ec73c45dfb3..d31adab01b29 100644 --- a/modules/apps/callbacks/go.mod +++ b/modules/apps/callbacks/go.mod @@ -14,7 +14,7 @@ require ( cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.0 cosmossdk.io/log v1.2.1 - cosmossdk.io/math v1.1.3-rc.1 + cosmossdk.io/math v1.2.0 cosmossdk.io/store v1.0.0 cosmossdk.io/tools/confix v0.0.0-20231026141021-0469fc17e158 cosmossdk.io/x/circuit v0.0.0-20231026141021-0469fc17e158 diff --git a/modules/apps/callbacks/go.sum b/modules/apps/callbacks/go.sum index 587e715c2a34..938121bc2d5b 100644 --- a/modules/apps/callbacks/go.sum +++ b/modules/apps/callbacks/go.sum @@ -201,8 +201,8 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= -cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= cosmossdk.io/tools/confix v0.0.0-20231026141021-0469fc17e158 h1:JUU+qAuoT7koMP3Au8uj0pJggSPfyNqUBxBQOwLE3Js= diff --git a/testing/utils.go b/testing/utils.go index a1178929e3f1..2025636a6176 100644 --- a/testing/utils.go +++ b/testing/utils.go @@ -6,6 +6,9 @@ import ( "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + abci "github.com/cometbft/cometbft/abci/types" tmtypes "github.com/cometbft/cometbft/types" ) @@ -33,3 +36,19 @@ func GenerateString(length uint) string { } return string(bytes) } + +// Parse out msg responses from a transaction result +func UnmarshalMsgResponse(cdc *codec.LegacyAmino, resp abci.ExecTxResult, msgs ...codec.ProtoMarshaler) error { + var txMsgData sdk.TxMsgData + if err := cdc.Unmarshal(resp.Data, &txMsgData); err != nil { + return err + } + + for i, msg := range msgs { + if err := cdc.Unmarshal(txMsgData.MsgResponses[i].Value, msg); err != nil { + return err + } + } + + return nil +}