Safe (Gnosis Safe) contracts API

The contracts API from Safe (Gnosis Safe) — 2 operation(s) for contracts.

OpenAPI Specification

gnosis-safe-contracts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Safe Transaction Service 4337 contracts API
  version: 6.3.0
  description: API to keep track of transactions sent via Safe smart contracts
tags:
- name: contracts
paths:
  /tx-service/eth/api/v1/contracts/:
    get:
      operationId: contracts_list
      description: Please migrate to the new [safe-decoder-service](https://docs.safe.global/core-api/safe-decoder-service-overview)
      parameters:
      - in: query
        name: trusted_for_delegate_call
        schema:
          type: boolean
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - contracts
      security:
      - cookieAuth: []
      - tokenAuth: []
      - {}
      deprecated: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedContractList'
          description: ''
      path: /tx-service/eth/api/v1/contracts/
      title: List Contracts
      additionalInfo: ''
  /tx-service/eth/api/v1/contracts/{address}/:
    get:
      operationId: contracts_retrieve
      description: Please migrate to the new [safe-decoder-service](https://docs.safe.global/core-api/safe-decoder-service-overview)
      parameters:
      - in: path
        name: address
        schema:
          type: string
        required: true
      tags:
      - contracts
      security:
      - cookieAuth: []
      - tokenAuth: []
      - {}
      deprecated: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contract'
          description: ''
      path: /tx-service/eth/api/v1/contracts/{address}/
      title: Get Specific Contract
      additionalInfo: ''
components:
  schemas:
    ContractAbi:
      type: object
      properties:
        abi:
          type: array
          items:
            type: object
            additionalProperties: {}
        description:
          type: string
        relevance:
          type: integer
      required:
      - abi
      - description
      - relevance
    Contract:
      type: object
      properties:
        address:
          type: string
        name:
          type: string
        displayName:
          type: string
        logoUri:
          type: string
          format: uri
        contractAbi:
          $ref: '#/components/schemas/ContractAbi'
        trustedForDelegateCall:
          type: boolean
      required:
      - address
      - contractAbi
      - displayName
      - logoUri
      - name
      - trustedForDelegateCall
    PaginatedContractList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/Contract'
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"