Contracts

Updates a contract object.

Changed on
post/v1/contracts/{id}

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v1/contracts/{id}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring required

Specifies the unique contract ID (starts with con_).

Request body

namestring

Specifies the name of the contract (Only for display purposes).

chainIdinteger

Specifies the chain ID of the contract. Must be a supported chain.

deletedboolean

Specifies whether to delete the contract.

addressstring

Specifies the address of the contract.

publicVerificationboolean

Specifies whether to verify the contract publicly.

Example request

{
  "name": "NFT Contract",
  "chainId": 80002,
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_owner",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ]
}

Response

Successful response.

idstring required
object'contract' required
createdAtinteger required
namestring nullable required
chainIdinteger required

The chain ID.

addressstring required
deletedboolean required
publicVerificationboolean required

Changes