4623 lines
95 KiB
JSON
4623 lines
95 KiB
JSON
{
|
|
"address": "HrS1KpYRWfg9xUom8jnGqoRAayVCxHxukeb18C4WKAkE",
|
|
"metadata": {
|
|
"name": "betfun",
|
|
"version": "0.1.0",
|
|
"spec": "0.1.0",
|
|
"description": "BetFun Arena - Prediction market battles on Solana"
|
|
},
|
|
"instructions": [
|
|
{
|
|
"name": "add_liquidity",
|
|
"docs": [
|
|
"Add liquidity to an AMM pool"
|
|
],
|
|
"discriminator": [
|
|
181,
|
|
157,
|
|
89,
|
|
67,
|
|
143,
|
|
182,
|
|
52,
|
|
72
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "pool",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
109,
|
|
109,
|
|
95,
|
|
112,
|
|
111,
|
|
111,
|
|
108
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool.outcome_index",
|
|
"account": "AMMPool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "lp_token_mint",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "pool_token_vault",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "provider_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "provider_lp_token_account",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "account",
|
|
"path": "provider"
|
|
},
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
6,
|
|
221,
|
|
246,
|
|
225,
|
|
215,
|
|
101,
|
|
161,
|
|
147,
|
|
217,
|
|
203,
|
|
225,
|
|
70,
|
|
206,
|
|
235,
|
|
121,
|
|
172,
|
|
28,
|
|
180,
|
|
133,
|
|
237,
|
|
95,
|
|
91,
|
|
55,
|
|
145,
|
|
58,
|
|
140,
|
|
245,
|
|
133,
|
|
126,
|
|
255,
|
|
0,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "lp_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": "liquidity_position",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
108,
|
|
105,
|
|
113,
|
|
117,
|
|
105,
|
|
100,
|
|
105,
|
|
116,
|
|
121,
|
|
95,
|
|
112,
|
|
111,
|
|
115,
|
|
105,
|
|
116,
|
|
105,
|
|
111,
|
|
110
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "provider"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "pool_sol_vault",
|
|
"docs": [
|
|
"Pool PDA that holds SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
111,
|
|
111,
|
|
108,
|
|
95,
|
|
115,
|
|
111,
|
|
108,
|
|
95,
|
|
118,
|
|
97,
|
|
117,
|
|
108,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "associated_token_program",
|
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "token_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sol_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "min_lp_tokens",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "buy_shares",
|
|
"docs": [
|
|
"Buy outcome shares using SOL"
|
|
],
|
|
"discriminator": [
|
|
40,
|
|
239,
|
|
138,
|
|
154,
|
|
8,
|
|
37,
|
|
106,
|
|
108
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "outcome_share",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_balance",
|
|
"docs": [
|
|
"User's share balance account"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
115,
|
|
104,
|
|
97,
|
|
114,
|
|
101,
|
|
95,
|
|
98,
|
|
97,
|
|
108,
|
|
97,
|
|
110,
|
|
99,
|
|
101
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "outcome_share"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "buyer"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "buyer_token_account",
|
|
"docs": [
|
|
"User's token account to receive shares"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "account",
|
|
"path": "buyer"
|
|
},
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
6,
|
|
221,
|
|
246,
|
|
225,
|
|
215,
|
|
101,
|
|
161,
|
|
147,
|
|
217,
|
|
203,
|
|
225,
|
|
70,
|
|
206,
|
|
235,
|
|
121,
|
|
172,
|
|
28,
|
|
180,
|
|
133,
|
|
237,
|
|
95,
|
|
91,
|
|
55,
|
|
145,
|
|
58,
|
|
140,
|
|
245,
|
|
133,
|
|
126,
|
|
255,
|
|
0,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "share_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": "buyer",
|
|
"docs": [
|
|
"Buyer pays SOL"
|
|
],
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "arena_escrow",
|
|
"docs": [
|
|
"Arena escrow receives SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "associated_token_program",
|
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "_outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount_sol",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "cancel_order",
|
|
"docs": [
|
|
"Cancel a limit order"
|
|
],
|
|
"discriminator": [
|
|
95,
|
|
129,
|
|
237,
|
|
240,
|
|
8,
|
|
49,
|
|
223,
|
|
132
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "order_book",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
98,
|
|
111,
|
|
111,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "order_book.outcome_index",
|
|
"account": "OrderBook"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "limit_order",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
108,
|
|
105,
|
|
109,
|
|
105,
|
|
116,
|
|
95,
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "limit_order.outcome_index",
|
|
"account": "LimitOrder"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "limit_order.order_id",
|
|
"account": "LimitOrder"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "owner_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "order_escrow",
|
|
"docs": [
|
|
"Escrow account holding tokens/SOL for the order"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
101,
|
|
115,
|
|
99,
|
|
114,
|
|
111,
|
|
119
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "limit_order"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": []
|
|
},
|
|
{
|
|
"name": "claim_winnings",
|
|
"docs": [
|
|
"Claim winnings after arena is resolved"
|
|
],
|
|
"discriminator": [
|
|
161,
|
|
215,
|
|
24,
|
|
59,
|
|
14,
|
|
236,
|
|
242,
|
|
221
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
97,
|
|
114,
|
|
116,
|
|
105,
|
|
99,
|
|
105,
|
|
112,
|
|
97,
|
|
110,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "user"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "user",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"docs": [
|
|
"Creator receives fees (only transferred once, on first claim)"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": []
|
|
},
|
|
{
|
|
"name": "create_arena",
|
|
"docs": [
|
|
"Create a new prediction arena"
|
|
],
|
|
"discriminator": [
|
|
174,
|
|
236,
|
|
45,
|
|
61,
|
|
197,
|
|
215,
|
|
149,
|
|
169
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "creator"
|
|
},
|
|
{
|
|
"kind": "arg",
|
|
"path": "title"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "title",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "question",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "outcomes",
|
|
"type": {
|
|
"vec": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": {
|
|
"vec": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "entry_fee",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "end_time",
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "manual_resolve",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "oracle",
|
|
"type": {
|
|
"option": "pubkey"
|
|
}
|
|
},
|
|
{
|
|
"name": "token_mint",
|
|
"type": {
|
|
"option": "pubkey"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "create_share_tokens",
|
|
"docs": [
|
|
"Create SPL token mints for each outcome of an arena"
|
|
],
|
|
"discriminator": [
|
|
211,
|
|
102,
|
|
216,
|
|
4,
|
|
143,
|
|
8,
|
|
153,
|
|
53
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"docs": [
|
|
"Creator must sign to create share tokens"
|
|
],
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "outcome_share",
|
|
"docs": [
|
|
"Outcome share account (one per outcome)"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"docs": [
|
|
"SPL token mint for this outcome"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"docs": [
|
|
"Token program"
|
|
],
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"docs": [
|
|
"System program"
|
|
],
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"docs": [
|
|
"Rent sysvar"
|
|
],
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "initial_price",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "initialize_pool",
|
|
"docs": [
|
|
"Initialize an AMM pool for an outcome"
|
|
],
|
|
"discriminator": [
|
|
95,
|
|
180,
|
|
10,
|
|
172,
|
|
84,
|
|
174,
|
|
232,
|
|
40
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "outcome_share"
|
|
},
|
|
{
|
|
"name": "pool",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "lp_token_mint",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
108,
|
|
112,
|
|
95,
|
|
116,
|
|
111,
|
|
107,
|
|
101,
|
|
110
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"docs": [
|
|
"The share mint account (must match outcome_share.token_mint)"
|
|
]
|
|
},
|
|
{
|
|
"name": "pool_token_vault",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
111,
|
|
111,
|
|
108,
|
|
95,
|
|
116,
|
|
111,
|
|
107,
|
|
101,
|
|
110,
|
|
95,
|
|
118,
|
|
97,
|
|
117,
|
|
108,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "fee_bps",
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "protocol_fee_bps",
|
|
"type": "u16"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "join_arena",
|
|
"docs": [
|
|
"Join an arena by betting on an outcome"
|
|
],
|
|
"discriminator": [
|
|
135,
|
|
217,
|
|
203,
|
|
200,
|
|
93,
|
|
181,
|
|
131,
|
|
47
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
97,
|
|
114,
|
|
116,
|
|
105,
|
|
99,
|
|
105,
|
|
112,
|
|
97,
|
|
110,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "user"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "user",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "outcome_chosen",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "mint_trophy",
|
|
"docs": [
|
|
"Record trophy mint for winner"
|
|
],
|
|
"discriminator": [
|
|
215,
|
|
184,
|
|
115,
|
|
168,
|
|
63,
|
|
228,
|
|
76,
|
|
13
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
97,
|
|
114,
|
|
116,
|
|
105,
|
|
99,
|
|
105,
|
|
112,
|
|
97,
|
|
110,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "user"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "user",
|
|
"signer": true
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "trophy_mint",
|
|
"type": "pubkey"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "place_limit_order",
|
|
"docs": [
|
|
"Place a limit order in the order book"
|
|
],
|
|
"discriminator": [
|
|
108,
|
|
176,
|
|
33,
|
|
186,
|
|
146,
|
|
229,
|
|
1,
|
|
197
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "order_book",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "limit_order",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "owner_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "order_escrow",
|
|
"docs": [
|
|
"Escrow account to hold tokens/SOL for the order"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
101,
|
|
115,
|
|
99,
|
|
114,
|
|
111,
|
|
119
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "limit_order"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "params",
|
|
"type": {
|
|
"defined": {
|
|
"name": "PlaceOrderParams"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "redeem_shares",
|
|
"docs": [
|
|
"Redeem winning outcome shares for SOL after arena resolution"
|
|
],
|
|
"discriminator": [
|
|
239,
|
|
154,
|
|
224,
|
|
89,
|
|
240,
|
|
196,
|
|
42,
|
|
187
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "outcome_share",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_balance",
|
|
"docs": [
|
|
"User's share balance account"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
115,
|
|
104,
|
|
97,
|
|
114,
|
|
101,
|
|
95,
|
|
98,
|
|
97,
|
|
108,
|
|
97,
|
|
110,
|
|
99,
|
|
101
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "outcome_share"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "redeemer"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "redeemer_token_account",
|
|
"docs": [
|
|
"User's token account holding shares"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "account",
|
|
"path": "redeemer"
|
|
},
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
6,
|
|
221,
|
|
246,
|
|
225,
|
|
215,
|
|
101,
|
|
161,
|
|
147,
|
|
217,
|
|
203,
|
|
225,
|
|
70,
|
|
206,
|
|
235,
|
|
121,
|
|
172,
|
|
28,
|
|
180,
|
|
133,
|
|
237,
|
|
95,
|
|
91,
|
|
55,
|
|
145,
|
|
58,
|
|
140,
|
|
245,
|
|
133,
|
|
126,
|
|
255,
|
|
0,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "share_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": "redeemer",
|
|
"docs": [
|
|
"Redeemer receives SOL"
|
|
],
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "arena_escrow",
|
|
"docs": [
|
|
"Arena escrow pays SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "associated_token_program",
|
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "remove_liquidity",
|
|
"docs": [
|
|
"Remove liquidity from an AMM pool"
|
|
],
|
|
"discriminator": [
|
|
80,
|
|
85,
|
|
209,
|
|
72,
|
|
24,
|
|
206,
|
|
177,
|
|
108
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "pool",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
109,
|
|
109,
|
|
95,
|
|
112,
|
|
111,
|
|
111,
|
|
108
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool.outcome_index",
|
|
"account": "AMMPool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "lp_token_mint",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "pool_token_vault",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "provider_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "provider_lp_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "liquidity_position",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
108,
|
|
105,
|
|
113,
|
|
117,
|
|
105,
|
|
100,
|
|
105,
|
|
116,
|
|
121,
|
|
95,
|
|
112,
|
|
111,
|
|
115,
|
|
105,
|
|
116,
|
|
105,
|
|
111,
|
|
110
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "provider"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "pool_sol_vault",
|
|
"docs": [
|
|
"Pool PDA that holds SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
111,
|
|
111,
|
|
108,
|
|
95,
|
|
115,
|
|
111,
|
|
108,
|
|
95,
|
|
118,
|
|
97,
|
|
117,
|
|
108,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "lp_tokens_to_burn",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "min_token_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "min_sol_amount",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "resolve_arena",
|
|
"docs": [
|
|
"Resolve an arena (creator or oracle only)"
|
|
],
|
|
"discriminator": [
|
|
213,
|
|
151,
|
|
76,
|
|
78,
|
|
209,
|
|
87,
|
|
214,
|
|
114
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "resolver",
|
|
"docs": [
|
|
"Can be creator or oracle (for automated resolution)"
|
|
],
|
|
"signer": true
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "winner_outcome",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sell_shares",
|
|
"docs": [
|
|
"Sell outcome shares for SOL"
|
|
],
|
|
"discriminator": [
|
|
184,
|
|
164,
|
|
169,
|
|
16,
|
|
231,
|
|
158,
|
|
199,
|
|
196
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "outcome_share",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "share_balance",
|
|
"docs": [
|
|
"User's share balance account"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
115,
|
|
104,
|
|
97,
|
|
114,
|
|
101,
|
|
95,
|
|
98,
|
|
97,
|
|
108,
|
|
97,
|
|
110,
|
|
99,
|
|
101
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "outcome_share"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "seller"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "seller_token_account",
|
|
"docs": [
|
|
"User's token account holding shares"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "account",
|
|
"path": "seller"
|
|
},
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
6,
|
|
221,
|
|
246,
|
|
225,
|
|
215,
|
|
101,
|
|
161,
|
|
147,
|
|
217,
|
|
203,
|
|
225,
|
|
70,
|
|
206,
|
|
235,
|
|
121,
|
|
172,
|
|
28,
|
|
180,
|
|
133,
|
|
237,
|
|
95,
|
|
91,
|
|
55,
|
|
145,
|
|
58,
|
|
140,
|
|
245,
|
|
133,
|
|
126,
|
|
255,
|
|
0,
|
|
169
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "share_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": "seller",
|
|
"docs": [
|
|
"Seller receives SOL"
|
|
],
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "arena_escrow",
|
|
"docs": [
|
|
"Arena escrow pays SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "associated_token_program",
|
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "_outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "shares_to_sell",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "settle_match",
|
|
"docs": [
|
|
"Settle a matched order (called by matching engine)"
|
|
],
|
|
"discriminator": [
|
|
71,
|
|
124,
|
|
117,
|
|
96,
|
|
191,
|
|
217,
|
|
116,
|
|
24
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "order_book",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
98,
|
|
111,
|
|
111,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "order_book.outcome_index",
|
|
"account": "OrderBook"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "buy_order",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "sell_order",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "trade",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
116,
|
|
114,
|
|
97,
|
|
100,
|
|
101
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "order_book.outcome_index",
|
|
"account": "OrderBook"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "order_book.trade_count",
|
|
"account": "OrderBook"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "buy_order_escrow",
|
|
"docs": [
|
|
"Buy order escrow (holds SOL)"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
101,
|
|
115,
|
|
99,
|
|
114,
|
|
111,
|
|
119
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "buy_order"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "sell_order_escrow",
|
|
"docs": [
|
|
"Sell order escrow (holds tokens)"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
111,
|
|
114,
|
|
100,
|
|
101,
|
|
114,
|
|
95,
|
|
101,
|
|
115,
|
|
99,
|
|
114,
|
|
111,
|
|
119
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "sell_order"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "buyer_token_account",
|
|
"docs": [
|
|
"Buyer's token account (receives tokens)"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "seller",
|
|
"docs": [
|
|
"Seller (receives SOL)"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "protocol_fee_recipient",
|
|
"docs": [
|
|
"Protocol fee recipient"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "matcher",
|
|
"docs": [
|
|
"Matching engine authority (off-chain service)"
|
|
],
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "rent",
|
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "match_size",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "match_price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "fee_bps",
|
|
"type": "u16"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "swap",
|
|
"docs": [
|
|
"Swap tokens using the AMM pool"
|
|
],
|
|
"discriminator": [
|
|
248,
|
|
198,
|
|
158,
|
|
145,
|
|
225,
|
|
117,
|
|
135,
|
|
200
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "arena",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
114,
|
|
101,
|
|
110,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.creator",
|
|
"account": "Arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena.title",
|
|
"account": "Arena"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "pool",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
109,
|
|
109,
|
|
95,
|
|
112,
|
|
111,
|
|
111,
|
|
108
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "arena"
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool.outcome_index",
|
|
"account": "AMMPool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "pool_token_vault",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "user_token_account",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "user",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "pool_sol_vault",
|
|
"docs": [
|
|
"Pool PDA that holds SOL"
|
|
],
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
112,
|
|
111,
|
|
111,
|
|
108,
|
|
95,
|
|
115,
|
|
111,
|
|
108,
|
|
95,
|
|
118,
|
|
97,
|
|
117,
|
|
108,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "pool"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "protocol_fee_recipient",
|
|
"docs": [
|
|
"Protocol fee recipient"
|
|
],
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
},
|
|
{
|
|
"name": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "amount_in",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "min_amount_out",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "is_token_to_sol",
|
|
"type": "bool"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "AMMPool",
|
|
"discriminator": [
|
|
41,
|
|
106,
|
|
117,
|
|
231,
|
|
198,
|
|
244,
|
|
213,
|
|
54
|
|
]
|
|
},
|
|
{
|
|
"name": "Arena",
|
|
"discriminator": [
|
|
243,
|
|
215,
|
|
44,
|
|
44,
|
|
231,
|
|
211,
|
|
232,
|
|
168
|
|
]
|
|
},
|
|
{
|
|
"name": "LimitOrder",
|
|
"discriminator": [
|
|
137,
|
|
183,
|
|
212,
|
|
91,
|
|
115,
|
|
29,
|
|
141,
|
|
227
|
|
]
|
|
},
|
|
{
|
|
"name": "LiquidityPosition",
|
|
"discriminator": [
|
|
153,
|
|
56,
|
|
106,
|
|
34,
|
|
55,
|
|
42,
|
|
113,
|
|
176
|
|
]
|
|
},
|
|
{
|
|
"name": "OrderBook",
|
|
"discriminator": [
|
|
55,
|
|
230,
|
|
125,
|
|
218,
|
|
149,
|
|
39,
|
|
65,
|
|
248
|
|
]
|
|
},
|
|
{
|
|
"name": "OutcomeShare",
|
|
"discriminator": [
|
|
244,
|
|
78,
|
|
137,
|
|
178,
|
|
73,
|
|
10,
|
|
174,
|
|
48
|
|
]
|
|
},
|
|
{
|
|
"name": "Participant",
|
|
"discriminator": [
|
|
32,
|
|
142,
|
|
108,
|
|
79,
|
|
247,
|
|
179,
|
|
54,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"name": "ShareBalance",
|
|
"discriminator": [
|
|
88,
|
|
112,
|
|
87,
|
|
197,
|
|
237,
|
|
180,
|
|
106,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"name": "Trade",
|
|
"discriminator": [
|
|
132,
|
|
139,
|
|
123,
|
|
31,
|
|
157,
|
|
196,
|
|
244,
|
|
190
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "ArenaCreated",
|
|
"discriminator": [
|
|
93,
|
|
57,
|
|
84,
|
|
96,
|
|
112,
|
|
3,
|
|
148,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"name": "ArenaJoined",
|
|
"discriminator": [
|
|
195,
|
|
38,
|
|
154,
|
|
241,
|
|
247,
|
|
142,
|
|
31,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"name": "ArenaResolved",
|
|
"discriminator": [
|
|
215,
|
|
134,
|
|
169,
|
|
36,
|
|
117,
|
|
11,
|
|
42,
|
|
218
|
|
]
|
|
},
|
|
{
|
|
"name": "LimitOrderCancelled",
|
|
"discriminator": [
|
|
244,
|
|
219,
|
|
115,
|
|
91,
|
|
20,
|
|
209,
|
|
47,
|
|
209
|
|
]
|
|
},
|
|
{
|
|
"name": "LimitOrderPlaced",
|
|
"discriminator": [
|
|
104,
|
|
46,
|
|
231,
|
|
29,
|
|
78,
|
|
174,
|
|
107,
|
|
112
|
|
]
|
|
},
|
|
{
|
|
"name": "LiquidityAdded",
|
|
"discriminator": [
|
|
154,
|
|
26,
|
|
221,
|
|
108,
|
|
238,
|
|
64,
|
|
217,
|
|
161
|
|
]
|
|
},
|
|
{
|
|
"name": "LiquidityRemoved",
|
|
"discriminator": [
|
|
225,
|
|
105,
|
|
216,
|
|
39,
|
|
124,
|
|
116,
|
|
169,
|
|
189
|
|
]
|
|
},
|
|
{
|
|
"name": "PoolInitialized",
|
|
"discriminator": [
|
|
100,
|
|
118,
|
|
173,
|
|
87,
|
|
12,
|
|
198,
|
|
254,
|
|
229
|
|
]
|
|
},
|
|
{
|
|
"name": "ShareTokensCreated",
|
|
"discriminator": [
|
|
160,
|
|
216,
|
|
56,
|
|
103,
|
|
120,
|
|
129,
|
|
173,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"name": "SharesPurchased",
|
|
"discriminator": [
|
|
24,
|
|
220,
|
|
223,
|
|
28,
|
|
213,
|
|
182,
|
|
47,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"name": "SharesRedeemed",
|
|
"discriminator": [
|
|
232,
|
|
166,
|
|
7,
|
|
56,
|
|
67,
|
|
19,
|
|
42,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"name": "SharesSold",
|
|
"discriminator": [
|
|
35,
|
|
231,
|
|
5,
|
|
53,
|
|
228,
|
|
158,
|
|
113,
|
|
251
|
|
]
|
|
},
|
|
{
|
|
"name": "SwapExecuted",
|
|
"discriminator": [
|
|
150,
|
|
166,
|
|
26,
|
|
225,
|
|
28,
|
|
89,
|
|
38,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"name": "TradeSettled",
|
|
"discriminator": [
|
|
22,
|
|
119,
|
|
166,
|
|
225,
|
|
175,
|
|
53,
|
|
93,
|
|
216
|
|
]
|
|
},
|
|
{
|
|
"name": "TrophyMinted",
|
|
"discriminator": [
|
|
105,
|
|
248,
|
|
138,
|
|
132,
|
|
214,
|
|
157,
|
|
41,
|
|
134
|
|
]
|
|
},
|
|
{
|
|
"name": "WinningsClaimed",
|
|
"discriminator": [
|
|
187,
|
|
184,
|
|
29,
|
|
196,
|
|
54,
|
|
117,
|
|
70,
|
|
150
|
|
]
|
|
}
|
|
],
|
|
"errors": [
|
|
{
|
|
"code": 6000,
|
|
"name": "InsufficientShares",
|
|
"msg": "Insufficient shares"
|
|
}
|
|
],
|
|
"types": [
|
|
{
|
|
"name": "AMMPool",
|
|
"docs": [
|
|
"Automated Market Maker (AMM) pool for outcome shares",
|
|
"Uses constant product formula: x * y = k"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Parent arena"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"docs": [
|
|
"Which outcome this pool is for"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"docs": [
|
|
"Outcome share token mint"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "token_reserve",
|
|
"docs": [
|
|
"Reserve of outcome share tokens"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sol_reserve",
|
|
"docs": [
|
|
"Reserve of SOL (in lamports)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "k",
|
|
"docs": [
|
|
"Constant product (k = x * y)"
|
|
],
|
|
"type": "u128"
|
|
},
|
|
{
|
|
"name": "lp_token_mint",
|
|
"docs": [
|
|
"LP token mint for this pool"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "total_lp_tokens",
|
|
"docs": [
|
|
"Total LP tokens issued"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "fee_bps",
|
|
"docs": [
|
|
"Trading fee in basis points (e.g., 30 = 0.3%)"
|
|
],
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "protocol_fee_bps",
|
|
"docs": [
|
|
"Protocol fee in basis points (e.g., 10 = 0.1%)"
|
|
],
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "fees_collected",
|
|
"docs": [
|
|
"Total fees collected (in SOL)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "volume_24h",
|
|
"docs": [
|
|
"24-hour trading volume (in SOL)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "swap_count",
|
|
"docs": [
|
|
"Total number of swaps"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "last_swap_at",
|
|
"docs": [
|
|
"Last swap timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "last_price",
|
|
"docs": [
|
|
"Last price (SOL per token)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price_24h_ago",
|
|
"docs": [
|
|
"Price 24h ago"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "Arena",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "creator",
|
|
"docs": [
|
|
"Arena creator"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"docs": [
|
|
"Arena title (max 80 chars)"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"docs": [
|
|
"Arena description (max 280 chars)"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "question",
|
|
"docs": [
|
|
"Question being predicted"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "outcomes",
|
|
"docs": [
|
|
"Possible outcomes (2-6 options)"
|
|
],
|
|
"type": {
|
|
"vec": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"docs": [
|
|
"Tags for categorization"
|
|
],
|
|
"type": {
|
|
"vec": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "entry_fee",
|
|
"docs": [
|
|
"Entry fee in lamports"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "pot",
|
|
"docs": [
|
|
"Total pot accumulated"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "participants_count",
|
|
"docs": [
|
|
"Number of participants"
|
|
],
|
|
"type": "u32"
|
|
},
|
|
{
|
|
"name": "outcome_counts",
|
|
"docs": [
|
|
"Outcome distribution (count per outcome)"
|
|
],
|
|
"type": {
|
|
"vec": "u32"
|
|
}
|
|
},
|
|
{
|
|
"name": "outcome_pots",
|
|
"docs": [
|
|
"Outcome pot distribution (lamports per outcome)"
|
|
],
|
|
"type": {
|
|
"vec": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "resolved",
|
|
"docs": [
|
|
"Whether arena is resolved"
|
|
],
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "winner_outcome",
|
|
"docs": [
|
|
"Winning outcome index (if resolved)"
|
|
],
|
|
"type": {
|
|
"option": "u8"
|
|
}
|
|
},
|
|
{
|
|
"name": "end_time",
|
|
"docs": [
|
|
"End timestamp (Unix)"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "manual_resolve",
|
|
"docs": [
|
|
"Manual resolution flag"
|
|
],
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "oracle",
|
|
"docs": [
|
|
"Oracle pubkey (for automated resolution)"
|
|
],
|
|
"type": {
|
|
"option": "pubkey"
|
|
}
|
|
},
|
|
{
|
|
"name": "token_mint",
|
|
"docs": [
|
|
"Optional token mint for tokenized arenas"
|
|
],
|
|
"type": {
|
|
"option": "pubkey"
|
|
}
|
|
},
|
|
{
|
|
"name": "creator_fee_bps",
|
|
"docs": [
|
|
"Creator fee percentage (basis points, e.g., 500 = 5%)"
|
|
],
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"docs": [
|
|
"Created timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump for PDA"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ArenaCreated",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "entry_fee",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "outcomes_count",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ArenaJoined",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_chosen",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_pot",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "participants_count",
|
|
"type": "u32"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ArenaResolved",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "resolver",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "winner_outcome",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "total_pot",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "winner_pot",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "winners_count",
|
|
"type": "u32"
|
|
},
|
|
{
|
|
"name": "creator_fee",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "distributable_pot",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LimitOrder",
|
|
"docs": [
|
|
"Limit order in the order book"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "order_id",
|
|
"docs": [
|
|
"Order ID (unique per arena)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Parent arena"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"docs": [
|
|
"Which outcome this order is for"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"docs": [
|
|
"Order owner"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "order_type",
|
|
"docs": [
|
|
"Order type"
|
|
],
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderType"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "side",
|
|
"docs": [
|
|
"Order side (buy/sell)"
|
|
],
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderSide"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "price",
|
|
"docs": [
|
|
"Limit price (in lamports per token)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "size",
|
|
"docs": [
|
|
"Original order size (in tokens)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "remaining_size",
|
|
"docs": [
|
|
"Remaining unfilled size"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "filled_size",
|
|
"docs": [
|
|
"Amount filled so far"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "stop_price",
|
|
"docs": [
|
|
"Stop price for stop-loss orders"
|
|
],
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "visible_size",
|
|
"docs": [
|
|
"Visible size for iceberg orders"
|
|
],
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "twap_interval",
|
|
"docs": [
|
|
"TWAP execution interval (seconds)"
|
|
],
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "twap_last_execution",
|
|
"docs": [
|
|
"TWAP last execution time"
|
|
],
|
|
"type": {
|
|
"option": "i64"
|
|
}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"docs": [
|
|
"Order status"
|
|
],
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderStatus"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"docs": [
|
|
"Timestamp when order was created"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "expires_at",
|
|
"docs": [
|
|
"Expiration timestamp (0 = no expiration)"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"docs": [
|
|
"Last update timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "fees_paid",
|
|
"docs": [
|
|
"Total fees paid"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "avg_fill_price",
|
|
"docs": [
|
|
"Average fill price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LimitOrderCancelled",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "order_book",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "order_id",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "side",
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderSide"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "refund_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "filled_size",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_size",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LimitOrderPlaced",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "order_book",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "order_id",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "order_type",
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderType"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "side",
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderSide"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "size",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "expires_at",
|
|
"type": "i64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LiquidityAdded",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "pool",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "token_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sol_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "lp_tokens_minted",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_lp_tokens",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LiquidityPosition",
|
|
"docs": [
|
|
"Liquidity provider position"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "pool",
|
|
"docs": [
|
|
"Pool this position is for"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"docs": [
|
|
"Liquidity provider"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "lp_tokens",
|
|
"docs": [
|
|
"Number of LP tokens owned"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "tokens_deposited",
|
|
"docs": [
|
|
"Amount of share tokens deposited"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sol_deposited",
|
|
"docs": [
|
|
"Amount of SOL deposited"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"docs": [
|
|
"Timestamp when liquidity was added"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "fees_earned",
|
|
"docs": [
|
|
"Fees earned (in SOL)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "LiquidityRemoved",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "pool",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "lp_tokens_burned",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "token_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sol_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "fees_earned",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "OrderBook",
|
|
"docs": [
|
|
"Order book for an outcome"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Parent arena"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"docs": [
|
|
"Which outcome this order book is for"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "next_order_id",
|
|
"docs": [
|
|
"Next order ID"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "active_orders",
|
|
"docs": [
|
|
"Total number of active orders"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_buy_orders",
|
|
"docs": [
|
|
"Total buy orders"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_sell_orders",
|
|
"docs": [
|
|
"Total sell orders"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "best_bid",
|
|
"docs": [
|
|
"Best bid price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "best_ask",
|
|
"docs": [
|
|
"Best ask price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "spread",
|
|
"docs": [
|
|
"Spread (ask - bid)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "mid_price",
|
|
"docs": [
|
|
"Mid price ((bid + ask) / 2)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "last_trade_price",
|
|
"docs": [
|
|
"Last trade price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "volume_24h",
|
|
"docs": [
|
|
"24h trading volume"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "trade_count",
|
|
"docs": [
|
|
"Total number of trades"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "last_trade_at",
|
|
"docs": [
|
|
"Last trade timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "high_24h",
|
|
"docs": [
|
|
"24h high price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "low_24h",
|
|
"docs": [
|
|
"24h low price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price_24h_ago",
|
|
"docs": [
|
|
"Price 24h ago"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "OrderSide",
|
|
"docs": [
|
|
"Order side"
|
|
],
|
|
"type": {
|
|
"kind": "enum",
|
|
"variants": [
|
|
{
|
|
"name": "Buy"
|
|
},
|
|
{
|
|
"name": "Sell"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "OrderStatus",
|
|
"docs": [
|
|
"Order status"
|
|
],
|
|
"type": {
|
|
"kind": "enum",
|
|
"variants": [
|
|
{
|
|
"name": "Open"
|
|
},
|
|
{
|
|
"name": "PartiallyFilled"
|
|
},
|
|
{
|
|
"name": "Filled"
|
|
},
|
|
{
|
|
"name": "Cancelled"
|
|
},
|
|
{
|
|
"name": "Expired"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "OrderType",
|
|
"docs": [
|
|
"Order type"
|
|
],
|
|
"type": {
|
|
"kind": "enum",
|
|
"variants": [
|
|
{
|
|
"name": "Limit"
|
|
},
|
|
{
|
|
"name": "StopLoss"
|
|
},
|
|
{
|
|
"name": "Iceberg"
|
|
},
|
|
{
|
|
"name": "TWAP"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "OutcomeShare",
|
|
"docs": [
|
|
"Represents a tradable outcome share token",
|
|
"Each outcome in an arena has its own SPL token that can be bought/sold"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Parent arena"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"docs": [
|
|
"Which outcome this represents (0, 1, 2, ...)"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "token_mint",
|
|
"docs": [
|
|
"SPL token mint for this outcome"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "total_supply",
|
|
"docs": [
|
|
"Total supply of shares minted"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "current_price",
|
|
"docs": [
|
|
"Current market price (in lamports per share)",
|
|
"Updated by AMM and order book"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "volume_24h",
|
|
"docs": [
|
|
"24-hour trading volume (in lamports)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "trade_count",
|
|
"docs": [
|
|
"Total number of trades"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "last_trade_at",
|
|
"docs": [
|
|
"Last trade timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "high_24h",
|
|
"docs": [
|
|
"Highest price in last 24h"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "low_24h",
|
|
"docs": [
|
|
"Lowest price in last 24h"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price_24h_ago",
|
|
"docs": [
|
|
"Price 24h ago (for calculating change)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed for PDA"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "Participant",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Arena this participant joined"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "wallet",
|
|
"docs": [
|
|
"Participant's wallet"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_chosen",
|
|
"docs": [
|
|
"Outcome chosen by participant"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"docs": [
|
|
"Amount staked in lamports"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "claimed",
|
|
"docs": [
|
|
"Whether winnings have been claimed"
|
|
],
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "joined_at",
|
|
"docs": [
|
|
"Timestamp when joined"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "trophy_mint",
|
|
"docs": [
|
|
"Trophy NFT mint (if winner minted trophy)"
|
|
],
|
|
"type": {
|
|
"option": "pubkey"
|
|
}
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump for PDA"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "PlaceOrderParams",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "order_type",
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderType"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "side",
|
|
"type": {
|
|
"defined": {
|
|
"name": "OrderSide"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "size",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "expires_at",
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "stop_price",
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "visible_size",
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
},
|
|
{
|
|
"name": "twap_interval",
|
|
"type": {
|
|
"option": "u64"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "PoolInitialized",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "pool",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "share_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "lp_token_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "fee_bps",
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "protocol_fee_bps",
|
|
"type": "u16"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ShareBalance",
|
|
"docs": [
|
|
"User's share balance for a specific outcome"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "owner",
|
|
"docs": [
|
|
"Owner of these shares"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_share",
|
|
"docs": [
|
|
"Which outcome share this is"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "balance",
|
|
"docs": [
|
|
"Number of shares owned"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "avg_cost_basis",
|
|
"docs": [
|
|
"Average purchase price (for P&L calculation)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_invested",
|
|
"docs": [
|
|
"Total amount invested (in lamports)"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "realized_pnl",
|
|
"docs": [
|
|
"Realized profit/loss from sells"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ShareTokensCreated",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "token_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "initial_price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "outcome_name",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "SharesPurchased",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "buyer",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_cost",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "new_balance",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "SharesRedeemed",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "redeemer",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "redemption_value",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "final_pnl",
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "total_realized_pnl",
|
|
"type": "i64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "SharesSold",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "seller",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "total_proceeds",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "new_balance",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "realized_pnl",
|
|
"type": "i64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "SwapExecuted",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "pool",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "user",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "is_token_to_sol",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "amount_in",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "amount_out",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "fee_amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "protocol_fee",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price_impact",
|
|
"type": "u16"
|
|
},
|
|
{
|
|
"name": "price_before",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "price_after",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "Trade",
|
|
"docs": [
|
|
"Trade execution record"
|
|
],
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "trade_id",
|
|
"docs": [
|
|
"Trade ID"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "arena",
|
|
"docs": [
|
|
"Parent arena"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_index",
|
|
"docs": [
|
|
"Outcome index"
|
|
],
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "buy_order_id",
|
|
"docs": [
|
|
"Buy order ID"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sell_order_id",
|
|
"docs": [
|
|
"Sell order ID"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "buyer",
|
|
"docs": [
|
|
"Buyer"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "seller",
|
|
"docs": [
|
|
"Seller"
|
|
],
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "price",
|
|
"docs": [
|
|
"Trade price"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "size",
|
|
"docs": [
|
|
"Trade size"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "buyer_fee",
|
|
"docs": [
|
|
"Buyer fee"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "seller_fee",
|
|
"docs": [
|
|
"Seller fee"
|
|
],
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "executed_at",
|
|
"docs": [
|
|
"Timestamp"
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "bump",
|
|
"docs": [
|
|
"Bump seed"
|
|
],
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "TradeSettled",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "order_book",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "trade_id",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "buy_order_id",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "sell_order_id",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "buyer",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "seller",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "price",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "size",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "buyer_fee",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "seller_fee",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "TrophyMinted",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "trophy_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "outcome_won",
|
|
"type": "u8"
|
|
},
|
|
{
|
|
"name": "amount_won",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "WinningsClaimed",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "arena",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "participant",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "original_bet",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "payout",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "profit",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "roi_percentage",
|
|
"type": "f64"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |