From b4eba83a3b47313e2009d81091f75a50485af36e Mon Sep 17 00:00:00 2001 From: PaddyMc Date: Mon, 2 Dec 2024 10:27:12 +0000 Subject: [PATCH] chore: update math package (#8857) --- osmomath/go.mod | 2 +- osmomath/go.sum | 4 ++-- wasmbinding/message_plugin.go | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/osmomath/go.mod b/osmomath/go.mod index 2b2c3000aef..e87beb52ec2 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -3,7 +3,7 @@ module github.com/osmosis-labs/osmosis/osmomath go 1.22.3 require ( - cosmossdk.io/math v1.3.0 + cosmossdk.io/math v1.4.0 github.com/cosmos/cosmos-sdk v0.50.6 github.com/stretchr/testify v1.9.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/osmomath/go.sum b/osmomath/go.sum index c7e32645f6d..694227d1a60 100644 --- a/osmomath/go.sum +++ b/osmomath/go.sum @@ -10,8 +10,8 @@ cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= -cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= -cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index befef32a291..04760f368db 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -125,6 +125,9 @@ func PerformMint(f *tokenfactorykeeper.Keeper, b *bankkeeper.BaseKeeper, ctx sdk if err != nil { return errorsmod.Wrap(err, "minting coins from message") } + if f.IsModuleAcc(ctx, rcpt) { + return tokenfactorytypes.ErrMintToModuleAccount + } err = b.SendCoins(ctx, contractAddr, rcpt, sdk.NewCoins(coin)) if err != nil { return errorsmod.Wrap(err, "sending newly minted coins from message")