kldexerciser

package
v0.0.0-...-82bd8cc Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTypedArgs

func GenerateTypedArgs(abi abi.ABI, methodName string, strargs []string) ([]interface{}, error)

GenerateTypedArgs parses string arguments into a range of types to pass to the ABI call

Types

type CompiledSolidity

type CompiledSolidity struct {
	Compiled     string
	ContractInfo compiler.ContractInfo
	PackedCall   []byte
}

CompiledSolidity wraps solc compilation of solidity and ABI generation

func CompileContract

func CompileContract(solidityFile, evmVersion, contractName, method string, args []string) (*CompiledSolidity, error)

CompileContract uses solc to compile the Solidity source and

type Exerciser

type Exerciser struct {
	URL               string
	Call              bool
	EstimateGas       bool
	Contract          string
	To                *common.Address
	ContractName      string
	Method            string
	Args              []string
	SolidityFile      string
	ABI               string
	Amount            int64
	EVMVersion        string
	GasPrice          int64
	Gas               int64
	StatsdServer      string
	StatsdFlushPeriod int64
	StatsdTelegraf    bool
	StatsdQualifier   string
	RPCTimeout        int
	PrivateFrom       string
	PrivateFor        []string
	Loops             int
	TxnsPerLoop       int
	ReceiptWaitMin    int
	ReceiptWaitMax    int
	Workers           int
	DebugLevel        int
	ExternalSign      bool
	ExternalSignJSON  string
	ChainID           int64
	Accounts          []string
	TotalSuccesses    uint64
	TotalFailures     uint64
	Nonce             int64
	// contains filtered or unexported fields
}

Exerciser is the Kaleido go-ethereum exerciser

func (*Exerciser) GetNetworkID

func (e *Exerciser) GetNetworkID() (int64, error)

GetNetworkID returns the network ID from the node

func (*Exerciser) Start

func (e *Exerciser) Start() (err error)

Start initializes the workers for the specified config

type SolcVersion

type SolcVersion struct {
	Path    string
	Version string
}

type Worker

type Worker struct {
	Index            int
	Name             string
	LoopIndex        uint64
	Exerciser        *Exerciser
	Nonce            uint64
	CompiledContract *CompiledSolidity
	RPC              *rpc.Client
	Account          common.Address
	PrivateKey       *ecdsa.PrivateKey
	Signer           types.EIP155Signer
	// contains filtered or unexported fields
}

Worker runs the specified number transactions the specified number of times then exits

func (*Worker) CallMultiple

func (w *Worker) CallMultiple()

CallMultiple executes a contract based on loop inputs

func (*Worker) CallOnce

func (w *Worker) CallOnce() error

CallOnce executes a contract once and returns

func (*Worker) Init

func (w *Worker) Init(rpc *rpc.Client) (err error)

Init the account and connection for this worker

func (*Worker) InstallContract

func (w *Worker) InstallContract() (*common.Address, error)

InstallContract installs the contract and returns the address

func (*Worker) Run

func (w *Worker) Run()

Run executes the specified exerciser workload then exits

Jump to

Keyboard shortcuts

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