-
Notifications
You must be signed in to change notification settings - Fork 75
/
module_simulation.go
50 lines (42 loc) · 1.71 KB
/
module_simulation.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package interchainqueries
import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/neutron-org/neutron/v2/testutil/interchainqueries/sample"
interchainqueriessimulation "github.com/neutron-org/neutron/v2/x/interchainqueries/simulation"
"github.com/neutron-org/neutron/v2/x/interchainqueries/types"
)
// avoid unused import issue
var (
_ = sample.AccAddress
_ = interchainqueriessimulation.FindAccount
_ = sims.StakePerAccount
_ = simulation.MsgEntryKind
_ = baseapp.Paramspace
)
// GenerateGenesisState creates a randomized GenState of the module
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
accs := make([]string, len(simState.Accounts))
for i, acc := range simState.Accounts {
accs[i] = acc.Address.String()
}
interchainqueriesGenesis := types.GenesisState{
Params: types.DefaultParams(),
}
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&interchainqueriesGenesis)
}
// ProposalContents doesn't return any content functions for governance proposals
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg {
return nil
}
// RegisterStoreDecoder registers a decoder
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {}
// WeightedOperations returns the all the gov module operations with their respective weights.
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
operations := make([]simtypes.WeightedOperation, 0)
return operations
}