Skip to content

Commit

Permalink
call proposal sim function from appmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei committed Sep 1, 2023
1 parent 5c1c655 commit 3aac9c1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/apps/27-interchain-accounts/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
simulation.RandomizedGenState(simState)
}

// ProposalMsgs returns msgs used for governance proposals for simulations.
func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg {
return simulation.ProposalMsgs()
}

// WeightedOperations is unimplemented.
func (AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
return nil
Expand Down
5 changes: 5 additions & 0 deletions modules/core/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
simulation.RandomizedGenState(simState)
}

// ProposalMsgs returns msgs used for governance proposals for simulations.
func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg {
return simulation.ProposalMsgs()
}

// RegisterStoreDecoder registers a decoder for ibc module's types
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {
sdr[exported.StoreKey] = simulation.NewDecodeStore(*am.keeper)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

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

"github.com/cosmos/ibc-go/v7/modules/core/02-client/simulation"
"github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
"github.com/cosmos/ibc-go/v7/modules/core/simulation"
)

func TestProposalMsgs(t *testing.T) {
Expand Down

0 comments on commit 3aac9c1

Please sign in to comment.