rpc_builder

package
v0.0.0-...-db344e9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructEthGetBalance

func ConstructEthGetBalance(address common.Address, blockNumber *rpc.BlockNumber) *types.JsonrpcMessage

func ConstructEthGetBlockByNumber

func ConstructEthGetBlockByNumber(blockNumber *rpc.BlockNumber, includeFullTransactions bool) *types.JsonrpcMessage

func GenerateBlockNumbers

func GenerateBlockNumbers(
	n int,
	startBlock int64,
	endBlock int64,
	sort bool,
	randomSeed *tooltypes.RandomSeed,
	network *string,
) ([]int64, error)

func GenerateCallsEthGetEthBalance

func GenerateCallsEthGetEthBalance(
	nCalls int,
	network *string,
	addresses []string,
	blockNumbers []int64,
	randomSeed *tooltypes.RandomSeed,
) ([]*types.JsonrpcMessage, error)

func GenerateContractAddresses

func GenerateContractAddresses(n int, network *string, randomSeed *tooltypes.RandomSeed) ([]string, error)

GenerateContractAddresses generates a sequence of contract addresses

func GenerateEOAs

func GenerateEOAs(n int, network *string, randomSeed *tooltypes.RandomSeed) ([]string, error)

GenerateEOAs generates a sequence of externally owned account addresses

func GenerateTestEthGetBalance

func GenerateTestEthGetBalance(params tooltypes.TestGenerationParameters) ([]tooltypes.VegetaAttack, error)

GenerateTestEthGetBalance generates a sequence of VegetaAttacks for testing eth_getBalance

func GenerateTransactionHashes

func GenerateTransactionHashes(n int, network *string, randomSeed *tooltypes.RandomSeed) []string

GenerateTransactionHashes generates a sequence of transaction hashes

func LoadAddressSamples

func LoadAddressSamples(params LoadSamplesParams) []string

LoadSamples loads sample data

func LoadSamples

func LoadSamples(params LoadSamplesParams) []string

LoadSamples loads sample data

Types

type GenerateCallsParams

type GenerateCallsParams struct {
	NCalls     int
	Network    string
	RandomSeed *tooltypes.RandomSeed
}

GenerateCallsParams represents the parameters for generating calls

type LoadSamplesParams

type LoadSamplesParams struct {
	Network    *string
	Datatype   string
	N          int
	RandomSeed *tooltypes.RandomSeed
}

LoadSamplesParams represents the parameters for LoadSamples

type TestGenerationParams

type TestGenerationParams struct {
	Rates      []int
	Duration   *int
	Durations  []int
	Network    string
	VegetaArgs interface{}
	RandomSeed *tooltypes.RandomSeed
}

TestGenerationParams represents the parameters for test generation

Jump to

Keyboard shortcuts

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