Skip to main content
POST
/
v0
/
contracts
Create contract
curl --request POST \
  --url https://api.formo.so/v0/contracts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "chain": 1,
  "name": "USDC",
  "abi": "[{\"anonymous\":false,\"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\"}],\"name\":\"Transfer\",\"type\":\"event\"}]",
  "events": [
    {
      "anonymous": false,
      "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"
        }
      ],
      "name": "Transfer",
      "type": "event"
    }
  ],
  "start_block": 18000000
}
'
{
  "name": "<string>",
  "chain": 123,
  "address": "<string>",
  "abi": "<string>",
  "events": [
    {
      "anonymous": true,
      "inputs": [
        {}
      ],
      "name": "<string>",
      "type": "<string>"
    }
  ],
  "start_block": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.formo.so/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.

Body

application/json
address
string
required

EVM contract address

chain
integer
required

Chain ID

name
string
required
abi
string
required

JSON-stringified ABI

events
object[]
required
Maximum array length: 10
start_block
integer

Response

201 - application/json

Contract created

name
string
required
chain
integer
required
address
string
required
abi
string
required
events
object[]
required
start_block
integer