更新时间:2024-07-03 GMT+08:00
分享

查询合约列表

功能介绍

查询合约列表,单次最多查询500个,只支持云端管理实例使用

URI

GET /v2/{project_id}/besu/instances/{instance_id}/chain/contracts

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

最小长度:32

最大长度:32

instance_id

String

实例ID

最小长度:36

最大长度:36

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

偏移量,表示查询该偏移量后面的记录

最小值:0

limit

Integer

每页返回的条目数量

最小值:1

最大值:500

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token

最小长度:1

最大长度:65535

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

count

Integer

合约数量

contracts

Array of BesuContractsRes objects

合约信息

表5 BesuContractsRes

参数

参数类型

描述

address

String

合约地址

status

String

合约状态

abi

String

合约ABI

bytecode

String

合约字节码

description

String

实体文字描述的一个或多个段落。

create_time

String

实体的创建时间戳。

状态码: 400

表6 响应Body参数

参数

参数类型

描述

code

String

状态码

最小长度:3

最大长度:3

error_code

String

错误码

最小长度:12

最大长度:12

error_msg

String

错误信息

最小长度:1

最大长度:65535

message

String

错误详细信息

最小长度:1

最大长度:65535

状态码: 401

表7 响应Body参数

参数

参数类型

描述

code

String

状态码

最小长度:3

最大长度:3

error_code

String

错误码

最小长度:12

最大长度:12

error_msg

String

错误信息

最小长度:1

最大长度:65535

message

String

错误详细信息

最小长度:1

最大长度:65535

状态码: 500

表8 响应Body参数

参数

参数类型

描述

code

String

状态码

最小长度:3

最大长度:3

error_code

String

错误码

最小长度:12

最大长度:12

error_msg

String

错误信息

最小长度:1

最大长度:65535

message

String

错误详细信息

最小长度:1

最大长度:65535

请求示例

响应示例

状态码: 200

请求成功

{
  "count" : 0,
  "contracts" : [ {
    "address" : "string",
    "status" : "string",
    "abi" : "string",
    "bytecode" : "string",
    "description" : "string",
    "create_time" : "string"
  } ]
}

状态码

状态码

描述

200

请求成功

400

请求参数校验不通过

401

鉴权失败

500

服务内部执行错误

分享:

    相关文档

    相关产品