AI Interpreter

Describes a smart contract using OpenAI

Supported Networks

  • Ethereum: chain_id: "0x1"

  • BSC: chain_id: "0x38"

  • Avalanche: chain_id: "0xa86a"

  • Polygon: chain_id: "0x89"

  • Optimism: chain_id: "0xa"

  • Arbitrum: chain_id: "0xa4b1"

All requests require an API key. Add "x-api-key" to your request header as shown in the example below.

Don't have an API key? Contact us to get one.

post

Analyze a URL

Body
blockchain_addressstring · hexOptionalExample: 0x8904E3E9eaB00F64458845d32Ea22b2279fda1f7
chain_idstring · hexOptionalExample: 0x1
Responses
200
Successful operation
application/json
post
POST /api/v2/ai_interpreter HTTP/1.1
Host: api.blockfence.io
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "blockchain_address": "0x8904E3E9eaB00F64458845d32Ea22b2279fda1f7",
  "chain_id": "0x1"
}
{
  "name": "BunniLpZapIn",
  "description": "This smart contract is a software program that allows cryptocurrency users to invest and earn yield in a secure way. Users can choose to enter or exit the investment at any time, and receive their earnings in either cryptocurrency or tokens. The contract includes various functions for depositing, withdrawing, and converting different types of tokens, and can be interacted with through certain approved addresses. Overall, this contract helps manage and facilitate transactions between parties involved in cryptocurrency investments.",
  "total_tokens": 41912
}

Request Body Parameters

Parameter Name
Parameter Type
Comments

chain_id

hex string

Chain ID (e.g. "0x1" for mainnet)

blockchain_address

hex string

Blockchain address

Usage Example

curl https://api.blockfence.io/api/v2/ai_interpreter -X POST -H "Content-Type: application/json" -H "x-api-key: <YOUR API KEY>" -d '
{
    "chain_id": "0x1",
    "blockchain_address": "0x541a2378589e280fdfdde6e53fb5ecf98a853fc2"
}
'

Last updated

Was this helpful?