POST
/
api
/
v1
/
contract
/
files
/
upload
Upload Contract Files
curl --request POST \
  --url https://prv.explorer.biya.io/api/v1/contract/files/upload \
  --header 'Content-Type: application/json' \
  --data '
{
  "contract_address": "<string>",
  "chain_id": "<string>",
  "source_code": "<string>",
  "source_code_file_name": "<string>",
  "abi": "<string>",
  "abi_file_name": "<string>",
  "description": "<string>",
  "uploaded_by": "<string>"
}
'
{
  "code": 123,
  "message": "<string>",
  "data": {}
}

Body

application/json

UploadContractFilesRequest uploads contract files

contract_address
string

Contract address (required)

chain_id
string

Chain ID (optional, default: injective-1)

source_code
string<bytes>

Source code file (.sol) content as bytes (optional)

source_code_file_name
string

Source code file name (optional, e.g., "Token.sol")

abi
string<bytes>

ABI file (.json) content as bytes (optional)

abi_file_name
string

ABI file name (optional, e.g., "abi.json")

description
string

Optional description

uploaded_by
string

User/address who uploaded the file (optional)

Response

200 - application/json

OK

通用响应结构

code
integer<int32>

响应状态码,0表示成功,非0表示失败

message
string

响应消息

data
object

响应数据(使用 Struct 类型,可以直接返回 JSON 对象,更直观)