WAX

diceexample1

合约

此合约定义的数据结构。

  • config 的表格行类型

    {
      "name": "config",
      "base": "",
      "fields": [
        {
          "name": "name",
          "type": "uint64"
        },
        {
          "name": "value",
          "type": "int64"
        }
      ]
    }
  • dierolls 的表格行类型

    {
      "name": "dieroll",
      "base": "",
      "fields": [
        {
          "name": "roll_id",
          "type": "uint64"
        },
        {
          "name": "player",
          "type": "name"
        },
        {
          "name": "timestamp",
          "type": "time_point_sec"
        }
      ]
    }
  • getconfig中的操作参数

    {
      "name": "getconfig",
      "base": "",
      "fields": [
        {
          "name": "config",
          "type": "name"
        }
      ]
    }
  • getstats中的操作参数

    {
      "name": "getstats",
      "base": "",
      "fields": [
        {
          "name": "player",
          "type": "name"
        }
      ]
    }
  • init中的操作参数

    {
      "name": "init",
      "base": "",
      "fields": [
        {
          "name": "player",
          "type": "name"
        }
      ]
    }
  • logtime中的操作参数

    {
      "name": "logtime",
      "base": "",
      "fields": [
        {
          "name": "assoc_id",
          "type": "uint64"
        },
        {
          "name": "player",
          "type": "name"
        },
        {
          "name": "resolve_time",
          "type": "uint32"
        }
      ]
    }
  • playerstats1 的表格行类型

    {
      "name": "playerstats",
      "base": "",
      "fields": [
        {
          "name": "player",
          "type": "name"
        },
        {
          "name": "total_rolls",
          "type": "uint32"
        },
        {
          "name": "ones",
          "type": "uint32"
        },
        {
          "name": "twos",
          "type": "uint32"
        },
        {
          "name": "threes",
          "type": "uint32"
        },
        {
          "name": "fours",
          "type": "uint32"
        },
        {
          "name": "fives",
          "type": "uint32"
        },
        {
          "name": "sixes",
          "type": "uint32"
        },
        {
          "name": "last_roll",
          "type": "uint32"
        },
        {
          "name": "last_roll_time",
          "type": "time_point_sec"
        },
        {
          "name": "avg_time",
          "type": "uint32"
        }
      ]
    }
  • receiverand中的操作参数

    {
      "name": "receiverand",
      "base": "",
      "fields": [
        {
          "name": "assoc_id",
          "type": "uint64"
        },
        {
          "name": "random_value",
          "type": "checksum256"
        }
      ]
    }
  • reset中的操作参数

    {
      "name": "reset",
      "base": "",
      "fields": []
    }
  • rolldie中的操作参数

    {
      "name": "rolldie",
      "base": "",
      "fields": [
        {
          "name": "player",
          "type": "name"
        }
      ]
    }
  • rollhistory1 的表格行类型

    {
      "name": "rollhistory",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "player",
          "type": "name"
        },
        {
          "name": "roll_id",
          "type": "uint64"
        },
        {
          "name": "result",
          "type": "uint32"
        },
        {
          "name": "timestamp",
          "type": "time_point_sec"
        },
        {
          "name": "resolve_time",
          "type": "uint32"
        }
      ]
    }
  • setconfig中的操作参数

    {
      "name": "setconfig",
      "base": "",
      "fields": [
        {
          "name": "config",
          "type": "name"
        },
        {
          "name": "value",
          "type": "int64"
        }
      ]
    }