bestchains / bestchains-contracts

Bestchains contracts is a library for secure smart contract development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add interfaces for each contract

bjwswang opened this issue · comments

以存证合约为例

[
  {
    "name": "Proof",
    "version": "v0.0.1",
    "from": "Bestchains Team",
    "language": "Go",
    "description": "提供存证应用的基础功能,通用的Key-Value存储",
    "package": "example/basic/metadata.json",
    "status": "已完成",
    "interfaces": [
      {
        "name":"Initialize",
        "args":[""],
        "condition":"",
        "description":"用于初始化存证应用"
      },
      {
        "name":"Total",
        "args":[""],
        "condition":"",
        "description":"用于获取存证总数"
      },
      {
        "name": "PutValue",
        "args": [
          "context.Message msg",
          "string value"
        ],
        "condition":"仅允许合约Client角色用户调用",
        "description": "用于生成存证"
      },
      {
        "name": "GetValueByIndex",
        "args":["string index"],
        "condition":"",
        "description":"基于存证索引查询存证"
      },
      {
        "name": "GetValueByKey",
        "args":["string kid"],
        "condition":"",
        "description": "基于存证Key查询存证"
      }
    ]
  }
]