duelfi_web/src/idl/bets_idl.json
2025-07-30 14:53:01 +05:30

2485 lines
50 KiB
JSON

{
"address": "Haj94DF925qNRgcoRwQfNsVLKgSmFhG4bjgtvusMkkpD",
"metadata": {
"name": "bets",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "buy_tickets",
"discriminator": [
48,
16,
122,
137,
24,
214,
198,
58
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_sale_vault",
"writable": true,
"address": "9esrj2X33pr5og6fdkDMjaW6fdnnb9hT1cWshamxTdL4"
},
{
"name": "ticket_leaderboard_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "ticket_leaderboard_list_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "ticket_leaderboard_list"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "user_token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "payer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "token_mint"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "amount",
"type": "u64"
}
]
},
{
"name": "clear_bets_list",
"discriminator": [
128,
73,
20,
28,
69,
26,
247,
185
],
"accounts": [
{
"name": "bets_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "payer",
"writable": true,
"signer": true
}
],
"args": []
},
{
"name": "close_bet",
"discriminator": [
185,
206,
13,
184,
176,
108,
140,
107
],
"accounts": [
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true
},
{
"name": "winner",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "winner",
"type": "pubkey"
},
{
"name": "userid",
"type": "string"
}
]
},
{
"name": "close_bet_token",
"discriminator": [
253,
179,
157,
65,
93,
13,
142,
130
],
"accounts": [
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
95,
118,
97,
117,
108,
116
]
},
{
"kind": "arg",
"path": "owner"
},
{
"kind": "arg",
"path": "game_id"
},
{
"kind": "arg",
"path": "nonce"
}
]
}
},
{
"name": "winner",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "token_mint"
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "bet_vault"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "winner_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "arg",
"path": "winner"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "winner",
"type": "pubkey"
},
{
"name": "userid",
"type": "string"
},
{
"name": "owner",
"type": "pubkey"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "nonce",
"type": "u64"
}
]
},
{
"name": "create_bet",
"discriminator": [
197,
42,
153,
2,
59,
63,
143,
246
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
95,
118,
97,
117,
108,
116
]
},
{
"kind": "account",
"path": "payer"
},
{
"kind": "arg",
"path": "game_id"
},
{
"kind": "arg",
"path": "_nonce"
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "wager",
"type": "u64"
},
{
"name": "user_id",
"type": "string"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "nonce",
"type": "u64"
}
]
},
{
"name": "create_bet_token",
"discriminator": [
112,
150,
197,
85,
168,
49,
140,
199
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "token_mint"
},
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
95,
118,
97,
117,
108,
116
]
},
{
"kind": "account",
"path": "payer"
},
{
"kind": "arg",
"path": "game_id"
},
{
"kind": "arg",
"path": "_nonce"
}
]
}
},
{
"name": "payer_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "payer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "bet_vault"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "wager",
"type": "u64"
},
{
"name": "user_id",
"type": "string"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "nonce",
"type": "u64"
}
]
},
{
"name": "create_leaderboard",
"discriminator": [
154,
109,
101,
182,
52,
26,
30,
220
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_leaderboard_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "ticket_leaderboard",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "ticket_leaderboard"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "token_mint"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "id",
"type": "u64"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "entry_ticket_count",
"type": "u64"
},
{
"name": "max_attempt_count",
"type": "u64"
}
]
},
{
"name": "deduct_fees",
"discriminator": [
249,
7,
117,
167,
160,
108,
235,
14
],
"accounts": [
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true
},
{
"name": "fee_wallet",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "owner_referrer",
"writable": true
},
{
"name": "joiner_referrer",
"writable": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "winner",
"type": "pubkey"
},
{
"name": "userid",
"type": "string"
}
]
},
{
"name": "deduct_fees_token",
"discriminator": [
92,
93,
60,
121,
30,
164,
148,
135
],
"accounts": [
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
95,
118,
97,
117,
108,
116
]
},
{
"kind": "arg",
"path": "owner"
},
{
"kind": "arg",
"path": "game_id"
},
{
"kind": "arg",
"path": "nonce"
}
]
}
},
{
"name": "fee_wallet",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "owner_referrer",
"writable": true
},
{
"name": "joiner_referrer",
"writable": true
},
{
"name": "token_mint"
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "bet_vault"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "fee_wallet_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "fee_wallet"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "owner_referrer_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "owner_referrer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "joiner_referrer_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "joiner_referrer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "winner",
"type": "pubkey"
},
{
"name": "userid",
"type": "string"
},
{
"name": "owner",
"type": "pubkey"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "nonce",
"type": "u64"
}
]
},
{
"name": "enter_leaderboard",
"discriminator": [
208,
161,
98,
92,
179,
167,
110,
209
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_leaderboard",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "receipt_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
114,
101,
99,
101,
105,
112,
116,
95,
97,
99,
99,
111,
117,
110,
116
]
},
{
"kind": "account",
"path": "payer"
}
]
}
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "ticket_leaderboard"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "user_token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "payer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "token_mint"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "id",
"type": "u64"
},
{
"name": "uid",
"type": "string"
}
]
},
{
"name": "init_leaderboard_list",
"discriminator": [
89,
158,
224,
193,
201,
12,
186,
235
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_leaderboard_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "bets_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
98,
101,
116,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "join_bet",
"discriminator": [
69,
116,
82,
26,
144,
192,
58,
238
],
"accounts": [
{
"name": "bet_vault",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "user_id",
"type": "string"
},
{
"name": "game_id",
"type": "string"
}
]
},
{
"name": "join_bet_token",
"discriminator": [
166,
253,
62,
118,
163,
87,
166,
204
],
"accounts": [
{
"name": "bet_vault",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "token_mint"
},
{
"name": "payer_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "payer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "token_vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "bet_vault"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "token_mint"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
},
{
"name": "token_program"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
}
],
"args": [
{
"name": "user_id",
"type": "string"
},
{
"name": "game_id",
"type": "string"
}
]
},
{
"name": "refund_bet",
"discriminator": [
209,
182,
226,
96,
55,
121,
83,
183
],
"accounts": [
{
"name": "bets_list",
"writable": true
},
{
"name": "bet_vault",
"writable": true
},
{
"name": "owner",
"writable": true
},
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "owner",
"type": "pubkey"
}
]
},
{
"name": "remove_leaderboard",
"discriminator": [
29,
12,
95,
227,
152,
229,
242,
208
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_leaderboard_list",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100,
115,
95,
108,
105,
115,
116
]
}
]
}
},
{
"name": "ticket_leaderboard",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "id",
"type": "u64"
}
]
},
{
"name": "update_leaderboard",
"discriminator": [
72,
95,
102,
32,
118,
158,
247,
34
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "ticket_leaderboard",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
105,
99,
107,
101,
116,
95,
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "leaderboard_entry",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
108,
101,
97,
100,
101,
114,
98,
111,
97,
114,
100,
95,
101,
110,
116,
114,
121
]
},
{
"kind": "account",
"path": "ticket_leaderboard"
},
{
"kind": "arg",
"path": "player"
}
]
}
},
{
"name": "receipt_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
114,
101,
99,
101,
105,
112,
116,
95,
97,
99,
99,
111,
117,
110,
116
]
},
{
"kind": "arg",
"path": "player"
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "id",
"type": "u64"
},
{
"name": "player",
"type": "pubkey"
},
{
"name": "new_score",
"type": "u64"
}
]
}
],
"accounts": [
{
"name": "BetVault",
"discriminator": [
103,
78,
21,
234,
18,
250,
230,
209
]
},
{
"name": "BetsList",
"discriminator": [
231,
234,
50,
58,
81,
179,
239,
117
]
},
{
"name": "LeaderboardEntry",
"discriminator": [
187,
21,
182,
152,
7,
55,
20,
16
]
},
{
"name": "TicketLeaderboard",
"discriminator": [
243,
76,
144,
163,
179,
51,
129,
205
]
},
{
"name": "TicketLeaderboardList",
"discriminator": [
25,
203,
207,
174,
80,
237,
181,
52
]
},
{
"name": "TicketReceiptVault",
"discriminator": [
123,
35,
146,
36,
216,
196,
151,
223
]
}
],
"errors": [
{
"code": 6000,
"name": "BetNotFilled",
"msg": "Bet is not filled yet!"
},
{
"code": 6001,
"name": "BetAlreadyFilled",
"msg": "Bet is already filled"
},
{
"code": 6002,
"name": "InvalidWinner",
"msg": "The winner must be either the owner or the joiner of the bet."
},
{
"code": 6003,
"name": "InvalidFeeCollector",
"msg": "Please use the correct fee collector address"
},
{
"code": 6004,
"name": "JoinerAccountNotProvided",
"msg": "Joiner account not provided"
},
{
"code": 6005,
"name": "InsufficientFunds",
"msg": "Insufficient funds"
},
{
"code": 6006,
"name": "FeeCalculationError",
"msg": "Fee calculation error"
},
{
"code": 6007,
"name": "InvalidTicketSaleVault",
"msg": "Invalid ticket sale vault address"
}
],
"types": [
{
"name": "BetVault",
"type": {
"kind": "struct",
"fields": [
{
"name": "nonce",
"type": "u64"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "owner",
"type": "pubkey"
},
{
"name": "owner_id",
"type": "string"
},
{
"name": "joiner",
"type": "pubkey"
},
{
"name": "joiner_id",
"type": "string"
},
{
"name": "token_mint",
"type": "pubkey"
},
{
"name": "wager",
"type": "u64"
}
]
}
},
{
"name": "BetsList",
"type": {
"kind": "struct",
"fields": [
{
"name": "bets",
"type": {
"vec": "pubkey"
}
}
]
}
},
{
"name": "LeaderboardEntry",
"type": {
"kind": "struct",
"fields": [
{
"name": "uid",
"type": "string"
},
{
"name": "highscore",
"type": "u64"
},
{
"name": "total_tickets",
"type": "u64"
}
]
}
},
{
"name": "TicketLeaderboard",
"type": {
"kind": "struct",
"fields": [
{
"name": "id",
"type": "u64"
},
{
"name": "game_id",
"type": "string"
},
{
"name": "players",
"type": {
"vec": "pubkey"
}
},
{
"name": "entry_ticket_count",
"type": "u64"
},
{
"name": "max_attempts",
"type": "u64"
},
{
"name": "is_over",
"type": "bool"
}
]
}
},
{
"name": "TicketLeaderboardList",
"type": {
"kind": "struct",
"fields": [
{
"name": "leaderboards",
"type": {
"vec": "pubkey"
}
}
]
}
},
{
"name": "TicketReceiptVault",
"type": {
"kind": "struct",
"fields": [
{
"name": "id",
"type": "u64"
},
{
"name": "uid",
"type": "string"
},
{
"name": "active",
"type": "bool"
}
]
}
}
],
"constants": [
{
"name": "FEE_COLLECTOR",
"type": "string",
"value": "\"9esrj2X33pr5og6fdkDMjaW6fdnnb9hT1cWshamxTdL4\""
},
{
"name": "LEADERBOARD_ENTRY_SEED",
"type": "bytes",
"value": "[108, 101, 97, 100, 101, 114, 98, 111, 97, 114, 100, 95, 101, 110, 116, 114, 121]"
},
{
"name": "RECEIPT_ACCOUNT_SEED",
"type": "bytes",
"value": "[114, 101, 99, 101, 105, 112, 116, 95, 97, 99, 99, 111, 117, 110, 116]"
},
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
},
{
"name": "TICKET_LEADERBOARD_LIST_SEED",
"type": "bytes",
"value": "[116, 105, 99, 107, 101, 116, 95, 108, 101, 97, 100, 101, 114, 98, 111, 97, 114, 100, 115, 95, 108, 105, 115, 116]"
},
{
"name": "TICKET_LEADERBOARD_SEED",
"type": "bytes",
"value": "[116, 105, 99, 107, 101, 116, 95, 108, 101, 97, 100, 101, 114, 98, 111, 97, 114, 100]"
},
{
"name": "TICKET_SALE_VAULT_ADDRESS",
"type": "string",
"value": "\"9esrj2X33pr5og6fdkDMjaW6fdnnb9hT1cWshamxTdL4\""
}
]
}