Skip to content

Contracts

The Contracts module provides a flexible and standardized interface for interacting with smart contracts across EVM-compatible blockchains. It allows you to upload contract ABIs, register on-chain deployments, and invoke both read-only and state-changing methods — all through FSCO’s API infrastructure.

  • ABI Management: Upload and manage contract ABIs for consistent interface handling
  • Deployment Registration: Track deployed contracts across chains with metadata
  • State-Changing Calls: Execute transactions like transfer, approve, or custom methods
  • Read-Only Queries: Query on-chain data using view or pure methods without gas
  • Transaction Receipts: Retrieve full execution metadata for contract calls
  • Multi-Chain Support: Use contracts across multiple EVM networks
  • An ABI defines the available functions and structure of a contract
  • Uploaded once and reused for any matching deployment
  • Contains method names, input/output types, and mutability flags
  • Identified by a unique abiId
  • A Deployment links an ABI to a specific on-chain contract address on a given chain
  • Required to perform contract calls or queries
  • Includes metadata such as name, chainId, contractAddress, and abiId
  • Identified by a unique deploymentId
OperationDescriptionState ChangeGas Cost
CallExecutes a method (e.g. transfer, mint)✅ Yes✅ Yes
QueryReads contract data (e.g. balanceOf)❌ No❌ No
  1. Upload an ABI: Defines the contract’s interface
  2. Register a Deployment: Connects the ABI to a specific on-chain contract
  3. Call or Query Methods: Interact with the contract via FSCO API
  4. Fetch Transaction Receipts (for state-changing calls): Confirm execution status
  • Use POST /v2/contract/abi to upload a contract interface
  • Receives a unique abiId used in subsequent deployments
  • Shared ABIs can be reused across environments
  • Use POST /v2/contract/deployment to register a deployed contract
  • Requires chain ID, contract address, and abiId
  • Enables later method invocations
  • Use POST /contract/deployment/{id}/call for transactions
  • Use POST /contract/deployment/{id}/query for read-only calls
  • Pass method name and ordered parameters
  • Use GET /contract/tx/{txId}/receipt to retrieve status, gas used, logs, and block info
  • Token Transfers: Call transfer() on ERC-20 contracts
  • Ownership Checks: Query ownerOf() or balanceOf() methods
  • DAO & Governance: Submit proposals or cast votes via smart contract methods
  • Data Feeds & Oracles: Pull live data via query calls
  • Cross-Chain Apps: Register the same ABI across multiple deployments on different networks
  1. Deploy a Smart Contract
  2. Call a Contract Method
  3. Query a Contract Method
  4. Get Transaction Receipt
  5. Reuse an Existing Deployment

For full endpoint details, see the Contracts API Reference

  • Use meaningful names for ABIs and Deployments to simplify search and reuse
  • Store deploymentId and abiId securely — they are required for all operations
  • Prefer queries for reading data to avoid unnecessary gas costs
  • Keep deployments and ABIs shared if needed across teams or environments
  • Currently supports only EVM-compatible chains
  • Contract deployment is handled externally — FSCO does not deploy on-chain for you
  • Only contracts with known ABIs can be interacted with via this module