Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Configuration

The SpamOrchestrator is configured via a type-safe Zod schema.

SpamSequenceConfig

The root configuration object passed to the orchestrator.

PropertyTypeDescription
rpcUrlstringThe HTTP URL of the EVM node.
chainIdnumberThe integer Chain ID of the network.
maxGasLimitbigintCumulative gas usage limit before stopping.
concurrencynumberNumber of simultaneous worker wallets to create.
durationSecondsnumber(Optional) Max duration to run the spam in seconds.
totalTxsnumber(Optional) Max number of total transactions to send.
strategySpamStrategyConfigThe specific spam strategy to execute.

SpamStrategyConfig

Supports discriminated unions based on mode.

transfer

Simple ETH transfers between accounts.

PropertyTypeDescription
mode'transfer'Discriminator.
amountPerTxbigintAmount of Wei to send per transaction.

deploy

Deploys a contract bytecode repeatedly.

PropertyTypeDescription
mode'deploy'Discriminator.
bytecodeHexThe compiled contract bytecode.
abianyThe contract ABI.

read

Executes a read-only contract call (eth_call). Useful for stressing RPC nodes without consuming on-chain gas.

PropertyTypeDescription
mode'read'Discriminator.
targetContractAddressThe contract address to call.
abiAbiThe contract ABI.
functionNamestringThe read function to call.
argsany[]Arguments for the function.

write

Executes a state-changing contract call.

PropertyTypeDescription
mode'write'Discriminator.
targetContractAddressThe contract address to call.
abiAbiThe contract ABI.
functionNamestringThe write function to call.
argsGenerator() => any[]A function that returns arguments per tx (dynamic).
staticArgsany[]Static arguments for every tx.

mixed

Splits resources across multiple strategies. The sum of percentages must equal 100.

PropertyTypeDescription
mode'mixed'Discriminator.
strategiesArrayList of sub-strategies.

Mixed Strategy Example

strategy: {
  mode: 'mixed',
  strategies: [
    {
      percentage: 10, // 10% of workers and gas
      config: { mode: 'transfer', amountPerTx: parseEther('0.01'), depth: 1 } 
    },
    {
      percentage: 90, // 90% of workers and gas
      config: { 
        mode: 'write', 
        targetContract: '0x...', 
        functionName: 'mint', 
        staticArgs: [] 
      }
    }
  ]
}