simulation

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgAggregateExchangeRatePrevote = "op_weight_msg_exchange_rate_aggregate_prevote"
	OpWeightMsgAggregateExchangeRateVote    = "op_weight_msg_exchange_rate_aggregate_vote"
	OpWeightMsgDelegateFeedConsent          = "op_weight_msg_exchange_feed_consent"
)

Simulation operation weights constants nolint: gosec

Variables

This section is empty.

Functions

func GenMinValidPerWindow

func GenMinValidPerWindow(r *rand.Rand) sdk.Dec

GenMinValidPerWindow produces a randomized MinValidPerWindow in the range of [0, 0.500]

func GenRewardBand

func GenRewardBand(r *rand.Rand) sdk.Dec

GenRewardBand produces a randomized RewardBand in the range of [0.000, 0.100]

func GenRewardDistributionWindow

func GenRewardDistributionWindow(r *rand.Rand) uint64

GenRewardDistributionWindow produces a randomized RewardDistributionWindow in the range of [100, 100000]

func GenSlashFraction

func GenSlashFraction(r *rand.Rand) sdk.Dec

GenSlashFraction produces a randomized SlashFraction in the range of [0.000, 0.100]

func GenSlashWindow

func GenSlashWindow(r *rand.Rand) uint64

GenSlashWindow produces a randomized SlashWindow in the range of [100, 100000]

func GenVotePeriod

func GenVotePeriod(r *rand.Rand) uint64

GenVotePeriod produces a randomized VotePeriod in the range of [5, 100]

func GenVoteThreshold

func GenVoteThreshold(r *rand.Rand) sdk.Dec

GenVoteThreshold produces a randomized VoteThreshold in the range of [0.333, 0.666]

func GenerateExchangeRatesString

func GenerateExchangeRatesString(prices map[string]sdk.Dec) string

GenerateExchangeRatesString generates a canonical string representation of the aggregated exchange rates.

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding oracle type.

func ParamChanges

func ParamChanges(r *rand.Rand) []simtypes.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals on the simulation

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for oracle

func SimulateMsgAggregateExchangeRatePrevote

func SimulateMsgAggregateExchangeRatePrevote(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
	voteHashMap map[string]string,
) simtypes.Operation

SimulateMsgAggregateExchangeRatePrevote generates a MsgAggregateExchangeRatePrevote with random values.

func SimulateMsgAggregateExchangeRateVote

func SimulateMsgAggregateExchangeRateVote(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
	voteHashMap map[string]string,
) simtypes.Operation

SimulateMsgAggregateExchangeRateVote generates a MsgAggregateExchangeRateVote with random values.

func SimulateMsgDelegateFeedConsent

func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgDelegateFeedConsent generates a MsgDelegateFeedConsent with random values.

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL