Smarter Contracts GPT

Smarter Contracts GPT · GPT 작업

Smarter Contracts

Analyze smart contracts and tokens on Ethereum.

  • GET /api/{network}/account/{address}Get account information
  • GET /api/{network}/contract/{address}Analyze smart contracts for tokens and NFTs.
  • GET /api/{network}/ens/{name}Which address does this ENS or .eth point to?
  • GET /api/{network}/gasWhat are the gas fees right now?
  • GET /api/{network}/tx/{hash}Get transaction receipt
원본 API 스키마
{
  "openapi": "3.0.1",
  "info": {
    "title": "Smarter Contracts",
    "description": "Analyze smart contracts and tokens on Ethereum.",
    "version": "v1.4"
  },
  "paths": {
    "/api/{network}/account/{address}": {
      "get": {
        "operationId": "getAccount",
        "summary": "Get account information",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Network name",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/networks"
            }
          },
          {
            "name": "address",
            "in": "path",
            "description": "Account address",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{network}/contract/{address}": {
      "get": {
        "operationId": "analyzeContract",
        "summary": "Analyze smart contracts for tokens and NFTs.",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Network name name",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/networks"
            }
          },
          {
            "name": "address",
            "in": "path",
            "description": "Contract address",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contractResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{network}/ens/{name}": {
      "get": {
        "operationId": "ensResolveName",
        "summary": "Which address does this ENS or .eth point to?",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Network name name",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/networks"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "ENS name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/resolveNameResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{network}/gas": {
      "get": {
        "operationId": "getGasFees",
        "summary": "What are the gas fees right now?",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Network name name",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/networks"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/gasFeeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{network}/tx/{hash}": {
      "get": {
        "operationId": "getTransaction",
        "summary": "Get transaction receipt",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Network name",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/networks"
            }
          },
          {
            "name": "hash",
            "in": "path",
            "description": "Transaction hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transactionResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "accountResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "The address of the wallet."
          },
          "balance": {
            "type": "string",
            "description": "The balance of the wallet."
          },
          "history": {
            "type": "string",
            "description": "The history of the wallet."
          },
          "txCount": {
            "type": "string",
            "description": "The number of transactions the wallet has made."
          }
        }
      },
      "contractResponse": {
        "type": "object",
        "properties": {
          "sourceCode": {
            "type": "string",
            "description": "Source code of the smart contract."
          },
          "sourceCodeCurrentPage": {
            "type": "string",
            "description": "Current page number of source code"
          },
          "sourceCodeTotalPages": {
            "type": "string",
            "description": "Total number of pages of source code"
          },
          "shouldFetchNextPage": {
            "type": "boolean",
            "description": "If we should fetch the next page of source code."
          },
          "isHoneypot": {
            "type": "string",
            "description": "Whether the contract is a honeypot."
          }
        }
      },
      "gasFeeResponse": {
        "type": "object",
        "properties": {
          "gasFeeData": {
            "type": "json",
            "description": "The current gas fees for the network."
          }
        }
      },
      "networks": {
        "type": "string",
        "enum": [
          "mainnet",
          "homestead",
          "ethereum",
          "polygon",
          "arbitrum",
          "optimism",
          "goerli",
          "sepolia",
          "mumbai",
          "arbitrum-goerli",
          "optimism-goerli"
        ]
      },
      "resolveNameResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "The resolved address of the ENS name."
          }
        }
      },
      "transactionResponse": {
        "type": "object",
        "properties": {
          "transactionReceipt": {
            "type": "json",
            "description": "The transaction receipt."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://plugin.smartercontracts.ai"
    }
  ]
}