simulation

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hello55Code  = "" /* 332-byte string literal not displayed */
	Hello55Abi   = "" /* 167-byte string literal not displayed */
	Hello55SayHi = "0c49c36c"

	SimpleCode      = "" /* 460-byte string literal not displayed */
	SimpleAbi       = "" /* 336-byte string literal not displayed */
	SimpleSetPrefix = "60fe47b1"
	SimpleSetSample = "60fe47b10000000000000000000000000000000000000000000000000000000000000429" // hex for 1065
	SimpleGet       = "6d4ce63c"

	SimpleeventCode      = "" /* 1322-byte string literal not displayed */
	SimpleeventAbi       = "" /* 1116-byte string literal not displayed */
	SimpleeventSetPrefix = "60fe47b1"
	SimpleeventSetSample = "60fe47b100000000000000000000000000000000000000000000000000000000000003e8" // hex for 1000
	SimpleeventGet       = "6d4ce63c"

	StorageCode        = "" /* 642-byte string literal not displayed */
	StorageAbi         = "" /* 517-byte string literal not displayed */
	StorageStorePrefix = "6057361d"
	StorageStoreSample = "6057361d0000000000000000000000000000000000000000000000000000000000000225" // hex for 549
	StorageRetrieve    = "2e64cec1"
	StorageSayMyAddres = "8f3eff7b"

	StringtestCode               = "" /* 6268-byte string literal not displayed */
	StringtestAbi                = "" /* 2641-byte string literal not displayed */
	StringtestChangeStringPrefix = "5dd8e1c90000000000000000000000000000000000000000000000000000000000000020"
	StringtestChangeStringSample = "" // abc
	/* 203-byte string literal not displayed */
	StringtestChangeGivenPrefix = "dac970650000000000000000000000000000000000000000000000000000000000000020"
	StringtestChangeGivenSample = "" // defghi
	/* 203-byte string literal not displayed */
	StringtestGets      = "ebea52e6"
	StringtestGetl      = "3d7405f4"
	StringtestTestStuff = "16a872f1"
)
View Source
const (
	OpWeightMsgDeploy = "op_weight_msg_deploy"
)

Variables

This section is empty.

Functions

func CallFunction added in v1.1.0

func CallFunction(caller simulation.Account, prefix string, input string, contractAddr sdk.AccAddress, k keeper.Keeper,
	ctx sdk.Context, r *rand.Rand, chainID string, app *baseapp.BaseApp) (msg types.MsgCall, ret []byte, err error)

CallFunction delivers a call tx and returns msg, contract address and error.

func DecodeStore

func DecodeStore(cdc *codec.Codec, kvA, kvB tmkv.Pair) string

DecodeStore unmarshals the KVPair's value to the corresponding type of cvm module.

func DeployContract added in v1.1.0

func DeployContract(caller simulation.Account, contractCode string, contractAbi string, k keeper.Keeper, r *rand.Rand,
	ctx sdk.Context, chainID string, app *baseapp.BaseApp) (msg types.MsgDeploy, contractAddr sdk.AccAddress, err error)

DeployContract delivers a deploy tx and returns msg, contract address and error.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState creates a random genesis state for module simulation.

func SimulateMsgCallSimpleEventSet added in v1.1.0

func SimulateMsgCallSimpleEventSet(k keeper.Keeper, contractAddr sdk.AccAddress, varValue int) simulation.Operation

SimulateMsgCallSimpleEventSet creates a message calling set() in /tests/simpleevent.sol contract.

func SimulateMsgCallSimpleSet added in v1.1.0

func SimulateMsgCallSimpleSet(k keeper.Keeper, contractAddr sdk.AccAddress, varValue int) simulation.Operation

SimulateMsgCallSimpleSet creates a message calling set() in /tests/simple.sol contract.

func SimulateMsgCallStorageStore added in v1.1.0

func SimulateMsgCallStorageStore(k keeper.Keeper, contractAddr sdk.AccAddress, varValue int) simulation.Operation

SimulateMsgCallStorageStore creates a message calling store() in /tests/storage.sol contract.

func SimulateMsgCallStringTestChangeGiven added in v1.1.0

func SimulateMsgCallStringTestChangeGiven(k keeper.Keeper, contractAddr sdk.AccAddress) simulation.Operation

SimulateMsgCallStringTestChangeGiven creates a message calling changeGiven() in /tests/stringtest.sol contract.

func SimulateMsgCallStringTestChangeString added in v1.1.0

func SimulateMsgCallStringTestChangeString(k keeper.Keeper, contractAddr sdk.AccAddress, ref *string) simulation.Operation

SimulateMsgCallStringTestChangeString creates a message calling changeString() in /tests/stringtest.sol contract.

func SimulateMsgCallStringTestGetl added in v1.1.0

func SimulateMsgCallStringTestGetl(k keeper.Keeper, contractAddr sdk.AccAddress, ref *string) simulation.Operation

SimulateMsgCallStringTestGetl creates a message calling getl() in /tests/stringtest.sol contract.

func SimulateMsgCallStringTestGets added in v1.1.0

func SimulateMsgCallStringTestGets(k keeper.Keeper, contractAddr sdk.AccAddress, ref *string) simulation.Operation

SimulateMsgCallStringTestGets creates a message calling gets() in /tests/stringtest.sol contract.

func SimulateMsgCallStringTestTestStuff added in v1.1.0

func SimulateMsgCallStringTestTestStuff(k keeper.Keeper, contractAddr sdk.AccAddress) simulation.Operation

SimulateMsgCallStringTestTestStuff creates a message calling testStuff() in /tests/stringtest.sol contract.

func SimulateMsgDeployHello55 added in v1.1.0

func SimulateMsgDeployHello55(k keeper.Keeper) simulation.Operation

SimulateMsgDeployHello55 creates a massage deploying /tests/hello55.sol contract.

func SimulateMsgDeploySimple added in v1.1.0

func SimulateMsgDeploySimple(k keeper.Keeper) simulation.Operation

SimulateMsgDeploySimple creates a massage deploying /tests/simple.sol contract.

func SimulateMsgDeploySimpleEvent added in v1.1.0

func SimulateMsgDeploySimpleEvent(k keeper.Keeper) simulation.Operation

SimulateMsgDeploySimpleEvent creates a massage deploying /tests/simpleevent.sol contract.

func SimulateMsgDeployStorage added in v1.1.0

func SimulateMsgDeployStorage(k keeper.Keeper) simulation.Operation

SimulateMsgDeployStorage creates a massage deploying /tests/storage.sol contract.

func SimulateMsgDeployStringTest added in v1.1.0

func SimulateMsgDeployStringTest(k keeper.Keeper) simulation.Operation

SimulateMsgDeployStringTest creates a massage deploying /tests/stringtest.sol contract.

func WeightedOperations

func WeightedOperations(appParams simulation.AppParams, cdc *codec.Codec, k keeper.Keeper) simulation.WeightedOperations

WeightedOperations creates an operation with a weight for each type of message generators.

Types

This section is empty.

Jump to

Keyboard shortcuts

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