simulation

package
v3.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgRequestData        = "op_weight_msg_request_data"
	OpWeightMsgReportData         = "op_weight_msg_report_data"
	OpWeightMsgCreateDataSource   = "op_weight_msg_create_data_source"
	OpWeightMsgEditDataSource     = "op_weight_msg_edit_data_source"
	OpWeightMsgCreateOracleScript = "op_weight_msg_create_oracle_script"
	OpWeightMsgEditOracleScript   = "op_weight_msg_edit_oracle_script"
	OpWeightMsgActivate           = "op_weight_msg_activate"

	DefaultWeightMsgRequestData        int = 100
	DefaultWeightMsgReportData         int = 100
	DefaultWeightMsgCreateDataSource   int = 100
	DefaultWeightMsgEditDataSource     int = 100
	DefaultWeightMsgCreateOracleScript int = 100
	DefaultWeightMsgEditOracleScript   int = 100
	DefaultWeightMsgActivate           int = 100
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func BuildOperationInput

func BuildOperationInput(
	r *rand.Rand,
	app *baseapp.BaseApp,
	ctx sdk.Context,
	msg sdk.Msg,
	simAccount simtypes.Account,
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	deposit sdk.Coins,
) simulation.OperationInput

BuildOperationInput helper to build object

func GenBaseOwasmGas

func GenBaseOwasmGas(r *rand.Rand) uint64

GenBaseOwasmGas returns randomize BaseOwasmGas

func GenExpirationBlockCount

func GenExpirationBlockCount(r *rand.Rand) uint64

GenExpirationBlockCount returns randomize ExpirationBlockCount

func GenIBCRequestEnabled

func GenIBCRequestEnabled(r *rand.Rand) bool

GenIBCRequestEnabled returns randomized IBCRequestEnabled

func GenInactivePenaltyDuration

func GenInactivePenaltyDuration(r *rand.Rand) uint64

GenInactivePenaltyDuration returns randomize InactivePenaltyDuration

func GenMaxAskCount

func GenMaxAskCount(r *rand.Rand) uint64

GenMaxAskCount returns randomize MaxAskCount

func GenMaxCalldataSize

func GenMaxCalldataSize(r *rand.Rand) uint64

GenMaxCalldataSize returns randomize MaxCalldataSize

func GenMaxRawRequestCount

func GenMaxRawRequestCount(r *rand.Rand) uint64

GenMaxRawRequestCount returns randomize MaxRawRequestCount

func GenMaxReportDataSize

func GenMaxReportDataSize(r *rand.Rand) uint64

GenMaxReportDataSize returns randomize MaxReportDataSize

func GenOracleRewardPercentage

func GenOracleRewardPercentage(r *rand.Rand) uint64

GenOracleRewardPercentage returns randomize OracleRewardPercentage

func GenPerValidatorRequestGas

func GenPerValidatorRequestGas(r *rand.Rand) uint64

GenPerValidatorRequestGas returns randomize PerValidatorRequestGas

func GenSamplingTryCount

func GenSamplingTryCount(r *rand.Rand) uint64

GenSamplingTryCount returns randomize SamplingTryCount

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 RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for oracle

func SimulateMsgActivate

func SimulateMsgActivate(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgActivate generates a MsgActivate with random values

func SimulateMsgCreateDataSource

func SimulateMsgCreateDataSource(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgCreateDataSource generates a MsgCreateDataSource with random values

func SimulateMsgCreateOracleScript

func SimulateMsgCreateOracleScript(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgCreateOracleScript generates a MsgCreateOracleScript with random values

func SimulateMsgEditDataSource

func SimulateMsgEditDataSource(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgEditDataSource generates a MsgEditDataSource with random values

func SimulateMsgEditOracleScript

func SimulateMsgEditOracleScript(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgEditOracleScript generates a MsgEditOracleScript with random values

func SimulateMsgReportData

func SimulateMsgReportData(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgReportData generates a MsgReportData with random values

func SimulateMsgRequestData

func SimulateMsgRequestData(
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	sk types.StakingKeeper,
	keeper keeper.Keeper,
) simtypes.Operation

SimulateMsgRequestData generates a MsgRequestData with random values

Types

type BankKeeper

type BankKeeper interface {
	simulation.BankKeeper
	IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool
}

Jump to

Keyboard shortcuts

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