From c4a08c106b28bc53ea8edcab7ac349d5d6be1a5e Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 20 Dec 2024 13:37:27 -0600 Subject: [PATCH 1/4] L-01 --- x/manifest/keeper/msg_server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/manifest/keeper/msg_server.go b/x/manifest/keeper/msg_server.go index 698e236..20f577d 100644 --- a/x/manifest/keeper/msg_server.go +++ b/x/manifest/keeper/msg_server.go @@ -36,6 +36,11 @@ func (ms msgServer) BurnHeldBalance(ctx context.Context, req *types.MsgBurnHeldB if ms.k.authority != req.Authority { return nil, fmt.Errorf("invalid authority; expected %s, got %s", ms.k.authority, req.Authority) } + + if err := req.Validate(); err != nil { + return nil, fmt.Errorf("invalid burn held message: %w", err) + } + addr, err := sdk.AccAddressFromBech32(req.Authority) if err != nil { return nil, err From 64679f47a87aee8290b0987132d909cd770b424b Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 20 Dec 2024 13:38:00 -0600 Subject: [PATCH 2/4] G-01 --- x/manifest/keeper/keeper.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/x/manifest/keeper/keeper.go b/x/manifest/keeper/keeper.go index 4c574ae..4af0b3b 100644 --- a/x/manifest/keeper/keeper.go +++ b/x/manifest/keeper/keeper.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" @@ -111,10 +110,6 @@ func (k *Keeper) Payout(ctx context.Context, payouts []types.PayoutPair) error { return err } - if !coin.IsValid() { - return fmt.Errorf("invalid payout: %v for address: %s", p, addr) - } - if err := k.mintCoinsToAccount(ctx, sdkAddr, coin); err != nil { return err } From bf330a6ce057542a7c9cfe37b1a4ce1d0d35bab2 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 20 Dec 2024 13:38:31 -0600 Subject: [PATCH 3/4] Q-01 --- x/manifest/keeper/{quierier.go => querier.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename x/manifest/keeper/{quierier.go => querier.go} (100%) diff --git a/x/manifest/keeper/quierier.go b/x/manifest/keeper/querier.go similarity index 100% rename from x/manifest/keeper/quierier.go rename to x/manifest/keeper/querier.go From 698850299dbfb8e0b9b40211d7ce1119db58928a Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 20 Dec 2024 13:49:01 -0600 Subject: [PATCH 4/4] Revert "G-01" This reverts commit 64679f47a87aee8290b0987132d909cd770b424b. --- x/manifest/keeper/keeper.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/manifest/keeper/keeper.go b/x/manifest/keeper/keeper.go index 4af0b3b..4c574ae 100644 --- a/x/manifest/keeper/keeper.go +++ b/x/manifest/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "cosmossdk.io/collections" storetypes "cosmossdk.io/core/store" @@ -110,6 +111,10 @@ func (k *Keeper) Payout(ctx context.Context, payouts []types.PayoutPair) error { return err } + if !coin.IsValid() { + return fmt.Errorf("invalid payout: %v for address: %s", p, addr) + } + if err := k.mintCoinsToAccount(ctx, sdkAddr, coin); err != nil { return err }