-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #718 from neutron-org/feat/rate-limit-params
rate limit params
- Loading branch information
Showing
21 changed files
with
946 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package ibcratelimitmodule | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
"github.com/cosmos/cosmos-sdk/testutil/sims" | ||
"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/v4/testutil/common/sample" | ||
ibcratelimitsimulation "github.com/neutron-org/neutron/v4/x/ibc-rate-limit/simulation" | ||
"github.com/neutron-org/neutron/v4/x/ibc-rate-limit/types" | ||
) | ||
|
||
// avoid unused import issue | ||
var ( | ||
_ = sample.AccAddress | ||
_ = ibcratelimitsimulation.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(_ simtypes.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 | ||
} |
Oops, something went wrong.