runspamoorscenario

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

README

run_spamoor_scenario Task

Description

The run_spamoor_scenario task runs a spamoor scenario with the given configuration. Spamoor is a tool for generating various types of Ethereum transactions for testing purposes. This task integrates spamoor scenarios directly into assertoor test workflows, allowing for complex transaction generation patterns.

The task handles wallet management automatically - it creates a wallet pool from the provided private key, initializes the specified scenario, prepares (creates and funds) child wallets as needed, and then executes the scenario.

For a complete list of available scenarios and their configuration options, see the spamoor transaction scenarios documentation.

Configuration Parameters

  • scenarioName:
    The name of the spamoor scenario to run. This must match one of the available scenarios in spamoor (e.g., eoa-transactions, blob-transactions, deploy-contracts).

  • privateKey:
    The private key of the root wallet used to fund scenario wallets. This wallet should have sufficient ETH to fund all child wallets required by the scenario.

  • scenarioYaml:
    YAML configuration for the scenario. This is a nested YAML structure that is passed directly to spamoor. The available options depend on the specific scenario being run. See the spamoor documentation for scenario-specific configuration options.

Defaults

Default settings for the run_spamoor_scenario task:

- name: run_spamoor_scenario
  config:
    scenarioName: ""
    privateKey: ""
    scenarioYaml: null

Example

- name: run_spamoor_scenario
  config:
    scenarioName: "eoa-transactions"
    privateKey: "0x1234567890abcdef..."
    scenarioYaml:
      throughput: 10
      max_pending: 100
      max_wallets: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "run_spamoor_scenario"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Runs a spamoor scenario with the given configuration",
		Category:    "transaction",
		Config:      DefaultConfig(),
		Outputs:     []types.TaskOutputDefinition{},
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	ScenarioName string             `yaml:"scenarioName" json:"scenarioName" require:"A" desc:"Name of the spamoor scenario to run."`
	PrivateKey   string             `yaml:"privateKey" json:"privateKey" require:"B" desc:"Private key of the root wallet used to fund scenario wallets."`
	ScenarioYAML *helper.RawMessage `yaml:"scenarioYaml" json:"scenarioYaml" desc:"YAML configuration for the scenario (nested YAML structure passed to spamoor)."`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

type Task struct {
	// contains filtered or unexported fields
}

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

Jump to

Keyboard shortcuts

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