Chain / Contract discovery

Contract discovery

Find every contract conforming to a token standard (all SIP-010 tokens, all SIP-009 NFTs) without maintaining a list of addresses.

Secondlayer classifies each deployed contract two ways: declared, by parsing the source's (impl-trait …), and inferred, by statically matching the ABI shape (catching contracts that conform without declaring).

curl http://127.0.0.1:3800/v1/contracts \
  -G -d "trait=sip-010" -d "conformance=any"
{
  "contracts": [
    {
      "contract_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.usda-token",
      "deployer": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9",
      "block_height": 21000,
      "declared_traits": ["sip-010"],
      "inferred_standards": ["sip-010"],
      "abi_status": "fetched"
    }
  ],
  "next_cursor": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.usda-token"
}

Served from your instance's /v1.

ParamDescription
traitsip-009, sip-010, or sip-013 (required).
conformancedeclared (parsed from source), inferred (ABI shape match), or any (default).
limit1–500, default 100.
cursorResume token from the previous response's next_cursor (null on the last page).

A subgraph source can target a trait instead of a contract and index the whole standard, including contracts deployed later; see Index by standard.