config

package
v0.0.0-...-b770427 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// RPC connection
	URL string

	// Account configuration
	PrivateKey string
	Mnemonic   string

	// Test configuration
	Mode         string
	SubAccounts  uint64
	Transactions uint64
	BatchSize    uint64

	// Chain configuration
	ChainID  uint64
	GasLimit uint64
	GasPrice string
	Value    string // Transfer value in wei (default: 1)

	// Fee Delegation mode
	FeePayerKey string

	// Contract mode
	Contract string
	Method   string
	Args     string

	// Output
	Output  string
	Verbose bool

	// Advanced
	Timeout   time.Duration
	RateLimit uint64

	// Prometheus metrics
	MetricsEnabled bool
	MetricsPort    int

	// Long Sender mode
	Duration  time.Duration
	TargetTPS float64
	Workers   int

	// Block Analyzer mode
	BlockStart int64
	BlockEnd   int64
	BlockRange int64

	// ERC721 Mint mode
	NFTName   string
	NFTSymbol string
	TokenURI  string
}

Config holds all configuration for the stress test

func (*Config) GetMode

func (c *Config) GetMode() Mode

GetMode returns the parsed mode

func (*Config) IsWebSocket

func (c *Config) IsWebSocket() bool

IsWebSocket returns true if the URL is a WebSocket URL

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration

type Mode

type Mode string

Mode represents the stress test mode

const (
	ModeTransfer       Mode = "TRANSFER"
	ModeFeeDelegation  Mode = "FEE_DELEGATION"
	ModeContractDeploy Mode = "CONTRACT_DEPLOY"
	ModeContractCall   Mode = "CONTRACT_CALL"
	ModeERC20Transfer  Mode = "ERC20_TRANSFER"
	ModeLongSender     Mode = "LONG_SENDER"
	ModeAnalyzeBlocks  Mode = "ANALYZE_BLOCKS"
	ModeERC721Mint     Mode = "ERC721_MINT"
)

Jump to

Keyboard shortcuts

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