mhunt_tournaments_anchor/tournaments.json

714 lines
14 KiB
JSON

{
"address": "F5ECXfrZwMyWv5WusMJD7bYSRjEEXYLLPy6TN3XqQBPA",
"metadata": {
"name": "tournaments",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "add_tournament",
"discriminator": [
86,
126,
171,
66,
224,
148,
167,
201
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "tournament_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
111,
117,
114,
110,
97,
109,
101,
110,
116
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "data_registry",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
115,
97,
108,
101,
115,
95,
114,
101,
103
]
}
]
}
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "id",
"type": "u64"
},
{
"name": "start_time",
"type": "string"
}
]
},
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "signer",
"writable": true,
"signer": true
},
{
"name": "data_registry",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
115,
97,
108,
101,
115,
95,
114,
101,
103
]
}
]
}
},
{
"name": "mint"
},
{
"name": "vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "data_registry"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "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": "join_tournament",
"discriminator": [
77,
21,
212,
206,
77,
82,
124,
31
],
"accounts": [
{
"name": "user",
"writable": true,
"signer": true
},
{
"name": "user_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "user"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "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": "tournament_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
116,
111,
117,
114,
110,
97,
109,
101,
110,
116
]
},
{
"kind": "arg",
"path": "id"
}
]
}
},
{
"name": "data_registry",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
115,
97,
108,
101,
115,
95,
114,
101,
103
]
}
]
}
},
{
"name": "mint"
},
{
"name": "vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "data_registry"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "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": "id",
"type": "u64"
}
]
},
{
"name": "purchase_tickets",
"discriminator": [
146,
121,
85,
207,
182,
70,
169,
155
],
"accounts": [
{
"name": "buyer",
"writable": true,
"signer": true
},
{
"name": "mint"
},
{
"name": "author",
"writable": true
},
{
"name": "buyer_token_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "buyer"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "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": "data_registry",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
115,
97,
108,
101,
115,
95,
114,
101,
103
]
}
]
}
},
{
"name": "vault",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "data_registry"
},
{
"kind": "account",
"path": "token_program"
},
{
"kind": "account",
"path": "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": "amount",
"type": "u64"
}
]
}
],
"accounts": [
{
"name": "DataRegistry",
"discriminator": [
169,
50,
35,
17,
11,
106,
49,
193
]
},
{
"name": "Tournament",
"discriminator": [
175,
139,
119,
242,
115,
194,
57,
92
]
}
],
"errors": [
{
"code": 6000,
"name": "CustomError",
"msg": "Custom error message"
},
{
"code": 6001,
"name": "InsufficientFunds",
"msg": "Insufficient funds to purchase a ticket, Recharge your wallet and try again"
},
{
"code": 6002,
"name": "Unauthorized",
"msg": "Only the owner can perform this action"
},
{
"code": 6003,
"name": "ExistingTournament",
"msg": "This tournament ID already exists, use a different one"
}
],
"types": [
{
"name": "DataRegistry",
"type": {
"kind": "struct",
"fields": [
{
"name": "sales_pda",
"type": "pubkey"
},
{
"name": "authority",
"type": "pubkey"
},
{
"name": "tournament_ids",
"type": {
"vec": "u64"
}
}
]
}
},
{
"name": "Tournament",
"type": {
"kind": "struct",
"fields": [
{
"name": "id",
"type": "u64"
},
{
"name": "participants",
"type": {
"vec": "pubkey"
}
},
{
"name": "start_time",
"type": "string"
}
]
}
}
],
"constants": [
{
"name": "DATA_REGISTRY_SEED",
"type": {
"array": [
"u8",
9
]
},
"value": "[115, 97, 108, 101, 115, 95, 114, 101, 103]"
},
{
"name": "ID",
"type": "string",
"value": "\"\""
},
{
"name": "TOURNAMENT_SEED",
"type": {
"array": [
"u8",
10
]
},
"value": "[116, 111, 117, 114, 110, 97, 109, 101, 110, 116]"
}
]
}