How do I add smart contracts to Dispatch?
Using smart contract event emissions and function calls to trigger alerts and automated workflows is fast and easy once you add contracts to Dispatch.
There are 2 ways to add smart contracts to Dispatch:
- Add contract on the Contracts page
- Add contract while creating a Patch
Currently Dispatch supports smart contracts on Arbitrum One, Base, Ethereum, Optimism, and Polygon. Request support for other networks here.
Adding a smart contract from the Contracts page
Navigate to the Contracts page and click the "Add contract" button.
In the "Add a smart contract" modal, add the following:
- Network: Select the network that the smart contract is on
- Contract address: Paste in the address of the smart contract you want alerts/automations from
- Contract nickname: Add an easy-to-remember, descriptive name for the contract (you can change it later)
- Click the "Add contract" button
Once you've added a contract, you can easily create Patches from your Contracts page by clicking the ••• button at the right end of the row, and selecting "Create Patch", which takes you to the Patch Builder.
And if you create Patches from Patch Builder, you'll be able to select any contracts you've previously added for the "Smart contract activity" Trigger.
Adding a smart contract while creating a Patch
Didn't add any contracts before starting on your Patch? No problem.
From the Patch Builder, if you have selected "Smart contract activity" as the Trigger type, you'll be able to add a smart contract in Step 2 - Trigger conditions.
- Network: Select the network that the smart contract is on
Smart contract: Click the "Smart contract" dropdown, and choose the "Add a smart contract" option at the bottom of the dropdown menu
- In the "Add a smart contract" modal, add the contract address and name
- Click the "Add contract" button
You should see a list of the smart contract's available events and functions to use as automation triggers. Select the events and functions you want to use, and proceed with creating your Patch.
Once you add a contract, you should see it in the top row of the table in Contracts Overview.
Adding unverified contracts
If the contract you're working with is unverified, you'll need to provide the contract ABI in JSON format.
Unverified proxy contracts
If the contract you're adding is a proxy, Dispatch provides the option to add the associated implementation contract at the same time, so you can use activity in both the proxy and implementation contracts. You'll need to provide the ABIs for both contracts.