Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张振华
share
Commits
9c78a0d8
Commit
9c78a0d8
authored
Jan 08, 2019
by
张振华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
216beb9b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
216 additions
and
299 deletions
+216
-299
竞猜合约接口及测试.md
竞猜合约接口及测试.md
+216
-299
No files found.
竞猜合约接口及测试.md
View file @
9c78a0d8
...
@@ -6,26 +6,23 @@
...
@@ -6,26 +6,23 @@
```
json
```
json
request
:
http.post
request
:
http.post
{
{
"jsonrpc"
:
"2.0"
,
"jsonrpc"
:
"2.0"
,
"id"
:
int
3
2
,
"id"
:
2
,
"method"
:
"Chain33.CreateTransaction"
,
"method"
:
"Chain33.CreateTransaction"
,
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"actionName"
:
"Guess
Start"
,
"actionName"
:
"
Start"
,
"payload"
:
{
"payload"
:
{
"topic"
:
"string"
,
"topic"
:
"WorldCup Final"
,
"options"
:
"string"
,
"options"
:
"A:France;B:Claodia"
,
"category"
:
"string"
,
"category"
:
"football"
,
"maxBets"
:
int
64
,
"maxBetsOneTime"
:
10000000000
,
"maxBetsNumber"
:
int
64
,
"maxBetsNumber"
:
100000000000
,
"fee"
:
int
64
,
"devFeeFactor"
:
5
,
"maxBets"
:
int
64
,
"devFeeAddr"
:
"1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7"
,
"maxBetsNumber"
:
int
64
,
"platFeeFactor"
:
5
,
"devFeeFactor"
:
int
64
,
"platFeeAddr"
:
"1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
"devFeeAddr"
:
"string"
,
"platFeeFactor"
:
int
64
,
"platFeeAddr"
:
"string"
}
}
}
}
]
]
...
@@ -38,22 +35,20 @@
...
@@ -38,22 +35,20 @@
|topic|string|竞猜标题,比如:世界杯决赛法国对阵克罗地亚,谁将获得冠军|
|topic|string|竞猜标题,比如:世界杯决赛法国对阵克罗地亚,谁将获得冠军|
|options|string|竞猜选项,以;分割,:前为选项名称(A/B/C或者1/2/3等)比如:A:法国夺冠;B:克罗地亚夺冠|
|options|string|竞猜选项,以;分割,:前为选项名称(A/B/C或者1/2/3等)比如:A:法国夺冠;B:克罗地亚夺冠|
|category|string|竞猜所属类型,比如"足球","football"等,如果不填归入default|
|category|string|竞猜所属类型,比如"足球","football"等,如果不填归入default|
|maxBets|int64|一次最多下注数量,比如:10000e8,表示最多1000个bty或者游戏币|
|maxBets
OneTime
|int64|一次最多下注数量,比如:10000e8,表示最多1000个bty或者游戏币|
|maxBetsNumber|int64|一局游戏最多投注数量,比如:1000000e8,表示做多100万个bty或者游戏币|
|maxBetsNumber|int64|一局游戏最多投注数量,比如:1000000e8,表示做多100万个bty或者游戏币|
|devFeeFactor|int64|开发者分成比例,单位1/1000,比如:投注额的5/1000|
|devFeeFactor|int64|开发者分成比例,单位1/1000,比如:投注额的5/1000|
|devFeeAddr|string|开发者分成账户地址,默认为:1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7|
|devFeeAddr|string|开发者分成账户地址,默认为:1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7|
|platFeeFactor|int64|平台方分成比例,单位1/1000,比如:投注额的5/1000|
|platFeeFactor|int64|平台方分成比例,单位1/1000,比如:投注额的5/1000|
|platFeeAddr|string|1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX|
|platFeeAddr|string|1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX|
|fee|int64|交易费用,默认1e6|
**响应报文:**
**响应报文:**
```
json
```
json
response
:
response
:
{
{
"id"
:
int
3
2
,
"id"
:
2
,
"error"
:
null
,
"result"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a5820c0843d30cbbffaeda9b1dcd2023a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"result"
:
"string"
"error"
:
null
}
}
```
```
**参数说明:**
**参数说明:**
...
@@ -62,57 +57,23 @@ response:
...
@@ -62,57 +57,23 @@ response:
|----|----|----|
|----|----|----|
|result|string|交易十六进制编码后的字符串|
|result|string|交易十六进制编码后的字符串|
**示例:**
Request:
```
json
{
"jsonrpc"
:
"2.0"
,
"id"
:
2
,
"method"
:
"Chain33.CreateTransaction"
,
"params"
:
[
{
"execer"
:
"guess"
,
"actionName"
:
"GuessStart"
,
"payload"
:
{
"topic"
:
"WorldCup Final"
,
"options"
:
"A:France;B:Claodia"
,
"category"
:
"football"
,
"maxBets"
:
10000000000
,
"maxBetsNumber"
:
100000000000
,
"fee"
:
1000000
,
"devFeeFactor"
:
5
,
"devFeeAddr"
:
"1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7"
,
"platFeeFactor"
:
5
,
"platFeeAddr"
:
"1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
}
}
]
}
```
Response:
```
json
{
"id"
:
2
,
"result"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a5820c0843d30cbbffaeda9b1dcd2023a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
}
```
#### 1.2 交易签名 SignRawTx
#### 1.2 交易签名 SignRawTx
**请求报文:**
**请求报文:**
```
json
```
json
{
{
"jsonrpc"
:
"2.0"
,
"jsonrpc"
:
"2.0"
,
"id"
:
int
32
,
"id"
:
1
,
"method"
:
"Chain33.SignRawTx"
,
"method"
:
"Chain33.SignRawTx"
,
"params"
:
[
"params"
:
[
{
{
"addr"
:
"string"
,
"addr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"privkey"
:
"string
"
,
"privKey"
:
"0x8d8523fbd09c27dabc853e99daf167533acaa1e2a2498dc2cb7449cff8137a37
"
,
"txHex"
:
"string
"
,
"txHex"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a5820a08d0630fe86c8ccf4b490a0323a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68
"
,
"expire"
:
"string"
,
"expire"
:
"3600s"
,
"index"
:
int
32
,
"index"
:
0
,
"token"
:
"string"
"model"
:
0
}
}
]
]
}
}
...
@@ -132,9 +93,9 @@ Response:
...
@@ -132,9 +93,9 @@ Response:
**响应报文:**
**响应报文:**
```
json
```
json
{
{
"id"
:
int
32
,
"id"
:
1
,
"result"
:{
"txhex"
:
"string"
}
,
"result"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a581a6e0801122102504fa1c28caaf1d5a20fefb87c50a49724ff401043420cb3ba271997eb5a43871a473045022100ad8dcafbefbea043e861cced9cca766ec724506821df33b32f49559aea84a34d022035be794beb88186bf5023e589babde1a6c5a59bb248248f3e3669bfd2f9a48ad20a08d0628fda2d1e10530fe86c8ccf4b490a0323a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
"error"
:
null
}
}
```
```
...
@@ -144,45 +105,21 @@ Response:
...
@@ -144,45 +105,21 @@ Response:
|----|----|----|
|----|----|----|
|result|string|交易签名后的十六进制字符串|
|result|string|交易签名后的十六进制字符串|
**示例:**
Request:
#### 1.3 发送交易 SendTransaction
**请求报文:**
```
json
```
json
{
{
"jsonrpc"
:
"2.0"
,
"jsonrpc"
:
"2.0"
,
"id"
:
1
,
"id"
:
2
,
"method"
:
"Chain33.S
ignRawTx
"
,
"method"
:
"Chain33.S
endTransaction
"
,
"params"
:
[
"params"
:
[
{
{
"addr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"data"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a581a6e0801122102504fa1c28caaf1d5a20fefb87c50a49724ff401043420cb3ba271997eb5a43871a473045022100ad8dcafbefbea043e861cced9cca766ec724506821df33b32f49559aea84a34d022035be794beb88186bf5023e589babde1a6c5a59bb248248f3e3669bfd2f9a48ad20a08d0628fda2d1e10530fe86c8ccf4b490a0323a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
"privKey"
:
"0x8d8523fbd09c27dabc853e99daf167533acaa1e2a2498dc2cb7449cff8137a37"
,
"txHex"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a5820c0843d30cbbffaeda9b1dcd2023a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"expire"
:
"3600s"
,
"index"
:
0
,
"model"
:
0
}
}
]
]
}
}
```
```
Response:
```
json
{
"id"
:
1
,
"result"
:
"0a12757365722e702e67756573732e6775657373128c0138050a87010a0e576f726c644375702046696e616c1212413a4672616e63653b423a436c616f6469611a08666f6f7462616c6c2880c8afa0253080d0dbc3f4023805422231443652465a4e7032726836516462635a31643752577542557a3631576536534437480552223150487443684e743355636673735237763774724b536b33574a7441576a4b6a6a581a6d0801122102504fa1c28caaf1d5a20fefb87c50a49724ff401043420cb3ba271997eb5a43871a46304402201b496a678c0ae73cae79854ea4f0c7ce7385467af41c48feea13cfe362cd5f3902204036d5d8370d33f00844a6fffaafe195aa8a82a2d12797c0cf7ad770018936fc20c0843d2882f5dde00530cbbffaeda9b1dcd2023a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
}
```
#### 1.3 发送交易 SendTransaction
**请求报文:**
```
json
request
:
http.post
{
"jsonrpc"
:
"2.0"
,
"id"
:
int
32
,
"method"
:
"Chain33.SendTransaction"
,
"params"
:[{
"data"
:
"string"
}]
}
```
**参数说明:**
**参数说明:**
...
@@ -192,10 +129,10 @@ request: http.post
...
@@ -192,10 +129,10 @@ request: http.post
**响应报文:**
**响应报文:**
```
json
```
json
response
{
{
"id"
:
int
32
,
"id"
:
2
,
"result"
:{
"string"
}
"result"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"error"
:
null
}
}
```
```
**参数说明:**
**参数说明:**
...
@@ -216,12 +153,11 @@ response
...
@@ -216,12 +153,11 @@ response
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"actionName"
:
"
Guess
Bet"
,
"actionName"
:
"Bet"
,
"payload"
:
{
"payload"
:
{
"gameI
d"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a
"
,
"gameI
D"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4
"
,
"option"
:
"A"
,
"option"
:
"A"
,
"betsNum"
:
500000000
,
"betsNum"
:
500000000
"fee"
:
1000000
}
}
}
}
]
]
...
@@ -231,17 +167,16 @@ response
...
@@ -231,17 +167,16 @@ response
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameI
d
|string|游戏ID|
|gameI
D
|string|游戏ID|
|option|string|投注选项,与创建游戏时的options中的可选选项对应,为其中某一个选项,比如A/B/C/1/2/3/...|
|option|string|投注选项,与创建游戏时的options中的可选选项对应,为其中某一个选项,比如A/B/C/1/2/3/...|
|betsNum|ing64|投注数额,比如5e8|
|betsNum|ing64|投注数额,比如5e8|
|fee|int64|交易费用,默认1e6|
**响应报文:**
**响应报文:**
```
json
```
json
response
:
response
:
{
{
"id"
:
2
,
"id"
:
2
,
"result"
:
"0a12757365722e702e67756573732e677565737312513806124d0a4230786
23265386662333238613061376638383636316133303434393766663235366530383033633861373338373463373063323733393530626537343038656633611201411880cab5ee0120c0843d30c9da93dad0e191a51c
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"result"
:
"0a12757365722e702e67756573732e677565737312513806124d0a4230786
43964646466663834373533653138663930323331656132633932386466366566323565656632346130353166333464323264323632623864336463393262341201411880cab5ee0120a08d06308e9087f9a4f9effd39
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
"error"
:
null
}
}
```
```
...
@@ -263,10 +198,9 @@ response:
...
@@ -263,10 +198,9 @@ response:
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"actionName"
:
"
Guess
StopBet"
,
"actionName"
:
"StopBet"
,
"payload"
:
{
"payload"
:
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
"fee"
:
1000000
}
}
}
}
]
]
...
@@ -276,8 +210,7 @@ response:
...
@@ -276,8 +210,7 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameId|string|停止投注的游戏ID|
|gameID|string|停止投注的游戏ID|
|fee|int64|交易费用,默认1e6|
说明:
说明:
该交易必须由游戏发起地址来创建。
该交易必须由游戏发起地址来创建。
...
@@ -287,7 +220,7 @@ response:
...
@@ -287,7 +220,7 @@ response:
response
:
response
:
{
{
"id"
:
2
,
"id"
:
2
,
"result"
:
"0a12757365722e702e67756573732e6775657373124838071a440a4230786
232653866623332386130613766383836363161333034343937666632353665303830336338613733383734633730633237333935306265373430386566336120c0843d309aeec09c90faca9977
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"result"
:
"0a12757365722e702e67756573732e6775657373124838071a440a4230786
439646464666638343735336531386639303233316561326339323864663665663235656566323461303531663334643232643236326238643364633932623420a08d0630a58a95b2fbd791de2d
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
"error"
:
null
}
}
```
```
...
@@ -297,8 +230,6 @@ response:
...
@@ -297,8 +230,6 @@ response:
|----|----|----|
|----|----|----|
|result|string|交易十六进制编码后的字符串|
|result|string|交易十六进制编码后的字符串|
## 4 公布某局竞猜游戏结果
## 4 公布某局竞猜游戏结果
### 4.1 生成某局游戏公布结果的交易(未签名)
### 4.1 生成某局游戏公布结果的交易(未签名)
**请求报文:**
**请求报文:**
...
@@ -311,11 +242,10 @@ response:
...
@@ -311,11 +242,10 @@ response:
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"actionName"
:
"
Guess
Publish"
,
"actionName"
:
"Publish"
,
"payload"
:
{
"payload"
:
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"result"
:
"B"
,
"result"
:
"B"
"fee"
:
1000000
}
}
}
}
]
]
...
@@ -325,9 +255,8 @@ response:
...
@@ -325,9 +255,8 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameI
d
|string|停止投注的游戏ID|
|gameI
D
|string|停止投注的游戏ID|
|result|string|最终正确选项,与创建游戏中的options对应,为其中某一个选项A/B/C/1/2/3...|
|result|string|最终正确选项,与创建游戏中的options对应,为其中某一个选项A/B/C/1/2/3...|
|fee|int64|交易费用,默认1e6|
说明:
说明:
该交易必须由游戏发起地址来创建。
该交易必须由游戏发起地址来创建。
...
@@ -337,7 +266,7 @@ response:
...
@@ -337,7 +266,7 @@ response:
response
:
response
:
{
{
"id"
:
2
,
"id"
:
2
,
"result"
:
"0a12757365722e702e67756573732e6775657373124b38092a470a4230786
232653866623332386130613766383836363161333034343937666632353665303830336338613733383734633730633237333935306265373430386566336112014220c0843d30fbcebb8df1cab4a927
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"result"
:
"0a12757365722e702e67756573732e6775657373124b38092a470a4230786
439646464666638343735336531386639303233316561326339323864663665663235656566323461303531663334643232643236326238643364633932623412014220a08d0630acd1fbe6f7a3fca673
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
"error"
:
null
}
}
```
```
...
@@ -359,10 +288,9 @@ response:
...
@@ -359,10 +288,9 @@ response:
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"actionName"
:
"
Guess
Abort"
,
"actionName"
:
"Abort"
,
"payload"
:
{
"payload"
:
{
"gameId"
:
"0xdfae36ed64454d27ca76aeac2615ccd92214c72043769fc483152a2cc7d0d757"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
"fee"
:
1000000
}
}
}
}
]
]
...
@@ -372,8 +300,7 @@ response:
...
@@ -372,8 +300,7 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameId|string|停止投注的游戏ID|
|gameID|string|停止投注的游戏ID|
|fee|int64|交易费用,默认1e6|
说明:
说明:
该交易必须由游戏发起地址来创建。
该交易必须由游戏发起地址来创建。
...
@@ -383,7 +310,7 @@ response:
...
@@ -383,7 +310,7 @@ response:
response
:
response
:
{
{
"id"
:
2
,
"id"
:
2
,
"result"
:
"0a12757365722e702e67756573732e67756573731248380822440a42307864
66616533366564363434353464323763613736616561633236313563636439323231346337323034333736396663343833313532613263633764306437353720c0843d30a2cec8e5d3f8b3d147
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"result"
:
"0a12757365722e702e67756573732e67756573731248380822440a42307864
39646464666638343735336531386639303233316561326339323864663665663235656566323461303531663334643232643236326238643364633932623420a08d06308fe5d3f9d6aabcbd61
3a223139455a316e677138703254507335544c70455a77546a6e6e416766746159616e68"
,
"error"
:
null
"error"
:
null
}
}
```
```
...
@@ -408,9 +335,9 @@ request: http.post
...
@@ -408,9 +335,9 @@ request: http.post
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"funcName"
:
"QueryGameByI
d
"
,
"funcName"
:
"QueryGameByI
D
"
,
"payload"
:
{
"payload"
:
{
"gameI
d"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a
"
"gameI
D"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4
"
}
}
}
}
]
]
...
@@ -424,7 +351,7 @@ request: http.post
...
@@ -424,7 +351,7 @@ request: http.post
|method|string|Chain33.Query|
|method|string|Chain33.Query|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|funcName|string|QueryGrameById|
|funcName|string|QueryGrameById|
|gameI
d
|string|游戏ID|
|gameI
D
|string|游戏ID|
**响应报文:**
**响应报文:**
...
@@ -434,12 +361,13 @@ response:
...
@@ -434,12 +361,13 @@ response:
"id"
:
0
,
"id"
:
0
,
"result"
:
{
"result"
:
{
"game"
:
{
"game"
:
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
12
,
"status"
:
15
,
"preStatus"
:
11
,
"preStatus"
:
13
,
"startTime"
:
"1545038969"
,
"startTime"
:
"1546929007"
,
"startHeight"
:
"3069"
,
"startHeight"
:
"2923"
,
"startTxHash"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"startTxHash"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"startIndex"
:
"32900001"
,
"topic"
:
"WorldCup Final"
,
"topic"
:
"WorldCup Final"
,
"category"
:
"football"
,
"category"
:
"football"
,
"options"
:
"A:France;B:Claodia"
,
"options"
:
"A:France;B:Claodia"
,
...
@@ -461,8 +389,8 @@ response:
...
@@ -461,8 +389,8 @@ response:
"betsNumber"
:
"500000000"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
false
,
"isWinner"
:
false
,
"profit"
:
"0"
,
"profit"
:
"0"
,
"index"
:
"
41
300001"
,
"index"
:
"
33
300001"
,
"preIndex"
:
"
0
"
"preIndex"
:
"
33200001
"
}
}
},
},
{
{
...
@@ -470,14 +398,14 @@ response:
...
@@ -470,14 +398,14 @@ response:
"bet"
:
{
"bet"
:
{
"option"
:
"B"
,
"option"
:
"B"
,
"betsNumber"
:
"500000000"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
fals
e
,
"isWinner"
:
tru
e
,
"profit"
:
"0"
,
"profit"
:
"
99000000
0"
,
"index"
:
"
41
300001"
,
"index"
:
"
33
300001"
,
"preIndex"
:
"
0
"
"preIndex"
:
"
33200001
"
}
}
}
}
],
],
"result"
:
""
,
"result"
:
"
B
"
,
"betStat"
:
{
"betStat"
:
{
"totalBetTimes"
:
"2"
,
"totalBetTimes"
:
"2"
,
"totalBetsNumber"
:
"1000000000"
,
"totalBetsNumber"
:
"1000000000"
,
...
@@ -494,8 +422,8 @@ response:
...
@@ -494,8 +422,8 @@ response:
}
}
]
]
},
},
"index"
:
"
41
300001"
,
"index"
:
"
33
300001"
,
"preIndex"
:
"
411
00001"
,
"preIndex"
:
"
332
00001"
,
"drivenByAdmin"
:
true
"drivenByAdmin"
:
true
}
}
},
},
...
@@ -507,13 +435,17 @@ response:
...
@@ -507,13 +435,17 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameI
d
|string|竞猜游戏ID|
|gameI
D
|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|preStatus|int32|上一个状态值,新创建的游戏该值为0|
|preStatus|int32|上一个状态值,新创建的游戏该值为0|
|startTime|int64|创建游戏的事件戳|
|startHeight|int64|创建游戏的区块高度|
|startTxHash|string|创建游戏的txHash|
|startTxHash|string|创建游戏的txHash|
|startIndex|int64|创建游戏的交易index值|
|topic|string|竞猜标题,比如:世界杯决赛法国对阵克罗地亚,谁将获得冠军|
|topic|string|竞猜标题,比如:世界杯决赛法国对阵克罗地亚,谁将获得冠军|
|options|string|竞猜选项,以;分割,:前为选项名称(A/B/C或者1/2/3等)比如:A:法国夺冠;B:克罗地亚夺冠|
|options|string|竞猜选项,以;分割,:前为选项名称(A/B/C或者1/2/3等)比如:A:法国夺冠;B:克罗地亚夺冠|
|category|string|竞猜所属类型,比如"足球","football"等,如果不填归入default|
|category|string|竞猜所属类型,比如"足球","football"等,如果不填归入default|
|maxBetHeight|int64|最大下注高度,从创建游戏的高度开始算起,超过该高度将停止下注|
|maxBetsOneTime|int64|一次最多下注数量,比如:10000e8,表示最多1000个bty或者游戏币|
|maxBetsOneTime|int64|一次最多下注数量,比如:10000e8,表示最多1000个bty或者游戏币|
|maxBetsNumber|int64|一局游戏最多投注数量,比如:1000000e8,表示做多100万个bty或者游戏币|
|maxBetsNumber|int64|一局游戏最多投注数量,比如:1000000e8,表示做多100万个bty或者游戏币|
|devFeeFactor|int64|开发者分成比例,单位1/1000,比如:投注额的5/1000|
|devFeeFactor|int64|开发者分成比例,单位1/1000,比如:投注额的5/1000|
...
@@ -552,7 +484,7 @@ request: http.post
...
@@ -552,7 +484,7 @@ request: http.post
"funcName"
:
"QueryGamesByAddr"
,
"funcName"
:
"QueryGamesByAddr"
,
"payload"
:
{
"payload"
:
{
"addr"
:
"1M3BKgh9hAzY5xcEmCCtAkainjCtrbqU3k"
,
"addr"
:
"1M3BKgh9hAzY5xcEmCCtAkainjCtrbqU3k"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -567,7 +499,7 @@ request: http.post
...
@@ -567,7 +499,7 @@ request: http.post
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|funcName|string|QueryGamesByAddr|
|funcName|string|QueryGamesByAddr|
|addr|string|玩家地址|
|addr|string|玩家地址|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -578,21 +510,19 @@ response:
...
@@ -578,21 +510,19 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0x806c708e568b0de61062c3350a699617de691443fe19d42c3839ee9b190820a4"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
12
,
"startIndex"
:
"32900001"
"index"
:
"38800001"
},
},
{
{
"gameId"
:
"0x215063eed1322a0e19a69dadada80c5cf40cc411144525a430a3ba8b3755adad"
,
"gameID"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3"
,
"status"
:
12
,
"startIndex"
:
"32200001"
"index"
:
"23600001"
},
},
{
{
"gameId"
:
"0x047dd6b6e0021c8254becaf892337c1e012c3598df0603749c0977333ec87002"
,
"gameID"
:
"0x41362e9a14291901214e9bd245c5ff5c5a79726b35e5e10f13bcc797d954d2b0"
,
"status"
:
12
,
"startIndex"
:
"27800001"
"index"
:
"2500001"
}
}
]
],
"primaryKey"
:
"000000000027900001"
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -602,9 +532,10 @@ response:
...
@@ -602,9 +532,10 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameId|string|竞猜游戏ID|
|gameID|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|startIndex|int64|游戏创建时的交易的index值|
|index|int64|游戏切换为当前状态对应的index|
|primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询|
### 6.3 查询指定adminAddr创建的竞猜游戏列表
### 6.3 查询指定adminAddr创建的竞猜游戏列表
...
@@ -622,7 +553,7 @@ request: http.post
...
@@ -622,7 +553,7 @@ request: http.post
"funcName"
:
"QueryGamesByAdminAddr"
,
"funcName"
:
"QueryGamesByAdminAddr"
,
"payload"
:
{
"payload"
:
{
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -637,7 +568,7 @@ request: http.post
...
@@ -637,7 +568,7 @@ request: http.post
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|funcName|string|QueryGamesByAdminAddr|
|funcName|string|QueryGamesByAdminAddr|
|adminAddr|string|创建游戏的地址|
|adminAddr|string|创建游戏的地址|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -648,16 +579,19 @@ response:
...
@@ -648,16 +579,19 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0x417db61d2c9b848fb435d24e4fbe3993097fff71b498cd2291dbe3e8c8321245"
,
"status"
:
11
,
"startIndex"
:
"33400001"
"index"
:
"41100001"
},
},
{
{
"gameId"
:
"0xe55bdc372830e5e8048a3b0f4a9feb29094e762a04e31cd6556613941ee1f8c4"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
11
,
"startIndex"
:
"32900001"
"index"
:
"41000001"
},
{
"gameID"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3"
,
"startIndex"
:
"32200001"
}
}
]
],
"primaryKey"
:
"000000000032200001"
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -667,9 +601,9 @@ response:
...
@@ -667,9 +601,9 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|gameI
d
|string|竞猜游戏ID|
|gameI
D
|string|竞猜游戏ID|
|sta
tus|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout
|
|sta
rtIndex|int64|游戏创建时的交易的index值
|
|
index|int64|游戏切换为当前状态对应的index
|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询
|
### 6.4 查询指定status的竞猜游戏列表
### 6.4 查询指定status的竞猜游戏列表
...
@@ -687,7 +621,7 @@ request: http.post
...
@@ -687,7 +621,7 @@ request: http.post
"funcName"
:
"QueryGamesByStatus"
,
"funcName"
:
"QueryGamesByStatus"
,
"payload"
:
{
"payload"
:
{
"status"
:
"11"
,
"status"
:
"11"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -702,7 +636,7 @@ request: http.post
...
@@ -702,7 +636,7 @@ request: http.post
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|funcName|string|QueryGamesByStatus|
|funcName|string|QueryGamesByStatus|
|status|int32|状态值|
|status|int32|状态值|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -713,21 +647,11 @@ response:
...
@@ -713,21 +647,11 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0x417db61d2c9b848fb435d24e4fbe3993097fff71b498cd2291dbe3e8c8321245"
,
"status"
:
11
,
"startIndex"
:
"33400001"
"index"
:
"41100001"
},
{
"gameId"
:
"0xe55bdc372830e5e8048a3b0f4a9feb29094e762a04e31cd6556613941ee1f8c4"
,
"status"
:
11
,
"index"
:
"41000001"
},
{
"gameId"
:
"0x298bcbc5e199c6fd941e4aa790ff7ad5702352f3b66d6296e1df32ec1ecc361a"
,
"status"
:
11
,
"index"
:
"24300001"
}
}
]
],
"primaryKey"
:
""
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -739,7 +663,7 @@ response:
...
@@ -739,7 +663,7 @@ response:
|----|----|----|
|----|----|----|
|gameId|string|竞猜游戏ID|
|gameId|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|
index|int64|游戏切换为当前状态对应的index
|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询
|
### 6.5 查询指定addr的指定status的竞猜游戏列表
### 6.5 查询指定addr的指定status的竞猜游戏列表
...
@@ -756,9 +680,9 @@ request: http.post
...
@@ -756,9 +680,9 @@ request: http.post
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"funcName"
:
"QueryGamesByAddrStatus"
,
"funcName"
:
"QueryGamesByAddrStatus"
,
"payload"
:
{
"payload"
:
{
"addr"
:
"1
4KEKbYtKKQm4wMthSK9J4La4nAiidGozt
"
,
"addr"
:
"1
M3BKgh9hAzY5xcEmCCtAkainjCtrbqU3k
"
,
"status"
:
"1
4
"
,
"status"
:
"1
5
"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -774,7 +698,7 @@ request: http.post
...
@@ -774,7 +698,7 @@ request: http.post
|funcName|string|QueryGamesByStatus|
|funcName|string|QueryGamesByStatus|
|addr|string|玩家地址|
|addr|string|玩家地址|
|status|int32|状态值|
|status|int32|状态值|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -785,16 +709,19 @@ response:
...
@@ -785,16 +709,19 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0x56a8bc427ecc0578eba02063b36929cc1e4b0995630954c8c8b6b4dd840bc69d"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
14
,
"startIndex"
:
"32900001"
"index"
:
"11300001"
},
{
"gameID"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3"
,
"startIndex"
:
"32200001"
},
},
{
{
"gameId"
:
"0xafe2b9e70ad67476b131112ba465fa611d4197136e9cbd3632bf42cba4e84714"
,
"gameID"
:
"0x41362e9a14291901214e9bd245c5ff5c5a79726b35e5e10f13bcc797d954d2b0"
,
"status"
:
14
,
"startIndex"
:
"27800001"
"index"
:
"3700001"
}
}
]
],
"primaryKey"
:
"000000000027900001"
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -806,7 +733,7 @@ response:
...
@@ -806,7 +733,7 @@ response:
|----|----|----|
|----|----|----|
|gameId|string|竞猜游戏ID|
|gameId|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|
index|int64|游戏切换为当前状态对应的index
|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询
|
### 6.6 查询指定adminAddr的指定status的竞猜游戏列表
### 6.6 查询指定adminAddr的指定status的竞猜游戏列表
...
@@ -824,8 +751,8 @@ request: http.post
...
@@ -824,8 +751,8 @@ request: http.post
"funcName"
:
"QueryGamesByAdminStatus"
,
"funcName"
:
"QueryGamesByAdminStatus"
,
"payload"
:
{
"payload"
:
{
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"status"
:
"1
2
"
,
"status"
:
"1
1
"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -841,7 +768,7 @@ request: http.post
...
@@ -841,7 +768,7 @@ request: http.post
|funcName|string|QueryGamesByStatus|
|funcName|string|QueryGamesByStatus|
|adminAddr|string|游戏创建者地址|
|adminAddr|string|游戏创建者地址|
|status|int32|状态值|
|status|int32|状态值|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -852,21 +779,11 @@ response:
...
@@ -852,21 +779,11 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0x4d01c300e19d211b878e014b2b1e806983ddcb6db230a21d11708b15219fdf2f"
,
"gameID"
:
"0x417db61d2c9b848fb435d24e4fbe3993097fff71b498cd2291dbe3e8c8321245"
,
"status"
:
12
,
"startIndex"
:
"33400001"
"index"
:
"14400001"
},
{
"gameId"
:
"0x858a9154c814939fed41a8c533f8bfcec61b776ccadf32b60682eb30161775fd"
,
"status"
:
12
,
"index"
:
"13800001"
},
{
"gameId"
:
"0x76dae82fcbe554d4b8df5ed1460d71dcac86a50864649a0df43e0c50b245f004"
,
"status"
:
12
,
"index"
:
"11700001"
}
}
]
],
"primaryKey"
:
""
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -878,7 +795,7 @@ response:
...
@@ -878,7 +795,7 @@ response:
|----|----|----|
|----|----|----|
|gameId|string|竞猜游戏ID|
|gameId|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|
index|int64|游戏切换为当前状态对应的index
|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询
|
### 6.7 查询指定category的指定status的竞猜游戏列表
### 6.7 查询指定category的指定status的竞猜游戏列表
...
@@ -896,8 +813,8 @@ request: http.post
...
@@ -896,8 +813,8 @@ request: http.post
"funcName"
:
"QueryGamesByCategoryStatus"
,
"funcName"
:
"QueryGamesByCategoryStatus"
,
"payload"
:
{
"payload"
:
{
"category"
:
"football"
,
"category"
:
"football"
,
"status"
:
"1
1
"
,
"status"
:
"1
5
"
,
"
index"
:
"0
"
"
primaryKey"
:
"
"
}
}
}
}
]
]
...
@@ -914,7 +831,7 @@ request: http.post
...
@@ -914,7 +831,7 @@ request: http.post
|adminAddr|string|游戏创建者地址|
|adminAddr|string|游戏创建者地址|
|category|string|分类名称|
|category|string|分类名称|
|status|int32|状态值|
|status|int32|状态值|
|
index|int64|记录的index,用于分页
查询|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续
查询|
**响应报文:**
**响应报文:**
...
@@ -925,16 +842,19 @@ response:
...
@@ -925,16 +842,19 @@ response:
"result"
:
{
"result"
:
{
"records"
:
[
"records"
:
[
{
{
"gameId"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
11
,
"startIndex"
:
"32900001"
"index"
:
"41100001"
},
},
{
{
"gameId"
:
"0xae7f35ccd363b02596a7d0feeb55beb4352ec605c2e364681c714131551e4199"
,
"gameID"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3"
,
"status"
:
11
,
"startIndex"
:
"32200001"
"index"
:
"2900001"
},
{
"gameID"
:
"0x41362e9a14291901214e9bd245c5ff5c5a79726b35e5e10f13bcc797d954d2b0"
,
"startIndex"
:
"27800001"
}
}
]
],
"primaryKey"
:
"000000000027800001"
},
},
"error"
:
null
"error"
:
null
}
}
...
@@ -946,7 +866,7 @@ response:
...
@@ -946,7 +866,7 @@ response:
|----|----|----|
|----|----|----|
|gameId|string|竞猜游戏ID|
|gameId|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
|
index|int64|游戏切换为当前状态对应的index
|
|
primaryKey|string|分页查询的primarykey,如果因为数据比较多导致一次不能获取所有数据,后续查询可以带上前一次查询的primaryKey进行继续查询
|
### 6.8 查询指定ID组的竞猜游戏详情
### 6.8 查询指定ID组的竞猜游戏详情
...
@@ -961,11 +881,11 @@ request: http.post
...
@@ -961,11 +881,11 @@ request: http.post
"params"
:
[
"params"
:
[
{
{
"execer"
:
"guess"
,
"execer"
:
"guess"
,
"funcName"
:
"QueryGamesByI
d
s"
,
"funcName"
:
"QueryGamesByI
D
s"
,
"payload"
:
{
"payload"
:
{
"gameI
d
s"
:
[
"gameI
D
s"
:
[
"0x
09c972ddf49bc52269cc6c6426691a360bf2e60544588b8135c6f833f732ee96
"
,
"0x
d9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4
"
,
"0x
b2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a
"
"0x
386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3
"
]
]
}
}
}
}
...
@@ -980,23 +900,24 @@ request: http.post
...
@@ -980,23 +900,24 @@ request: http.post
|method|string|Chain33.Query|
|method|string|Chain33.Query|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|execer|string|执行器名,主链上:token, 平行链上:user.p.xxx.token|
|funcName|string|QueryGrameById|
|funcName|string|QueryGrameById|
|gameI
d
s|
[
]string|游戏ID列表|
|gameI
D
s|
[
]string|游戏ID列表|
**响应报文:**
**响应报文:**
```
json
```
json
response
:
response
:
{
{
{
"id"
:
0
,
"id"
:
0
,
"result"
:
{
"result"
:
{
"games"
:
[
"games"
:
[
{
{
"gameId"
:
"0x09c972ddf49bc52269cc6c6426691a360bf2e60544588b8135c6f833f732ee96"
,
"gameID"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"status"
:
13
,
"status"
:
15
,
"preStatus"
:
11
,
"preStatus"
:
13
,
"startTime"
:
"1545045874"
,
"startTime"
:
"1546929007"
,
"startHeight"
:
"3137"
,
"startHeight"
:
"2923"
,
"startTxHash"
:
"0x09c972ddf49bc52269cc6c6426691a360bf2e60544588b8135c6f833f732ee96"
,
"startTxHash"
:
"0xd9dddff84753e18f90231ea2c928df6ef25eef24a051f34d22d262b8d3dc92b4"
,
"startIndex"
:
"32900001"
,
"topic"
:
"WorldCup Final"
,
"topic"
:
"WorldCup Final"
,
"category"
:
"football"
,
"category"
:
"football"
,
"options"
:
"A:France;B:Claodia"
,
"options"
:
"A:France;B:Claodia"
,
...
@@ -1009,38 +930,60 @@ response:
...
@@ -1009,38 +930,60 @@ response:
"platFeeAddr"
:
"1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
,
"platFeeAddr"
:
"1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX"
,
"expireHeight"
:
"1000000"
,
"expireHeight"
:
"1000000"
,
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"adminAddr"
:
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
,
"betsNumber"
:
"0"
,
"betsNumber"
:
"
100000000
0"
,
"plays"
:
[
"plays"
:
[
{
"addr"
:
"1M3BKgh9hAzY5xcEmCCtAkainjCtrbqU3k"
,
"bet"
:
{
"option"
:
"A"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
false
,
"profit"
:
"0"
,
"index"
:
"33300001"
,
"preIndex"
:
"33200001"
}
},
{
"addr"
:
"1hb93FMDVVxhfzK2ziDLCZqL3wxggoFZU"
,
"bet"
:
{
"option"
:
"B"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
true
,
"profit"
:
"990000000"
,
"index"
:
"33300001"
,
"preIndex"
:
"33200001"
}
}
],
],
"result"
:
""
,
"result"
:
"
B
"
,
"betStat"
:
{
"betStat"
:
{
"totalBetTimes"
:
"
0
"
,
"totalBetTimes"
:
"
2
"
,
"totalBetsNumber"
:
"0"
,
"totalBetsNumber"
:
"
100000000
0"
,
"items"
:
[
"items"
:
[
{
{
"option"
:
"A"
,
"option"
:
"A"
,
"betsNumber"
:
"0"
,
"betsNumber"
:
"
50000000
0"
,
"betsTimes"
:
"
0
"
"betsTimes"
:
"
1
"
},
},
{
{
"option"
:
"B"
,
"option"
:
"B"
,
"betsNumber"
:
"0"
,
"betsNumber"
:
"
50000000
0"
,
"betsTimes"
:
"
0
"
"betsTimes"
:
"
1
"
}
}
]
]
},
},
"index"
:
"
434
00001"
,
"index"
:
"
333
00001"
,
"preIndex"
:
"
4
3200001"
,
"preIndex"
:
"
3
3200001"
,
"drivenByAdmin"
:
true
"drivenByAdmin"
:
true
},
},
{
{
"gameI
d"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a
"
,
"gameI
D"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3
"
,
"status"
:
15
,
"status"
:
15
,
"preStatus"
:
13
,
"preStatus"
:
13
,
"startTime"
:
"1545038969"
,
"startTime"
:
"1546926748"
,
"startHeight"
:
"3069"
,
"startHeight"
:
"2900"
,
"startTxHash"
:
"0xb2e8fb328a0a7f88661a304497ff256e0803c8a73874c70c273950be7408ef3a"
,
"startTxHash"
:
"0x386a04a589f08d056451d1258968d323e2f6e7290288daab76596b6631a62ff3"
,
"startIndex"
:
"32200001"
,
"topic"
:
"WorldCup Final"
,
"topic"
:
"WorldCup Final"
,
"category"
:
"football"
,
"category"
:
"football"
,
"options"
:
"A:France;B:Claodia"
,
"options"
:
"A:France;B:Claodia"
,
...
@@ -1062,8 +1005,8 @@ response:
...
@@ -1062,8 +1005,8 @@ response:
"betsNumber"
:
"500000000"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
false
,
"isWinner"
:
false
,
"profit"
:
"0"
,
"profit"
:
"0"
,
"index"
:
"
416
00001"
,
"index"
:
"
325
00001"
,
"preIndex"
:
"
415
00001"
"preIndex"
:
"
324
00001"
}
}
},
},
{
{
...
@@ -1073,8 +1016,8 @@ response:
...
@@ -1073,8 +1016,8 @@ response:
"betsNumber"
:
"500000000"
,
"betsNumber"
:
"500000000"
,
"isWinner"
:
true
,
"isWinner"
:
true
,
"profit"
:
"990000000"
,
"profit"
:
"990000000"
,
"index"
:
"
416
00001"
,
"index"
:
"
325
00001"
,
"preIndex"
:
"
415
00001"
"preIndex"
:
"
324
00001"
}
}
}
}
],
],
...
@@ -1095,8 +1038,8 @@ response:
...
@@ -1095,8 +1038,8 @@ response:
}
}
]
]
},
},
"index"
:
"
416
00001"
,
"index"
:
"
325
00001"
,
"preIndex"
:
"
415
00001"
,
"preIndex"
:
"
324
00001"
,
"drivenByAdmin"
:
true
"drivenByAdmin"
:
true
}
}
]
]
...
@@ -1110,34 +1053,8 @@ response:
...
@@ -1110,34 +1053,8 @@ response:
|参数|类型|说明|
|参数|类型|说明|
|----|----|----|
|----|----|----|
|games|
[
]GuessGame
]
|游戏详情列表|
|games|
[
]GuessGame
]
|游戏详情列表|
|gameId|string|竞猜游戏ID|
|status|int32|游戏状态,11为start,12为bet,13为stopBet,14为abort,15为publish,16为timeout|
GuessGame的定义参见6.1中的描述
|preStatus|int32|上一个状态值,新创建的游戏该值为0|
|startTxHash|string|创建游戏的txHash|
|topic|string|竞猜标题,比如:世界杯决赛法国对阵克罗地亚,谁将获得冠军|
|options|string|竞猜选项,以;分割,:前为选项名称(A/B/C或者1/2/3等)比如:A:法国夺冠;B:克罗地亚夺冠|
|category|string|竞猜所属类型,比如"足球","football"等,如果不填归入default|
|maxBetsOneTime|int64|一次最多下注数量,比如:10000e8,表示最多1000个bty或者游戏币|
|maxBetsNumber|int64|一局游戏最多投注数量,比如:1000000e8,表示做多100万个bty或者游戏币|
|devFeeFactor|int64|开发者分成比例,单位1/1000,比如:投注额的5/1000|
|devFeeAddr|string|开发者分成账户地址,默认为:1D6RFZNp2rh6QdbcZ1d7RWuBUz61We6SD7|
|platFeeFactor|int64|平台方分成比例,单位1/1000,比如:投注额的5/1000|
|platFeeAddr|string|1PHtChNt3UcfssR7v7trKSk3WJtAWjKjjX|
|adminAddr|string|游戏创建地址|
|betsNumber|int64|已下注数量|
|result|string|游戏结果|
|index|int64|游戏切换为当前状态对应的index|
|preIndex|int64|游戏前一个状态对应的index|
|drivenByAdmin|bool|是否完全为管理员驱动,默认:是|
|plays|GuessPlayer|玩家信息|
|GuessPlayer.addr|string|玩家地址信息|
|GuessPlayer.bet|GuessBet|玩家下注信息|
|GuessBet.option|string|玩家下注选项|
|GuessBet.betsNumber|int64|玩家下注数量|
|GuessBet.isWinner|bool|玩家是否获胜|
|GuessBet.profit|int64|获胜奖励|
|GuessBet.index|int64|当前状态索引|
|GuessBet.preIndex|int64|前一个状态的索引,如果无,为0|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment