Before you do anything, run contender spam -h to familiarize yourself with all the possible usages of the spam command.
Fill blocks (zero-config scenario):
contender spam --tps 50 -r $RPC_URL fill-blockSend per block (not per second):
contender spam --tpb 50 -r $RPC_URL fill-blockSend 10 batches of transactions before checking for receipts:
contender spam --tps 50 -d 10 -r $RPC_URL fill-blockFund agents from your own key:
contender spam --tps 50 -d 10 -r $RPC_URL -p $PRIVATE_KEY fill-blockCustom scenario — setup then spam:
contender setup scenario:stress.toml -r $RPC_URL
contender spam scenario:stress.toml -r $RPC_URL --tps 10 -d 3Funding spammers with -p:
contender spam scenario:stress.toml -r $RPC_URL --tps 10 -d 3 -p $PRV_KEYAgent-account math:
spam --min-balancesets the minimum balance a spammer account can hold- that amount will be sent when a spammer starts and the balance of the account is below it
spam -aspecifies the number of accounts with which to spam. The default amount is 10.- if you specify
spam --min-balance 1eth -a 50 -p $PRV_KEYyour account must hold at least 50 ETH
Reports:
# latest run
contender report
# include 2 previous runs (total 3)
contender report -p 2
# explicit range (inclusive)
contender report -i 203 -p 3[env] overrides:
# example.toml (snippet)
[[spam]]
[spam.tx]
to = "{testAddr}"
signature = "call()"
args = []contender spam ./example.toml --tps 10 -e testAddr=0x0000000000000000000000000000000000000013Setup steps can be executed in two ways: contender setup with a file-based scenario, or contender spam with a builtin scenario.
By default, setup steps will send up to 25 transactions, and wait for them to land onchain before sending more.
To change this amount, set SETUP_CONCURRENCY_LIMIT in your environment:
# only send 10 txs at a time
# run the erc20 scenario with 50 accounts per agent (-a)
SETUP_CONCURRENCY_LIMIT=10 \
contender spam --tps 50 -a 50 erc20The builtin erc20 scenario creates a setup step for each account, so in this case we'd have 50 setup txs to send, and you'd see 5 batches of 10 txs landing onchain, one after another.