Jungle 4 (Testnet)

contract1.gm

合约

此合约定义的数据结构。

  • balance 的表格行类型

    {
      "name": "balance_row",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    }
  • cleartable中的操作参数

    {
      "name": "cleartable",
      "base": "",
      "fields": [
        {
          "name": "table_name",
          "type": "name"
        },
        {
          "name": "scope",
          "type": "name?"
        },
        {
          "name": "max_rows",
          "type": "uint64?"
        }
      ]
    }
  • close中的操作参数

    {
      "name": "close",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    }
  • company 的表格行类型

    {
      "name": "company_row",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "name",
          "type": "string"
        }
      ]
    }
  • debitdeposit中的操作参数

    {
      "name": "debitdeposit",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token",
          "type": "name"
        },
        {
          "name": "locked",
          "type": "asset"
        },
        {
          "name": "fee_account",
          "type": "name"
        },
        {
          "name": "fee",
          "type": "asset"
        }
      ]
    }
  • depositcfg 的表格行类型

    {
      "name": "depositcfg_row",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    }
  • enable中的操作参数

    {
      "name": "enable",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    }
  • enablegame中的操作参数

    {
      "name": "enablegame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    }
  • foundcompany中的操作参数

    {
      "name": "foundcompany",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "name",
          "type": "string"
        }
      ]
    }
  • 的结构体属性 game_row

    的结构体属性 startgame

    {
      "name": "game_config",
      "base": "",
      "fields": [
        {
          "name": "seed",
          "type": "checksum256"
        },
        {
          "name": "epochtime",
          "type": "uint32"
        },
        {
          "name": "start",
          "type": "time_point_sec"
        },
        {
          "name": "end",
          "type": "time_point_sec"
        }
      ]
    }
  • 的结构体属性 game_row

    的结构体属性 startgame

    的结构体属性 updategame

    {
      "name": "game_meta",
      "base": "",
      "fields": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "description",
          "type": "string"
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "version",
          "type": "string"
        }
      ]
    }
  • games 的表格行类型

    {
      "name": "game_row",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "config",
          "type": "game_config"
        },
        {
          "name": "meta",
          "type": "game_meta"
        },
        {
          "name": "state",
          "type": "game_state"
        }
      ]
    }
  • 的结构体属性 game_row

    的结构体属性 startgame

    {
      "name": "game_state",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    }
  • open中的操作参数

    {
      "name": "open",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    }
  • setepochtime中的操作参数

    {
      "name": "setepochtime",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "epochtime",
          "type": "uint32"
        }
      ]
    }
  • settoken中的操作参数

    {
      "name": "settoken",
      "base": "",
      "fields": [
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "token_symbol",
          "type": "symbol"
        }
      ]
    }
  • startgame中的操作参数

    {
      "name": "startgame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "config",
          "type": "game_config"
        },
        {
          "name": "meta",
          "type": "game_meta"
        },
        {
          "name": "state",
          "type": "game_state"
        }
      ]
    }
  • state 的表格行类型

    {
      "name": "state_row",
      "base": "",
      "fields": [
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    }
  • unwrapcargo中的操作参数

    {
      "name": "unwrapcargo",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "asset_id",
          "type": "uint64"
        }
      ]
    }
  • unwrapcust 的表格行类型

    {
      "name": "unwrapcust_row",
      "base": "",
      "fields": [
        {
          "name": "asset_id",
          "type": "uint64"
        },
        {
          "name": "owner",
          "type": "name"
        }
      ]
    }
  • unwrapentity中的操作参数

    {
      "name": "unwrapentity",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "asset_id",
          "type": "uint64"
        }
      ]
    }
  • updategame中的操作参数

    {
      "name": "updategame",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "meta",
          "type": "game_meta"
        }
      ]
    }
  • wipe中的操作参数

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

    {
      "name": "withdraw",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "extended_asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    }
  • wrapcargo中的操作参数

    {
      "name": "wrapcargo",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "entity_id",
          "type": "uint64"
        },
        {
          "name": "nexus_id",
          "type": "uint64"
        },
        {
          "name": "cargo_id",
          "type": "uint64"
        },
        {
          "name": "quantity",
          "type": "uint64"
        }
      ]
    }
  • wrapentity中的操作参数

    {
      "name": "wrapentity",
      "base": "",
      "fields": [
        {
          "name": "game",
          "type": "name"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "entity_id",
          "type": "uint64"
        },
        {
          "name": "nexus_id",
          "type": "uint64"
        }
      ]
    }
  • wrapgate 的表格行类型

    {
      "name": "wrapgate_row",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "last_asset_id",
          "type": "uint64"
        }
      ]
    }