Appearance
Contract Interaction
Introduction
A contract interaction task can be used to automate any transaction to a contract. It as an example be used to quickly mint an NFT or to send a transaction to a DEX contract to swap tokens as soon as a certain time has passed.
Creating a task
In the CI Tasks page you can create a new task by clicking on the "New Task" button and the modal shown below will appear:

- Name:
The name of the task. This is only used to identify the task in the list of tasks.
- Start Block:
The block number from which the task should start sending transactions. If you want to start the task immediately, you can set this to the current block number or 0.
- Start Time:
The time (Unix Timestamp) from which the task should start sending transactions. If you want to start the task immediately, you can set this to the current time or 0.
WARNING
The task will wait until both, the start block and the start time have been reached before sending any transactions. This means that if you set the start block to 0 and the start time to 1 hour from now, the task will wait for 1 hour before sending any transactions.
Transaction Value (in ETH):
The amount of Ether to send with the transaction. This depends on the action that you want to do with your transaction. If you want to mint an NFT then you have to set the transaction value to the price of the NFT.
Wallet:
The wallet that should be used to send the transaction. You can select any of your wallets that you have added to FlashBat.
Gas Config:
The gas configuration that should be used for the transaction. You can select any of the gas configurations that you have added to FlashBat.
Contract Address:
The address of the contract that you want to interact with. The contract has to be verified on Etherscan to be able to fetch all its functions automatically.
Function Name:
Pick the function that you want to call. The needed parameters will then be fetched automatically from Etherscan.
When you have chosen the function name, new fields will appear. In our example we have chosen the Disperse ETH contract:

- Function Parameters:
The parameters depend on the function that you have selected. In the example, to call "disperseTokenSimple" we need three parameters. The first one is an address labeled "token", where we specify the address of the token that we want to send. The second one is an array of addresses labeled "recipients" where we specify the addresses of the recipients. The third one is an array of uint256 labeled "values" where we specify the amounts that we want to send to each recipient. For array parameters, we cann add multiple entries by clicking on the "+" button.
WARNING
The parameters are fetched from Etherscan and are not validated. Please double check your inputs parameters! Pay close attention to the currency, as some contracts expect a value in Wei instead of Ether.
Press "Create" and your task will be created. You can now see it in the list of tasks and activate it by clicking on the badge which is currently "Inactive".
FlashBat Docs