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": "<string>",
  "chain": 123,
  "name": "<string>",
  "abi": "<string>",
  "events": [
    {
      "anonymous": true,
      "inputs": [
        {}
      ],
      "name": "<string>",
      "type": "<string>"
    }
  ],
  "start_block": 123
}
'
{
  "isSuccess": true,
  "data": {
    "name": "<string>",
    "chain": 123,
    "address": "<string>",
    "abi": "<string>",
    "events": [
      {
        "anonymous": true,
        "inputs": [
          {}
        ],
        "name": "<string>",
        "type": "<string>"
      }
    ],
    "start_block": 123
  }
}

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

isSuccess
boolean
data
object