Chainlens Contract-Controller API

The Contract-Controller API from Chainlens — 2 operation(s) for contract-controller.

OpenAPI Specification

chainlens-contract-controller-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Chainlens Account-Controller Contract-Controller API
  description: Chainlens provides a robust and intuitive platform combining user-friendly exploration with powerful analytics and advanced features. Whether monitoring real-time blockchain transactions, verifying smart contracts, or tracking NFTs, Chainlens ensures you have all the necessary tools at your fingertips.
  version: master
tags:
- name: Contract-Controller
paths:
  /contracts:
    get:
      tags:
      - Contract-Controller
      summary: Chainlens Retrieve contracts.
      operationId: findContracts
      parameters:
      - name: query
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/FindContractsQuery'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LatestContractModel'
  /contracts/{addressHash}:
    get:
      tags:
      - Contract-Controller
      summary: Chainlens Retrieve a contract by its address hash.
      operationId: getContract
      parameters:
      - name: addressHash
        in: path
        description: The address hash identifying the contract.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ContractModel'
components:
  schemas:
    ContractRowModel:
      required:
      - address
      - contractAddressInfo
      - contractCreator
      - contractCreatorInfo
      - contractType
      - createdTimestampISO
      - createdTransaction
      - lastExecutedTimestampISO
      - lastExecutedTransaction
      - links
      - transactionCount
      - verified
      type: object
      properties:
        address:
          type: string
        contractAddressInfo:
          $ref: '#/components/schemas/AddressInfo'
        contractCreator:
          type: string
        contractCreatorInfo:
          $ref: '#/components/schemas/AddressInfo'
        createdTimestampISO:
          type: string
        createdTransaction:
          type: string
        lastExecutedTimestampISO:
          type: string
        lastExecutedTransaction:
          type: string
        transactionCount:
          type: integer
          format: int64
        contractType:
          type: string
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        verified:
          type: boolean
        contractName:
          type: string
        verifiedStatus:
          type: string
          enum:
          - Partial
          - Full
    Link:
      required:
      - display
      - href
      - rel
      type: object
      properties:
        href:
          type: string
        rel:
          type: string
        display:
          type: string
    ContractModel:
      required:
      - balance
      - contractAddress
      - contractAddressInfo
      - contractCreator
      - contractCreatorInfo
      - contractType
      - createdBlockHash
      - createdBlockNumber
      - createdTimestampISO
      - createdTransactionHash
      - ethBalance
      - fileId
      - isPrivate
      - links
      - proxyImplAddresses
      - transactionCount
      - verified
      type: object
      properties:
        contractAddress:
          type: string
        contractAddressInfo:
          $ref: '#/components/schemas/AddressInfo'
        contractCreator:
          type: string
        contractCreatorInfo:
          $ref: '#/components/schemas/AddressInfo'
        fileId:
          type: string
        isPrivate:
          type: boolean
        createdTimestampISO:
          type: string
        createdTransactionHash:
          type: string
        createdBlockHash:
          type: string
        createdBlockNumber:
          type: integer
          format: int64
        balance:
          type: integer
        ethBalance:
          type: number
        transactionCount:
          type: integer
          format: int64
        contractType:
          type: string
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        verified:
          type: boolean
        contractName:
          type: string
        verifiedStatus:
          type: string
          enum:
          - Partial
          - Full
        proxyImplAddresses:
          type: array
          items:
            $ref: '#/components/schemas/AddressInfo'
    LatestContractModel:
      required:
      - data
      - paging
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/PagingModel'
        data:
          type: array
          items:
            $ref: '#/components/schemas/ContractRowModel'
    AddressInfo:
      required:
      - address
      - isContract
      - isProxy
      - isVerified
      type: object
      properties:
        address:
          type: string
        name:
          type: string
        isContract:
          type: boolean
        isVerified:
          type: boolean
        isProxy:
          type: boolean
        verifiedStatus:
          type: string
          enum:
          - Partial
          - Full
        contractType:
          type: string
          enum:
          - contract
          - nft
          - token
    FindContractsQuery:
      required:
      - direction
      - page
      - size
      - sort
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
        direction:
          type: string
          enum:
          - ASC
          - DESC
        sort:
          type: string
          enum:
          - created
          - lastExecuted
          - transactionCount
          - contractType
          - verified
        filter:
          type: string
    PagingModel:
      required:
      - direction
      - page
      - size
      - sort
      - totalElements
      type: object
      properties:
        page:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        sort:
          type: string
        direction:
          type: string
          enum:
          - ASC
          - DESC
        totalElements:
          type: integer
          format: int64
externalDocs:
  description: Chainlens Documentation
  url: https://docs.chainlens.com/