Skip to main content
The formo contracts command group manages smart contracts tracked by your project for decoding and event ingestion.

formo contracts list

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

Options

OptionTypeRequiredDescription
--pagenumberPage number, 1-indexed
--sizenumberPage size
formo contracts list --size 25

formo contracts recommendations

List contracts your project already interacts with but has not added yet.
Requires contracts:read scope on your API key.
formo contracts recommendations

formo contracts get <chain> <address>

Get a tracked contract by chain ID and address.
Requires contracts:read scope on your API key.
formo contracts get 1 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

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, for example 1 for Ethereum
--namestringHuman-readable contract name
--abistringContract ABI as a JSON array string
--eventsstringJSON array of ABI event objects to monitor, max 10
--start-blocknumberOptional start block
--include-in-pipelinebooleanWhether to include this contract in the events pipeline

Example

formo contracts create \
  --address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --chain 1 \
  --name "USDC" \
  --abi '[{"anonymous":false,"type":"event","name":"Transfer","inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}]}]' \
  --events '[{"anonymous":false,"type":"event","name":"Transfer","inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}]}]' \
  --start-block 6082465 \
  --include-in-pipeline true
--abi is sent to the API as an ABI JSON string. --events is sent as an array of ABI event objects.

formo contracts update <chain> <address>

Update a tracked contract.
Requires contracts:write scope on your API key.

Options

OptionTypeRequiredDescription
--namestringUpdated contract name
--abistringUpdated ABI as a JSON array string
--eventsstringUpdated JSON array of ABI event objects to monitor
--start-blocknumberOptional start block
--include-in-pipelinebooleanWhether to include this contract in the events pipeline
formo contracts update 1 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --name "USD Coin" \
  --abi '[{"anonymous":false,"type":"event","name":"Transfer","inputs":[]}]' \
  --events '[{"anonymous":false,"type":"event","name":"Transfer","inputs":[]}]'

formo contracts pipeline <chain> <address>

Toggle whether a tracked contract is included in the project events pipeline without resending its ABI.
Requires contracts:write scope on your API key.
OptionTypeRequiredDescription
--include-in-pipelinebooleantrue to include the contract, false to exclude it
formo contracts pipeline 1 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --include-in-pipeline false

formo contracts delete <chain> <address>

Remove a tracked contract.
Requires contracts:write scope on your API key.
formo contracts delete 1 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Removing a tracked contract is permanent. Historical events already captured are not deleted, but new events will no longer be tracked.