-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrps.abi
120 lines (120 loc) · 2.48 KB
/
rps.abi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"types": [],
"structs": [{
"name": "game",
"base": "",
"fields": {
"id": "uint64",
"foe": "account_name",
"host": "account_name",
"host_moves": "moves",
"foe_moves": "moves",
"round": "uint8",
"round_winner": "account_name[]",
"game_winner": "account_name",
"host_stake": "uint64",
"foe_stake": "uint64",
"created_time": "time",
"is_active": "uint8"
}
},{
"name": "moves",
"base": "",
"fields": {
"moves_val": "string[]",
"nonces": "string[]",
"hashed_moves": "checksum[]",
"submit_turn": "uint8",
"reveal_turn": "uint8"
}
},{
"name": "create",
"base": "",
"fields": {
"host": "account_name",
"foe": "account_name"
}
},{
"name": "submit",
"base": "",
"fields": {
"game_id": "uint64",
"by": "account_name",
"hashed_move": "checksum"
}
},{
"name": "reveal",
"base": "",
"fields": {
"game_id": "uint64",
"by": "account_name",
"move": "string",
"nonce": "string"
}
},{
"name": "cancel",
"base": "",
"fields": {
"game_id": "uint64",
"by": "account_name"
}
},{
"name": "stake",
"base": "",
"fields": {
"game_id": "uint64",
"amount": "uint64",
"by": "account_name"
}
},{
"name": "withdraw",
"base": "",
"fields": {
"by": "account_name",
"amount": "uint64"
}
},{
"name": "balance",
"base": "",
"fields": {
"key": "account_name",
"locked_amount": "uint64",
"avail_amount": "uint64"
}
}
],
"actions": [{
"action_name": "create",
"type": "create"
},{
"action_name": "submit",
"type": "submit"
},{
"action_name": "reveal",
"type": "reveal"
},{
"action_name": "cancel",
"type": "cancel"
},{
"action_name": "stake",
"type": "stake"
},{
"action_name": "withdraw",
"type": "withdraw"
}
],
"tables": [{
"table_name": "games",
"type": "game",
"index_type": "i64",
"key_names" : ["id"],
"key_types" : ["uint64"]
}, {
"table_name": "balance",
"type": "balance",
"index_type": "i64",
"key_names" : ["key"],
"key_types" : ["account_name"]
}
]
}