Telos

snapshots.tf

合约

此合约定义的数据结构。

  • snapshots 的表格行类型

    {
      "name": "balance",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "amount",
          "type": "uint64"
        }
      ]
    }
  • define中的操作参数

    {
      "name": "define",
      "base": "",
      "fields": [
        {
          "name": "snapshot_id",
          "type": "uint64"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "snapshot_block",
          "type": "uint64"
        },
        {
          "name": "expire_block",
          "type": "uint64"
        }
      ]
    }
  • remove中的操作参数

    {
      "name": "remove",
      "base": "",
      "fields": [
        {
          "name": "snapshot_id",
          "type": "uint64"
        },
        {
          "name": "count",
          "type": "uint32"
        }
      ]
    }
  • setbalance中的操作参数

    {
      "name": "setbalance",
      "base": "",
      "fields": [
        {
          "name": "snapshot_id",
          "type": "uint64"
        },
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "amount",
          "type": "uint64"
        }
      ]
    }
  • snapmeta 的表格行类型

    {
      "name": "snapshot",
      "base": "",
      "fields": [
        {
          "name": "snapshot_id",
          "type": "uint64"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "snapshot_block",
          "type": "uint64"
        },
        {
          "name": "expire_block",
          "type": "uint64"
        },
        {
          "name": "last_updated",
          "type": "uint32"
        },
        {
          "name": "max_supply",
          "type": "uint64"
        }
      ]
    }