Skip to content

Commit

Permalink
chore: update tagged submodules for v27 (#8801)
Browse files Browse the repository at this point in the history
* chore: update tagged submodules for v27

* chore: changelog

* test: fix before_send_test TestBeforeSendHook
  • Loading branch information
crnbarr93 authored Nov 4, 2024
1 parent bc20f90 commit 9e46748
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#8751](https://github.com/osmosis-labs/osmosis/pull/8751) fix: supply offsets for osmo token
* [#8764](https://github.com/osmosis-labs/osmosis/pull/8764) chore: add cosmwasm 1_3 feature
* [#8779](https://github.com/osmosis-labs/osmosis/pull/8779) chore: bump cometbft/cosmos-sdk versions
* [#8801](https://github.com/osmosis-labs/osmosis/pull/8801) chore: update tagged submodules for v27

### Config

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ require (
github.com/mattn/go-sqlite3 v1.14.17
github.com/ory/dockertest/v3 v3.11.0
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
github.com/osmosis-labs/osmosis/osmomath v0.0.14
github.com/osmosis-labs/osmosis/osmoutils v0.0.14
github.com/osmosis-labs/osmosis/x/epochs v0.0.10
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.16
github.com/osmosis-labs/osmosis/osmomath v0.0.15
github.com/osmosis-labs/osmosis/osmoutils v0.0.15
github.com/osmosis-labs/osmosis/x/epochs v0.0.11
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.17
github.com/osmosis-labs/sqs/sqsdomain v0.27.0-rc1
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -918,14 +918,14 @@ github.com/osmosis-labs/cosmos-sdk/store v0.1.0-alpha.1.0.20240509221435-b8feb2f
github.com/osmosis-labs/cosmos-sdk/store v0.1.0-alpha.1.0.20240509221435-b8feb2ffb728/go.mod h1:gjE3DZe4t/+VeIk6CmrouyqiuDbZ7QOVDDq3nLqBTpg=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/osmosis/osmomath v0.0.14 h1:L8EMgKjfbLUxjV5THSpGqJG9UBmwMGk21JKacB/tcCg=
github.com/osmosis-labs/osmosis/osmomath v0.0.14/go.mod h1:hbw0oWTlkv3ls2S/4jBHlqZUdrejCQOGLhYeDm/CUgU=
github.com/osmosis-labs/osmosis/osmoutils v0.0.14 h1:TukuqS2qPMMH/LrQAV/BYIeuQGKkrD5VGM15pLM8GlA=
github.com/osmosis-labs/osmosis/osmoutils v0.0.14/go.mod h1:TGr6mFCyOZFL0TZMKvOqjqmZRkT7Z1RNzeGUP9b6ygc=
github.com/osmosis-labs/osmosis/x/epochs v0.0.10 h1:AHEIfhF9k9MHonI1Bh60cN3xOZbYm7sIj/tYUUIMZM4=
github.com/osmosis-labs/osmosis/x/epochs v0.0.10/go.mod h1:7ylCTvH4gEtZ5E8paiwSjmOzOKOOls8Br45W9uwWnP0=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.16 h1:/98KgAHWk/xI5T3iadzVP7Zbx6ocaCaWHOZQkkw/c/o=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.16/go.mod h1:AXHoG4L1AMDCMEGeSdzcy7ik2mBt5fTyzEAWlGt+aSc=
github.com/osmosis-labs/osmosis/osmomath v0.0.15 h1:kFPjl5cVf5OC3QCc7/hpGS+xTKwl/JT122k2vdze5Y4=
github.com/osmosis-labs/osmosis/osmomath v0.0.15/go.mod h1:Hs8/W1mxyhzkAebSgwTH6pmL8EHtIgrv+S+hlBYMNYw=
github.com/osmosis-labs/osmosis/osmoutils v0.0.15 h1:UKQPyYX02BBsbvmwfn4oYpTYGfA0DfTvEDCY1AxrF+Y=
github.com/osmosis-labs/osmosis/osmoutils v0.0.15/go.mod h1:Ir0e/EcOYGAlQJ2h/sbO5tG1jLMo29EYoP9BQWwF8Iw=
github.com/osmosis-labs/osmosis/x/epochs v0.0.11 h1:NDbI7T28fMXQuJGvdMnL8nzH6imv9zEr3IwXvZwETns=
github.com/osmosis-labs/osmosis/x/epochs v0.0.11/go.mod h1:oZpO3mNabcIMudgvI6z2I+enQGgc39jKjTcWpMlgi0M=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.17 h1:NKMBrymQVdQ27a905Vg9uYpXd1peC1yzW5vd2P1Tc+8=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.17/go.mod h1:hYjXkOPC53VPVChluI0MSeV143tlCOanUSk0sQKJEkw=
github.com/osmosis-labs/sqs/sqsdomain v0.27.0-rc1 h1:YI2RYF/wUWmXpw6HUw1A3ZtSUjgHB7JbAw+l1jSwRbo=
github.com/osmosis-labs/sqs/sqsdomain v0.27.0-rc1/go.mod h1:t+yX3/2NgZ21xGmSTRQuGe9DCa1uVnK1y8DiJf2IZDQ=
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
Expand Down
1 change: 0 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ use ./x/ibc-hooks
use ./x/epochs

replace github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.16.5
replace github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.50.10-v26-osmo-1.0.20241002161840-d2ff8f7253c7
21 changes: 10 additions & 11 deletions x/tokenfactory/keeper/bankactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ func (k Keeper) forceTransfer(ctx sdk.Context, amount sdk.Coin, fromAddr string,
return err
}

fromAcc, err := sdk.AccAddressFromBech32(fromAddr)
fromSdkAddr, err := sdk.AccAddressFromBech32(fromAddr)
if err != nil {
return err
}

toSdkAddr, err := sdk.AccAddressFromBech32(toAddr)
if err != nil {
return err
}
Expand All @@ -83,19 +88,13 @@ func (k Keeper) forceTransfer(ctx sdk.Context, amount sdk.Coin, fromAddr string,
return status.Errorf(codes.NotFound, "account %s not found", moduleName)
}

if account.GetAddress().Equals(fromAcc) {
if account.GetAddress().Equals(fromSdkAddr) {
return status.Errorf(codes.Internal, "send from module acc not available")
}
}

fromSdkAddr, err := sdk.AccAddressFromBech32(fromAddr)
if err != nil {
return err
}

toSdkAddr, err := sdk.AccAddressFromBech32(toAddr)
if err != nil {
return err
if account.GetAddress().Equals(toSdkAddr) {
return status.Errorf(codes.Internal, "send to module acc not available")
}
}

return k.bankKeeper.SendCoins(ctx, fromSdkAddr, toSdkAddr, sdk.NewCoins(amount))
Expand Down
2 changes: 1 addition & 1 deletion x/tokenfactory/keeper/before_send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (s *KeeperTestSuite) TestBeforeSendHook() {
for _, coin := range sendTc.msg(denom).Amount {
_, err = s.msgServer.Mint(s.Ctx, types.NewMsgMint(s.TestAccs[0].String(), sdk.NewInt64Coin(coin.Denom, coin.Amount.Int64())))
if coin.Denom == denom && coin.Amount.Equal(osmomath.NewInt(100)) {
s.Require().Error(err, "test: %v", sendTc.desc)
s.Require().NoError(err, "test: %v", sendTc.desc)
}
}

Expand Down
8 changes: 4 additions & 4 deletions x/tokenfactory/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ func NewKeeper(
}

return Keeper{
storeKey: storeKey,
paramSpace: paramSpace,
permAddrs: permAddrs,

storeKey: storeKey,
paramSpace: paramSpace,
permAddrs: permAddrs,
permAddrMap: permAddrMap,
accountKeeper: accountKeeper,
bankKeeper: bankKeeper,
communityPoolKeeper: communityPoolKeeper,
Expand Down

0 comments on commit 9e46748

Please sign in to comment.