fixes
This commit is contained in:
parent
e2b0b55cb8
commit
8a28bc5716
4
public/UnityBuild/walls/cert.json
Normal file
4
public/UnityBuild/walls/cert.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"path":"/root/cert.pfx",
|
||||||
|
"password": ""
|
||||||
|
}
|
||||||
|
|
@ -320,8 +320,8 @@ export default function BeatHighscoreSection() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentLeaderboard = leaderboards[selectedLeaderboardIndex];
|
const currentLeaderboard = leaderboards[selectedLeaderboardIndex] || null;
|
||||||
const currentGame = highscoreGames.find(g => g.id === currentLeaderboard.gameId);
|
const currentGame = currentLeaderboard ? highscoreGames.find(g => g.id === currentLeaderboard.gameId) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -468,6 +468,14 @@ export default function BeatHighscoreSection() {
|
||||||
{remainingAttempts > 0 ? `${remainingAttempts} remaining` : 'Limit reached'}
|
{remainingAttempts > 0 ? `${remainingAttempts} remaining` : 'Limit reached'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-col items-center gap-2">
|
||||||
|
<div className="bg-green-600 text-white px-3 py-1 rounded-full text-sm font-bold">
|
||||||
|
{(currentLeaderboard.maxAttemptCount * 0.1).toFixed(1)} SOL
|
||||||
|
</div>
|
||||||
|
<div className="text-gray-400 text-xs">
|
||||||
|
Winner Prize
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
@ -485,6 +493,14 @@ export default function BeatHighscoreSection() {
|
||||||
Entry: {currentLeaderboard.entryTicketCount} ticket{currentLeaderboard.entryTicketCount > 1 ? 's' : ''}
|
Entry: {currentLeaderboard.entryTicketCount} ticket{currentLeaderboard.entryTicketCount > 1 ? 's' : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-col items-center gap-2">
|
||||||
|
<div className="bg-green-600 text-white px-3 py-1 rounded-full text-sm font-bold">
|
||||||
|
{(currentLeaderboard.maxAttemptCount * 0.1).toFixed(1)} SOL
|
||||||
|
</div>
|
||||||
|
<div className="text-gray-400 text-xs">
|
||||||
|
Winner Prize
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
|
|
|
||||||
273
src/idl/bets.ts
273
src/idl/bets.ts
|
|
@ -31,11 +31,6 @@ export type Bets = {
|
||||||
"writable": true,
|
"writable": true,
|
||||||
"signer": true
|
"signer": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "ticketSaleVault",
|
|
||||||
"writable": true,
|
|
||||||
"address": "9esrj2X33pr5og6fdkDMjaW6fdnnb9hT1cWshamxTdL4"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "ticketLeaderboardList",
|
"name": "ticketLeaderboardList",
|
||||||
"writable": true,
|
"writable": true,
|
||||||
|
|
@ -2041,6 +2036,236 @@ export type Bets = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "rewardLeaderboard",
|
||||||
|
"discriminator": [
|
||||||
|
180,
|
||||||
|
91,
|
||||||
|
212,
|
||||||
|
106,
|
||||||
|
79,
|
||||||
|
234,
|
||||||
|
247,
|
||||||
|
253
|
||||||
|
],
|
||||||
|
"accounts": [
|
||||||
|
{
|
||||||
|
"name": "payer",
|
||||||
|
"writable": true,
|
||||||
|
"signer": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "winner",
|
||||||
|
"writable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ticketLeaderboardList",
|
||||||
|
"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": "ticketLeaderboard",
|
||||||
|
"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": "ticketLeaderboardVault",
|
||||||
|
"writable": true,
|
||||||
|
"pda": {
|
||||||
|
"seeds": [
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "ticketLeaderboard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "tokenProgram"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "tokenMint"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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": "ticketLeaderboardListVault",
|
||||||
|
"writable": true,
|
||||||
|
"pda": {
|
||||||
|
"seeds": [
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "ticketLeaderboardList"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "tokenProgram"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "account",
|
||||||
|
"path": "tokenMint"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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": "tokenMint"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "systemProgram",
|
||||||
|
"address": "11111111111111111111111111111111"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tokenProgram"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "associatedTokenProgram",
|
||||||
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"type": "u64"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "updateLeaderboard",
|
"name": "updateLeaderboard",
|
||||||
"discriminator": [
|
"discriminator": [
|
||||||
|
|
@ -2268,43 +2493,13 @@ export type Bets = {
|
||||||
"errors": [
|
"errors": [
|
||||||
{
|
{
|
||||||
"code": 6000,
|
"code": 6000,
|
||||||
"name": "betNotFilled",
|
"name": "invalidId",
|
||||||
"msg": "Bet is not filled yet!"
|
"msg": "Invalid id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"code": 6001,
|
"code": 6001,
|
||||||
"name": "betAlreadyFilled",
|
"name": "notActive",
|
||||||
"msg": "Bet is already filled"
|
"msg": "Not active"
|
||||||
},
|
|
||||||
{
|
|
||||||
"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": [
|
"types": [
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@
|
||||||
"writable": true,
|
"writable": true,
|
||||||
"signer": true
|
"signer": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "ticket_sale_vault",
|
|
||||||
"writable": true,
|
|
||||||
"address": "9esrj2X33pr5og6fdkDMjaW6fdnnb9hT1cWshamxTdL4"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "ticket_leaderboard_list",
|
"name": "ticket_leaderboard_list",
|
||||||
"writable": true,
|
"writable": true,
|
||||||
|
|
@ -2035,6 +2030,236 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "reward_leaderboard",
|
||||||
|
"discriminator": [
|
||||||
|
180,
|
||||||
|
91,
|
||||||
|
212,
|
||||||
|
106,
|
||||||
|
79,
|
||||||
|
234,
|
||||||
|
247,
|
||||||
|
253
|
||||||
|
],
|
||||||
|
"accounts": [
|
||||||
|
{
|
||||||
|
"name": "payer",
|
||||||
|
"writable": true,
|
||||||
|
"signer": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "winner",
|
||||||
|
"writable": 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": "ticket_leaderboard_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": "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": "token_mint"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "system_program",
|
||||||
|
"address": "11111111111111111111111111111111"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "token_program"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "associated_token_program",
|
||||||
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"type": "u64"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "update_leaderboard",
|
"name": "update_leaderboard",
|
||||||
"discriminator": [
|
"discriminator": [
|
||||||
|
|
@ -2262,43 +2487,13 @@
|
||||||
"errors": [
|
"errors": [
|
||||||
{
|
{
|
||||||
"code": 6000,
|
"code": 6000,
|
||||||
"name": "BetNotFilled",
|
"name": "InvalidId",
|
||||||
"msg": "Bet is not filled yet!"
|
"msg": "Invalid id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"code": 6001,
|
"code": 6001,
|
||||||
"name": "BetAlreadyFilled",
|
"name": "NotActive",
|
||||||
"msg": "Bet is already filled"
|
"msg": "Not active"
|
||||||
},
|
|
||||||
{
|
|
||||||
"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": [
|
"types": [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user