Skip to main content
The formo contracts command group lets you manage the smart contracts tracked by your project. Register new contracts, update their ABIs and event configurations, and remove contracts you no longer need.

formo contracts list

List all tracked contracts for the project.
Requires contracts:read scope on your API key.
formo contracts list

formo contracts create

Register a new smart contract to track.
Requires contracts:write scope on your API key.

Options

OptionTypeRequiredDescription
--addressstringContract address (0x…)
--chainnumberChain ID (e.g. 1 for Ethereum, 137 for Polygon)
--namestringHuman-readable contract name
--abistringContract ABI as a JSON string
--eventsstringEvents configuration as a JSON string

Examples

# Register an ERC-20 contract on Ethereum
formo contracts create \
  --address 0x1234567890abcdef1234567890abcdef12345678 \
  --chain 1 \
  --name "My Token" \
  --abi '[{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}]}]' \
  --events '{"Transfer":true}'

# Register a contract on Polygon
formo contracts create \
  --address 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd \
  --chain 137 \
  --name "Polygon DEX" \
  --abi '[{"type":"event","name":"Swap"}]' \
  --events '{"Swap":true}'

formo contracts update

Update a tracked contract. The contract is identified by chain ID and address.
Requires contracts:write scope on your API key.

Arguments

ArgumentTypeRequiredDescription
chainstringChain ID
addressstringContract address (0x…)

Options

OptionTypeRequiredDescription
--namestringUpdated contract name
--abistringUpdated ABI as a JSON string
--eventsstringUpdated events configuration as a JSON string

Examples

# Update a contract's name and events
formo contracts update 1 0x1234567890abcdef1234567890abcdef12345678 \
  --name "Renamed Token" \
  --abi '[{"type":"event","name":"Transfer"}]' \
  --events '{"Transfer":true}'

formo contracts delete

Remove a tracked contract. The contract is identified by chain ID and address.
Requires contracts:write scope on your API key.

Arguments

ArgumentTypeRequiredDescription
chainstringChain ID
addressstringContract address (0x…)
formo contracts delete 1 0x1234567890abcdef1234567890abcdef12345678
Removing a tracked contract is permanent. Historical events already captured are not deleted, but new events will no longer be tracked.