Documentation ¶
Index ¶
- func DeployContract(client iotexapi.APIServiceClient, counter map[string]uint64, ...) (hash.Hash256, error)
- func GetAllBalanceMap(client iotexapi.APIServiceClient, chainaddrs []*AddressKey) map[string]*big.Int
- func InitCounter(client iotexapi.APIServiceClient, addrKeys []*AddressKey) (map[string]uint64, error)
- func InjectByAps(wg *sync.WaitGroup, aps float64, counter map[string]uint64, ...)
- func InjectByInterval(transferNum int, transferGasLimit int, transferGasPrice int, ...)
- type AddressKey
- type KeyPair
- type KeyPairs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployContract ¶ added in v0.4.4
func DeployContract( client iotexapi.APIServiceClient, counter map[string]uint64, delegates []*AddressKey, executionGasLimit int, executionGasPrice int, executionData string, retryNum int, retryInterval int, ) (hash.Hash256, error)
DeployContract deploys a smart contract before starting action injections
func GetAllBalanceMap ¶ added in v0.5.0
func GetAllBalanceMap( client iotexapi.APIServiceClient, chainaddrs []*AddressKey, ) map[string]*big.Int
GetAllBalanceMap returns a account balance map of all admins and delegates
func InitCounter ¶
func InitCounter(client iotexapi.APIServiceClient, addrKeys []*AddressKey) (map[string]uint64, error)
InitCounter initializes the map of nonce counter of each address
func InjectByAps ¶
func InjectByAps( wg *sync.WaitGroup, aps float64, counter map[string]uint64, transferGasLimit int, transferGasPrice int, transferPayload string, voteGasLimit int, voteGasPrice int, contract string, executionAmount int, executionGasLimit int, executionGasPrice int, executionData string, client iotexapi.APIServiceClient, admins []*AddressKey, delegates []*AddressKey, duration time.Duration, retryNum int, retryInterval int, resetInterval int, expectedBalances *map[string]*big.Int, )
InjectByAps injects Actions in APS Mode
func InjectByInterval ¶
func InjectByInterval( transferNum int, transferGasLimit int, transferGasPrice int, transferPayload string, voteNum int, voteGasLimit int, voteGasPrice int, executionNum int, contract string, executionAmount int, executionGasLimit int, executionGasPrice int, executionData string, interval int, counter map[string]uint64, client iotexapi.APIServiceClient, admins []*AddressKey, delegates []*AddressKey, retryNum int, retryInterval int, )
InjectByInterval injects Actions in Interval Mode
Types ¶
type AddressKey ¶ added in v0.4.4
type AddressKey struct { EncodedAddr string PriKey keypair.PrivateKey }
AddressKey contains the encoded address and private key of an account
func LoadAddresses ¶
func LoadAddresses(keypairsPath string, chainID uint32) ([]*AddressKey, error)
LoadAddresses loads key pairs from key pair path and construct addresses
Click to show internal directories.
Click to hide internal directories.