Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

47 with token factory #1327

Closed
wants to merge 140 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
76dd72d
Start cosmos-sdk v0.47 integration (#1136)
alpe Jan 11, 2023
1e6a886
Bump bufbuild/buf-setup-action from 1.11.0 to 1.12.0
dependabot[bot] Jan 13, 2023
e9a80cf
Merge pull request #1152 from CosmWasm/mergify/bp/develop_sdk47/pr-1151
alpe Jan 13, 2023
ba499ae
Remove intertx for vanilla ICA
alpe Jan 17, 2023
50bda42
fix msg format in EVENTS.md
dev8723 Jan 22, 2023
42dc194
Merge pull request #1159 from CosmWasm/ica_noauth
alpe Jan 23, 2023
22880a8
Merge pull request #1168 from CosmWasm/mergify/bp/develop_sdk47/pr-1167
alpe Jan 23, 2023
cc28399
Better to sdk coin convertion (#1164)
alpe Jan 24, 2023
650af69
Merge pull request #1170 from CosmWasm/mergify/bp/develop_sdk47/pr-1164
alpe Jan 24, 2023
6b9d1c8
Disallow only address permission (#1163)
alpe Jan 25, 2023
a851656
Integrate wasmvm v1.2.0 (backport #1161) (#1175)
mergify[bot] Jan 26, 2023
fe57635
Merge pull request #1176 from CosmWasm/mergify/bp/develop_sdk47/pr-1163
alpe Jan 26, 2023
dff6528
Bump bufbuild/buf-setup-action from 1.12.0 to 1.13.0
dependabot[bot] Jan 27, 2023
db503d6
Emit events for setContractAdmin + setAccessConfig (#1179)
alpe Jan 27, 2023
83142ba
Merge pull request #1186 from CosmWasm/mergify/bp/develop_sdk47/pr-1181
alpe Jan 27, 2023
aa8db78
Dependency upgrades (#1172)
alpe Jan 27, 2023
9df3f60
Merge pull request #1187 from CosmWasm/mergify/bp/develop_sdk47/pr-1179
alpe Jan 27, 2023
6a0c2a3
Update to ibc-go v7 + protoVer=0.11.5
gjermundgaraba Jan 29, 2023
6a49301
Merge pull request #1190 from gjermundgaraba/develop_sdk47
alpe Jan 30, 2023
287aec8
Bump bufbuild/buf-setup-action from 1.13.0 to 1.13.1
dependabot[bot] Jan 30, 2023
a6fcba2
Merge pull request #1193 from CosmWasm/mergify/bp/develop_sdk47/pr-1191
alpe Jan 30, 2023
388b175
Fix typos (backport #1185) (#1194)
mergify[bot] Jan 30, 2023
87ece70
rename lastIDKey
expertdicer Feb 1, 2023
92d01c3
go mod download missing go.sum entries
faddat Feb 14, 2023
dd101bd
ibc-go v7.0.0
faddat Feb 14, 2023
a951fc6
github actions
faddat Feb 14, 2023
fefa067
golangci config
faddat Feb 14, 2023
493792e
all tests pass
faddat Feb 14, 2023
111c98f
47 fully linted
faddat Feb 14, 2023
85c3b43
use go 20
faddat Feb 14, 2023
cbfbb95
use single tm-db version to prevent conflicts
faddat Feb 14, 2023
0bb74b7
fix bad lint
ThanhNhann Feb 13, 2023
b684a38
check fuzz
ThanhNhann Feb 13, 2023
41eddc1
use thanh's fuzz test
faddat Feb 14, 2023
2f01f8d
make proto-gen
faddat Feb 14, 2023
5beb360
tidy
faddat Feb 14, 2023
6ab6475
tm-db notes
faddat Feb 14, 2023
8418635
bump circleci in go
faddat Feb 14, 2023
107299b
add the tf module
faddat Feb 15, 2023
9867792
add token factory protos
faddat Feb 15, 2023
a4a160d
make proto-gen
faddat Feb 15, 2023
5b8d05d
bumps
faddat Feb 16, 2023
5f09480
add token factory test suite
faddat Feb 22, 2023
a90d6b5
add token factory test suite
faddat Feb 22, 2023
572a13e
golangci
faddat Feb 22, 2023
f1fccae
update app
ThanhNhann Feb 22, 2023
7570f28
fix last test
ThanhNhann Feb 22, 2023
d9367b5
Merge pull request #93 from notional-labs/nhan/fix_bump_v47
faddat Feb 24, 2023
44dedbb
Merge remote-tracking branch 'origin/main' into 47-with-token-factory
faddat Feb 24, 2023
f8b5569
use cometbft and up to date wasmvm
faddat Feb 24, 2023
73ccdea
use cometbft
faddat Feb 24, 2023
6ee9901
use cometbft
faddat Feb 24, 2023
ce8a95e
use latest comet
faddat Feb 24, 2023
db5a52e
need to upgrade ibc-go to use comet
faddat Feb 24, 2023
af026ff
use carlos branch with cometbft
faddat Feb 24, 2023
d96c66d
use interchain accounts with comet
faddat Feb 24, 2023
6c882b9
icad with comet
faddat Feb 24, 2023
7294359
use interchain accounts with comet. passes all tests
faddat Feb 24, 2023
56f91e6
tidy
faddat Feb 24, 2023
120b7b1
indent-error-flow
faddat Feb 25, 2023
1969af4
Merge remote-tracking branch 'dadamu/paul/fix-stargate-querier' into …
faddat Feb 25, 2023
d293877
Merge remote-tracking branch 'notional/nguyen/rename-lastIdKey' into …
faddat Feb 25, 2023
1bab40b
Merge remote-tracking branch 'wormhole/list-contract-code-bugfix' int…
faddat Feb 25, 2023
e734108
Update codeql-analizer.yml
faddat Feb 25, 2023
f07f94e
normalize go
faddat Feb 25, 2023
afae3e8
Merge branch '47-with-token-factory' of https://github.com/notional-l…
faddat Feb 25, 2023
04bf69d
comments
faddat Feb 25, 2023
b022583
ledger
faddat Feb 25, 2023
011e8b7
Revert "ledger"
faddat Feb 25, 2023
b4ffc7c
cometbft
faddat Feb 27, 2023
e28ef5b
Merge branch '47-with-token-factory' of https://github.com/notional-l…
faddat Feb 27, 2023
524f773
Bump bufbuild/buf-setup-action from 1.13.1 to 1.14.0 (#1200)
dependabot[bot] Mar 1, 2023
fc4bbe1
Merge pull request #1219 from CosmWasm/mergify/bp/develop_sdk47/pr-1200
alpe Mar 1, 2023
466f206
list-contract-by-code bugfix
nik-suri Feb 13, 2023
3eca999
fix: stargate querier does not reset the state
dadamu Feb 23, 2023
92fde7a
test: add unit test
dadamu Feb 24, 2023
498b98e
Merge pull request #1223 from CosmWasm/mergify/bp/develop_sdk47/pr-1201
alpe Mar 2, 2023
05be122
Merge pull request #1224 from CosmWasm/mergify/bp/develop_sdk47/pr-1208
alpe Mar 2, 2023
b9d2771
Add Windows client support (#1197)
pinosu Mar 3, 2023
e3f36b2
Merge pull request #1227 from CosmWasm/mergify/bp/develop_sdk47/pr-1197
alpe Mar 3, 2023
00edea6
Bump bufbuild/buf-setup-action from 1.14.0 to 1.15.0
dependabot[bot] Mar 2, 2023
ddedb03
Merge pull request #1228 from CosmWasm/mergify/bp/develop_sdk47/pr-1222
alpe Mar 3, 2023
50800d3
Merge remote-tracking branch 'upstream/develop_sdk47' into 47-with-to…
faddat Mar 4, 2023
918d952
Rename windows client binary
alpe Mar 3, 2023
221cf02
Merge pull request #1235 from CosmWasm/mergify/bp/develop_sdk47/pr-1231
alpe Mar 6, 2023
f4f2fe8
Return IBC packet sequence number (backport #1225) (#1233)
mergify[bot] Mar 6, 2023
29225df
Test rust panic for regression
alpe Mar 6, 2023
e962674
Fix client checksum verification (#1234)
alpe Mar 6, 2023
0b8af25
Merge pull request #1238 from CosmWasm/mergify/bp/develop_sdk47/pr-1234
alpe Mar 6, 2023
7969723
Fix merge conflict
alpe Mar 6, 2023
ccf3a88
Fix linters
alpe Mar 6, 2023
30884e7
Merge pull request #1237 from CosmWasm/mergify/bp/develop_sdk47/pr-1236
alpe Mar 6, 2023
b1a6f11
Configure sonarcloud analysis
alpe Nov 22, 2022
651ca9c
Merge pull request #1241 from CosmWasm/mergify/bp/develop_sdk47/pr-1105
alpe Mar 6, 2023
52d6b1f
Merge pull request #1240 from CosmWasm/fix_linters
alpe Mar 7, 2023
a435474
Bump bufbuild/buf-setup-action from 1.15.0 to 1.15.1
dependabot[bot] Mar 9, 2023
c7fb329
Merge pull request #1252 from CosmWasm/mergify/bp/develop_sdk47/pr-1251
alpe Mar 9, 2023
c160867
Make `CaptureIbcEvents` in ibctesting public.
0xekez Mar 9, 2023
c48879b
Merge pull request #1253 from CosmWasm/mergify/bp/develop_sdk47/pr-1248
alpe Mar 9, 2023
4289001
Upgrade to wasmvm 1.2.1 (backport #1245) (#1254)
mergify[bot] Mar 10, 2023
b3d6684
Merge remote-tracking branch 'upstream/develop_sdk47' into 47-with-to…
faddat Mar 10, 2023
998c455
tidy and protobuf
faddat Mar 10, 2023
fe6ac0b
remove unused variable
faddat Mar 10, 2023
12dabd6
WIP All cometbft (#1244)
alpe Mar 13, 2023
bae90d3
Add changelog for v0.31.0 (#1188)
alpe Mar 13, 2023
539c783
Merge pull request #1257 from CosmWasm/mergify/bp/develop_sdk47/pr-1188
alpe Mar 13, 2023
280dc4e
Merge branch 'main' into develop_sdk47_to_main
alpe Mar 14, 2023
9ba407c
Remove new message type event
alpe Mar 14, 2023
7d6a4c1
Merge pull request #1259 from CosmWasm/develop_sdk47_to_main
alpe Mar 15, 2023
d648261
Support msg update params gov proposal (#1247)
pinosu Mar 15, 2023
2eaa893
Fix test data generator (#1263)
alpe Mar 15, 2023
bb13192
linting 47 pr (#1261)
faddat Mar 15, 2023
299f792
Regenerate from proto; remove dead code; polish code
alpe Mar 15, 2023
daca2c0
merge develop_sdk47
faddat Mar 15, 2023
7b53d93
cleanup merge of develop_sdk47
faddat Mar 15, 2023
0f41a12
Merge remote-tracking branch 'upstream/chore_dev' into 47-with-token-…
faddat Mar 15, 2023
c245f7d
Merge pull request #1265 from CosmWasm/chore_dev
alpe Mar 16, 2023
6ad6739
Set SDK version to v0.47x.0 (#1262)
alpe Mar 16, 2023
3b0dd13
Merge remote-tracking branch 'upstream/develop_sdk47' into HEAD
faddat Mar 17, 2023
0cf3a43
tidy
faddat Mar 19, 2023
716ce97
Bump ibc-go to v7.0.0
gjermundgaraba Mar 19, 2023
3fa3e1b
update token factory per: https://github.com/osmosis-labs/osmosis/pul…
faddat Mar 19, 2023
12e2242
fix import paths
faddat Mar 20, 2023
13606e7
merge main
faddat Mar 29, 2023
6e15194
lint
faddat Mar 29, 2023
567a4b3
Merge remote-tracking branch 'upstream/main' into 47-with-token-factory
faddat Apr 4, 2023
b89f583
fix tf cli
faddat Apr 4, 2023
ff2fc7b
use thelper
faddat Apr 4, 2023
ed4ad06
spacing
faddat Apr 4, 2023
dcfc094
check out module.go from origin/main
faddat Apr 4, 2023
5219136
Merge remote-tracking branch 'origin/main' into 47-with-token-factory
faddat Apr 10, 2023
7cbfdf0
eliminate changes to .github
faddat Apr 10, 2023
bc0bb82
eliminate changes to .golangci.yml
faddat Apr 10, 2023
524db80
eliminate changes to the .circleci folder
faddat Apr 10, 2023
fc39727
ensure that x/wasm exactly matches cosmwasm/main
faddat Apr 10, 2023
13d9ec8
ensure that benchmarks are exactly the same as cosmwasm/main
faddat Apr 10, 2023
0c1d7ca
eliminate changes in the tests folder
faddat Apr 10, 2023
25d0e64
make workflows folder exactly match cosmwasm/main
faddat Apr 10, 2023
81c9c99
update .proto files to use the `osmosis` domain
faddat Apr 11, 2023
c69a2fe
rebuild .proto files
faddat Apr 11, 2023
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
4 changes: 2 additions & 2 deletions EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ how [CosmJS](https://github.com/cosmos/cosmjs) gets the events it shows to the c

In Tendermint 0.35, the `events` field will be one flattened list of events over all messages. Just as if we concatenated all
the per-message arrays contained in the `log` field. This fix was made as
[part of an event system refactoring](https://github.com/tendermint/tendermint/pull/6634). This refactoring is also giving us
[pluggable event indexing engines](https://github.com/tendermint/tendermint/pull/6411), so we can use eg. PostgreSQL to
[part of an event system refactoring](https://github.com/cometbft/cometbft/pull/6634). This refactoring is also giving us
[pluggable event indexing engines](https://github.com/cometbft/cometbft/pull/6411), so we can use eg. PostgreSQL to
store and query the events with more powerful indexes.

However, currently (until Tendermint 0.34 used in Cosmos SDK 0.40-0.43), all events of one transaction are "flat-mapped" on type.
Expand Down
106 changes: 94 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,31 @@ import (
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
ibcmock "github.com/cosmos/ibc-go/v7/testing/mock"

"github.com/CosmWasm/wasmd/x/tokenfactory/bindings"

"github.com/spf13/cast"

govclient "github.com/cosmos/cosmos-sdk/x/gov/client"

"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

// token factory
"github.com/CosmWasm/wasmd/x/tokenfactory"
tokenfactorykeeper "github.com/CosmWasm/wasmd/x/tokenfactory/keeper"
tokenfactorytypes "github.com/CosmWasm/wasmd/x/tokenfactory/types"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik" // statik for swagger UI support
)

const appName = "WasmApp"
const (
appName = "WasmApp"
MockFeePort string = ibcmock.ModuleName + ibcfeetypes.ModuleName
)

// We pull these out so we can set them with LDFLAGS in the Makefile
var (
Expand Down Expand Up @@ -221,6 +236,7 @@ var (
transfer.AppModuleBasic{},
ica.AppModuleBasic{},
ibcfee.AppModuleBasic{},
tokenfactory.AppModuleBasic{},
)

// module account permissions
Expand All @@ -236,6 +252,7 @@ var (
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasm.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}
)

Expand All @@ -258,8 +275,10 @@ type WasmApp struct {
memKeys map[string]*storetypes.MemoryStoreKey

// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
AccountKeeper authkeeper.AccountKeeper
AuthzKeeper authzkeeper.Keeper
BankKeeper bankkeeper.BaseKeeper

CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
Expand All @@ -269,7 +288,6 @@ type WasmApp struct {
CrisisKeeper *crisiskeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
AuthzKeeper authzkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
Expand All @@ -279,6 +297,7 @@ type WasmApp struct {
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCFeeKeeper ibcfeekeeper.Keeper
ICAControllerKeeper icacontrollerkeeper.Keeper
TokenFactoryKeeper tokenfactorykeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasm.Keeper
Expand Down Expand Up @@ -324,15 +343,31 @@ func NewWasmApp(
bApp.SetTxEncoder(txConfig.TxEncoder())

keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, consensusparamtypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey,
authzkeeper.StoreKey, nftkeeper.StoreKey, group.StoreKey,
authtypes.StoreKey,
banktypes.StoreKey,
stakingtypes.StoreKey,
crisistypes.StoreKey,
minttypes.StoreKey,
distrtypes.StoreKey,
slashingtypes.StoreKey,
govtypes.StoreKey,
paramstypes.StoreKey,
consensusparamtypes.StoreKey,
upgradetypes.StoreKey,
feegrant.StoreKey,
evidencetypes.StoreKey,
capabilitytypes.StoreKey,
authzkeeper.StoreKey,
nftkeeper.StoreKey,
group.StoreKey,
// non sdk store keys
ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey,
wasm.StoreKey, icahosttypes.StoreKey,
ibcexported.StoreKey,
ibctransfertypes.StoreKey,
ibcfeetypes.StoreKey,
wasm.StoreKey,
icahosttypes.StoreKey,
icacontrollertypes.StoreKey,
tokenfactorytypes.StoreKey,
)

tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -403,6 +438,11 @@ func NewWasmApp(
app.BankKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(
appCodec,
keys[feegrant.StoreKey],
app.AccountKeeper,
)

app.MintKeeper = mintkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -431,6 +471,14 @@ func NewWasmApp(
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

app.TokenFactoryKeeper = tokenfactorykeeper.NewKeeper(
keys[tokenfactorytypes.StoreKey],
app.GetSubspace(tokenfactorytypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.DistrKeeper,
)

invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod))
app.CrisisKeeper = crisiskeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -553,6 +601,14 @@ func NewWasmApp(
scopedTransferKeeper,
)

// IBC Fee Module keeper
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec, keys[ibcfeetypes.StoreKey],
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper,
)

app.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec,
keys[icahosttypes.StoreKey],
Expand Down Expand Up @@ -584,7 +640,8 @@ func NewWasmApp(
// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2"
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,token_factory"
wasmOpts = append(bindings.RegisterCustomPlugins(&app.BankKeeper, &app.TokenFactoryKeeper), wasmOpts...)
app.WasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
Expand Down Expand Up @@ -678,6 +735,7 @@ func NewWasmApp(
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
tokenfactory.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
ibc.NewAppModule(app.IBCKeeper),
transfer.NewAppModule(app.TransferKeeper),
Expand All @@ -702,6 +760,7 @@ func NewWasmApp(
ibcexported.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
tokenfactorytypes.ModuleName,
wasm.ModuleName,
)

Expand All @@ -717,6 +776,7 @@ func NewWasmApp(
ibcexported.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
tokenfactorytypes.ModuleName,
wasm.ModuleName,
)

Expand All @@ -740,6 +800,7 @@ func NewWasmApp(
icatypes.ModuleName,
ibcfeetypes.ModuleName,
// wasm after ibc transfer
tokenfactorytypes.ModuleName,
wasm.ModuleName,
}
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
Expand Down Expand Up @@ -827,6 +888,26 @@ func NewWasmApp(
// upgrade.
app.setPostHandler()

// In v0.46, the SDK introduces _postHandlers_. PostHandlers are like
// antehandlers, but are run _after_ the `runMsgs` execution. They are also
// defined as a chain, and have the same signature as antehandlers.
//
// In baseapp, postHandlers are run in the same store branch as `runMsgs`,
// meaning that both `runMsgs` and `postHandler` state will be committed if
// both are successful, and both will be reverted if any of the two fails.
//
// The SDK exposes a default postHandlers chain, which comprises of only
// one decorator: the Transaction Tips decorator. However, some chains do
// not need it by default, so feel free to comment the next line if you do
// not need tips.
// To read more about tips:
// https://docs.cosmos.network/main/core/tips.html
//
// Please note that changing any of the anteHandler or postHandler chain is
// likely to be a state-machine breaking change, which needs a coordinated
// upgrade.
app.setPostHandler()

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
logger.Error("error on loading last version", "err", err)
Expand Down Expand Up @@ -1052,6 +1133,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(tokenfactorytypes.ModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(wasm.ModuleName)
Expand Down
17 changes: 17 additions & 0 deletions app/apptesting/events.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package apptesting

import sdk "github.com/cosmos/cosmos-sdk/types"

// AssertEventEmitted asserts that ctx's event manager has emitted the given number of events
// of the given type.
func (s *KeeperTestHelper) AssertEventEmitted(ctx sdk.Context, eventTypeExpected string, numEventsExpected int) {
allEvents := ctx.EventManager().Events()
// filter out other events
actualEvents := make([]sdk.Event, 0)
for _, event := range allEvents {
if event.Type == eventTypeExpected {
actualEvents = append(actualEvents, event)
}
}
s.Equal(numEventsExpected, len(actualEvents))
}
Loading