Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.25.7
GO_VERSION: 1.25.9

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
packages: write

env:
GO_VERSION: 1.25.7
GO_VERSION: 1.25.9
TAR_PATH: /tmp/tokenfactory-docker-image.tar
IMAGE_NAME: tokenfactory-docker-image

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
GO_VERSION: 1.25.7
GO_VERSION: 1.25.9

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GO_VERSION: 1.25.7
GO_VERSION: 1.25.9

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## UNRELEASED

### DEPENDENCIES

* Bump golang to v1.25.9 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `cosmos-sdk` to v0.54.2 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `comet-bft` to v0.39.0 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `ibc-go` to v11.0.0 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `wasmd` to v0.70.1 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `wasmd` to v3.0.5 ([#21](https://github.com/cosmos/tokenfactory/pull/21))
* Bump `interchaintest` to v11 ([#21](https://github.com/cosmos/tokenfactory/pull/21))

## v0.53.6

* (wasm-demo) Restrict message execution to the contract owner only ([#15](https://github.com/cosmos/tokenfactory/pull/15)).
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.25.7-alpine AS go-builder
FROM golang:1.25.9-alpine AS go-builder

SHELL ["/bin/sh", "-ecuxo", "pipefail"]

Expand Down
4 changes: 2 additions & 2 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"

ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
"github.com/cosmos/ibc-go/v10/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v11/modules/core/ante"
"github.com/cosmos/ibc-go/v11/modules/core/keeper"

corestoretypes "cosmossdk.io/core/store"

Expand Down
111 changes: 58 additions & 53 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,42 @@ import (

dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
transfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
transferv2 "github.com/cosmos/ibc-go/v10/modules/apps/transfer/v2"
ibc "github.com/cosmos/ibc-go/v10/modules/core"
porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
ica "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/types"
ibccallbacks "github.com/cosmos/ibc-go/v11/modules/apps/callbacks"
transfer "github.com/cosmos/ibc-go/v11/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v11/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v11/modules/apps/transfer/types"
transferv2 "github.com/cosmos/ibc-go/v11/modules/apps/transfer/v2"
ibc "github.com/cosmos/ibc-go/v11/modules/core"
porttypes "github.com/cosmos/ibc-go/v11/modules/core/05-port/types"
ibcapi "github.com/cosmos/ibc-go/v11/modules/core/api"
ibcexported "github.com/cosmos/ibc-go/v11/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v11/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v11/modules/light-clients/07-tendermint"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
"cosmossdk.io/client/v2/autocli"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/evidence"
evidencekeeper "cosmossdk.io/x/evidence/keeper"
evidencetypes "cosmossdk.io/x/evidence/types"
"cosmossdk.io/x/feegrant"
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
feegrantmodule "cosmossdk.io/x/feegrant/module"
"cosmossdk.io/x/tx/signing"
"cosmossdk.io/x/upgrade"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
upgradetypes "cosmossdk.io/x/upgrade/types"
"cosmossdk.io/log/v2"
storetypes "github.com/cosmos/cosmos-sdk/store/v2/types"
"github.com/cosmos/cosmos-sdk/x/evidence"
evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
"github.com/cosmos/cosmos-sdk/x/feegrant"
feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module"
"github.com/cosmos/cosmos-sdk/x/tx/signing"
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -209,9 +209,9 @@ type TokenFactoryApp struct {
ConsensusParamsKeeper consensusparamkeeper.Keeper

IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
ICAControllerKeeper icacontrollerkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
ICAControllerKeeper *icacontrollerkeeper.Keeper
ICAHostKeeper *icahostkeeper.Keeper
TransferKeeper *ibctransferkeeper.Keeper
WasmKeeper wasmkeeper.Keeper

TokenFactoryKeeper tokenfactorykeeper.Keeper
Expand Down Expand Up @@ -259,7 +259,6 @@ func NewApp(
std.RegisterInterfaces(interfaceRegistry)

bApp := baseapp.NewBaseApp(AppName, logger, db, txConfig.TxDecoder(), baseAppOptions...)
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
bApp.SetInterfaceRegistry(interfaceRegistry)
bApp.SetTxEncoder(txConfig.TxEncoder())
Expand Down Expand Up @@ -392,7 +391,6 @@ func NewApp(
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[ibcexported.StoreKey]),
nil,
app.UpgradeKeeper,
govModAddress,
)
Expand All @@ -414,11 +412,11 @@ func NewApp(
runtime.NewKVStoreService(keys[govtypes.StoreKey]),
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.DistrKeeper,
app.MsgServiceRouter(),
govConfig,
govModAddress,
govkeeper.NewDefaultCalculateVoteResultsAndVotingPower(app.StakingKeeper),
)

// Set legacy router for backwards compatibility with gov v1beta1
Expand Down Expand Up @@ -466,9 +464,8 @@ func NewApp(
// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
app.AccountKeeper.AddressCodec(),
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
nil,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.MsgServiceRouter(),
app.AccountKeeper,
Expand All @@ -479,8 +476,6 @@ func NewApp(
app.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[icahosttypes.StoreKey]),
nil,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.AccountKeeper,
app.MsgServiceRouter(),
Expand All @@ -490,8 +485,6 @@ func NewApp(
app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[icacontrollertypes.StoreKey]),
nil,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.MsgServiceRouter(),
govModAddress,
Expand Down Expand Up @@ -540,9 +533,13 @@ func NewApp(

// see https://medium.com/the-interchain-foundation/ibc-go-v6-changes-to-interchain-accounts-and-how-it-impacts-your-chain-806c185300d7
var noAuthzModule porttypes.IBCModule
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(noAuthzModule, app.ICAControllerKeeper)
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(icaControllerStack, app.ICAControllerKeeper)
icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCKeeper.ChannelKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
icaStackBuilder := porttypes.NewIBCStackBuilder(app.IBCKeeper.ChannelKeeper)
icaStackBuilder.Base(
icacontroller.NewIBCMiddlewareWithAuth(noAuthzModule, app.ICAControllerKeeper)).Next(
icacontroller.NewIBCMiddlewareWithAuth(icaControllerStack, app.ICAControllerKeeper)).Next(
ibccallbacks.NewIBCMiddleware(wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas),
)
icaControllerStack = icaStackBuilder.Build()
icaICS4Wrapper := icaControllerStack.(porttypes.ICS4Wrapper)
// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
app.ICAControllerKeeper.WithICS4Wrapper(icaICS4Wrapper)
Expand All @@ -553,10 +550,14 @@ func NewApp(

// Create Transfer Stack
var transferStack porttypes.IBCModule
transferStack = transfer.NewIBCModule(app.TransferKeeper)
transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCKeeper.ChannelKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
transferStackBuilder := porttypes.NewIBCStackBuilder(app.IBCKeeper.ChannelKeeper)
transferStackBuilder.Base(
transfer.NewIBCModule(app.TransferKeeper)).Next(
ibccallbacks.NewIBCMiddleware(wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas),
)
transferStack = transferStackBuilder.Build()
transferICS4Wrapper := transferStack.(porttypes.ICS4Wrapper)
// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the transfer keeper
app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper)

// Create static IBC router, add app routes, then set and seal it
Expand All @@ -568,7 +569,8 @@ func NewApp(
app.IBCKeeper.SetRouter(ibcRouter)

ibcRouterV2 := ibcapi.NewRouter().
AddRoute(ibctransfertypes.PortID, transferv2.NewIBCModule(app.TransferKeeper))
AddRoute(ibctransfertypes.PortID, transferv2.NewIBCModule(app.TransferKeeper)).
AddPrefixRoute(wasmkeeper.PortIDPrefixV2, wasmkeeper.NewIBC2Handler(app.WasmKeeper))
app.IBCKeeper.SetRouterV2(ibcRouterV2)

clientKeeper := app.IBCKeeper.ClientKeeper
Expand Down Expand Up @@ -605,7 +607,7 @@ func NewApp(
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), nil),
ibc.NewAppModule(app.IBCKeeper),
transfer.NewAppModule(app.TransferKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
ica.NewAppModule(app.ICAControllerKeeper, app.ICAHostKeeper),
ibctm.NewAppModule(tmLightClientModule),
tokenfactory.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
)
Expand Down Expand Up @@ -653,6 +655,7 @@ func NewApp(
)

app.ModuleManager.SetOrderEndBlockers(
banktypes.ModuleName,
govtypes.ModuleName,
stakingtypes.ModuleName,
genutiltypes.ModuleName,
Expand Down Expand Up @@ -786,7 +789,7 @@ func NewApp(
if err := app.LoadLatestVersion(); err != nil {
panic(fmt.Errorf("error loading last version: %w", err))
}
ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{})
ctx := app.BaseApp.NewContextLegacy(true, tmproto.Header{})

// Initialize pinned codes in wasmvm as they are not persisted there
if err := app.WasmKeeper.InitializePinnedCodes(ctx); err != nil {
Expand Down Expand Up @@ -998,7 +1001,9 @@ func (app *TokenFactoryApp) RegisterTendermintService(clientCtx client.Context)
}

func (app *TokenFactoryApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) {
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg)
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg, func() int64 {
return app.CommitMultiStore().EarliestVersion()
})
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down
11 changes: 5 additions & 6 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ import (

dbm "github.com/cosmos/cosmos-db"

"cosmossdk.io/log"
"cosmossdk.io/log/v2"
"cosmossdk.io/math"
"cosmossdk.io/store/metrics"
"cosmossdk.io/store/rootmulti"
storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"
store "github.com/cosmos/cosmos-sdk/store/v2"
storetypes "github.com/cosmos/cosmos-sdk/store/v2/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -93,7 +92,7 @@ func (s *KeeperTestHelper) CreateTestContextWithMultiStore() (sdk.Context, store
db := dbm.NewMemDB()
logger := log.NewNopLogger()

ms := rootmulti.NewStore(db, logger, metrics.NewNoOpMetrics())
ms := store.NewCommitMultiStore(db, logger)

return sdk.NewContext(ms, tmtypes.Header{}, false, logger), ms
}
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

dbm "github.com/cosmos/cosmos-db"

"cosmossdk.io/log"
"cosmossdk.io/log/v2"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
)
Expand Down
2 changes: 1 addition & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"

storetypes "cosmossdk.io/store/types"
storetypes "github.com/cosmos/cosmos-sdk/store/v2/types"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

dbm "github.com/cosmos/cosmos-db"

"cosmossdk.io/log"
"cosmossdk.io/log/v2"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
)
Expand Down
6 changes: 3 additions & 3 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (

dbm "github.com/cosmos/cosmos-db"

"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/feegrant"
"cosmossdk.io/log/v2"
storetypes "github.com/cosmos/cosmos-sdk/store/v2/types"
"github.com/cosmos/cosmos-sdk/x/feegrant"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down
Loading