@provable-games/budokan-sdk 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/index.cjs +1742 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +615 -3
- package/dist/index.d.ts +615 -3
- package/dist/index.js +1709 -248
- package/dist/index.js.map +1 -1
- package/dist/{player-BUynfv7D.d.cts → player-P6Dd1lNb.d.cts} +68 -9
- package/dist/{player-BUynfv7D.d.ts → player-P6Dd1lNb.d.ts} +68 -9
- package/dist/react.cjs +1014 -244
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1014 -244
- package/dist/react.js.map +1 -1
- package/package.json +3 -2
package/dist/react.js
CHANGED
|
@@ -201,7 +201,8 @@ function snakeToCamel(obj) {
|
|
|
201
201
|
function normalizeTournament(raw) {
|
|
202
202
|
const t = snakeToCamel(raw);
|
|
203
203
|
const id = t.id ?? t.tournamentId;
|
|
204
|
-
|
|
204
|
+
const protocolFeeShare = t.protocolFeeShare ?? t.entryFee?.protocolFeeShare ?? null;
|
|
205
|
+
return { ...t, id, tournamentId: id, protocolFeeShare };
|
|
205
206
|
}
|
|
206
207
|
function fetchOpts(ctx) {
|
|
207
208
|
return {
|
|
@@ -533,11 +534,14 @@ var CHAINS = {
|
|
|
533
534
|
viewerAddress: "0x013c8239361fdbd7ec26db2c83f4ff270c5bba83a0bc105b4005b676ff57fdbe"
|
|
534
535
|
},
|
|
535
536
|
sepolia: {
|
|
536
|
-
rpcUrl: "https://starknet
|
|
537
|
+
rpcUrl: "https://api.cartridge.gg/x/starknet/sepolia/rpc/v0_10",
|
|
537
538
|
apiBaseUrl: "https://budokan-api-sepolia.up.railway.app",
|
|
538
539
|
wsUrl: "wss://budokan-api-sepolia.up.railway.app/ws",
|
|
539
|
-
budokanAddress: "
|
|
540
|
-
|
|
540
|
+
budokanAddress: "0x074cc823c382d98e6b8d657aa86776a57d85e1dc2912d54d83a4fef147472683",
|
|
541
|
+
// Redeployed 2026-06-18 to match the upgraded #264/#269 budokan class —
|
|
542
|
+
// the prior viewer (0x03da56…) was built against the old budokan interface
|
|
543
|
+
// (called the removed `tournament_entries`) and reverted RPC reads.
|
|
544
|
+
viewerAddress: "0x06b2773d5f1f8bfa5aa3b698fbbaea0472b30af003ea6058330ed52a1acaa283"
|
|
541
545
|
}
|
|
542
546
|
};
|
|
543
547
|
function getChainConfig(chain) {
|
|
@@ -802,7 +806,7 @@ function phaseToRpcArg(phase) {
|
|
|
802
806
|
}
|
|
803
807
|
return new CairoCustomEnum(variants);
|
|
804
808
|
}
|
|
805
|
-
function parseTournament(raw, entryCount) {
|
|
809
|
+
function parseTournament(raw, entryCount, protocolFeeShare = null) {
|
|
806
810
|
const obj = raw;
|
|
807
811
|
const id = String(obj.id ?? "0");
|
|
808
812
|
const createdAt = Number(obj.created_at ?? 0);
|
|
@@ -838,23 +842,36 @@ function parseTournament(raw, entryCount) {
|
|
|
838
842
|
const lc = obj.leaderboard_config;
|
|
839
843
|
const ascending = Boolean(lc?.ascending);
|
|
840
844
|
const gameMustBeOver = Boolean(lc?.game_must_be_over);
|
|
841
|
-
const
|
|
845
|
+
const entryFeeKind = parseOption(obj.entry_fee);
|
|
842
846
|
let entryFeeToken = null;
|
|
843
847
|
let entryFeeAmount = null;
|
|
844
848
|
let entryFee = null;
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
849
|
+
let entryFeeKindTag = null;
|
|
850
|
+
let entryFeeExtension = null;
|
|
851
|
+
if (entryFeeKind) {
|
|
852
|
+
const variantBag = entryFeeKind.variant ?? entryFeeKind;
|
|
853
|
+
const ef = variantBag.BuiltIn;
|
|
854
|
+
const ext = variantBag.Extension;
|
|
855
|
+
if (ef) {
|
|
856
|
+
entryFeeKindTag = "builtin";
|
|
857
|
+
entryFeeToken = num.toHex(ef.token_address);
|
|
858
|
+
entryFeeAmount = String(ef.amount ?? "0");
|
|
859
|
+
entryFee = {
|
|
860
|
+
tokenAddress: entryFeeToken,
|
|
861
|
+
amount: entryFeeAmount,
|
|
862
|
+
tournamentCreatorShare: Number(ef.tournament_creator_share ?? 0),
|
|
863
|
+
gameCreatorShare: Number(ef.game_creator_share ?? 0),
|
|
864
|
+
refundShare: Number(ef.refund_share ?? 0),
|
|
865
|
+
distribution: ef.distribution ?? null,
|
|
866
|
+
distributionCount: Number(ef.distribution_count ?? 0)
|
|
867
|
+
};
|
|
868
|
+
} else if (ext) {
|
|
869
|
+
entryFeeKindTag = "extension";
|
|
870
|
+
entryFeeExtension = {
|
|
871
|
+
address: num.toHex(ext.address),
|
|
872
|
+
config: Array.isArray(ext.config) ? ext.config.map((x) => num.toHex(x)) : []
|
|
873
|
+
};
|
|
874
|
+
}
|
|
858
875
|
}
|
|
859
876
|
const entryRequirement = parseOption(obj.entry_requirement);
|
|
860
877
|
const hasEntryRequirement = entryRequirement !== null;
|
|
@@ -887,6 +904,8 @@ function parseTournament(raw, entryCount) {
|
|
|
887
904
|
leaderboardGameMustBeOver: gameMustBeOver,
|
|
888
905
|
entryFeeToken,
|
|
889
906
|
entryFeeAmount,
|
|
907
|
+
// Protocol-fee bps snapshot, surfaced by the viewer's TournamentFullState.
|
|
908
|
+
protocolFeeShare,
|
|
890
909
|
hasEntryRequirement,
|
|
891
910
|
schedule: {
|
|
892
911
|
registrationStartDelay,
|
|
@@ -904,6 +923,8 @@ function parseTournament(raw, entryCount) {
|
|
|
904
923
|
renderer
|
|
905
924
|
},
|
|
906
925
|
entryFee,
|
|
926
|
+
entryFeeKind: entryFeeKindTag,
|
|
927
|
+
entryFeeExtension,
|
|
907
928
|
entryRequirement,
|
|
908
929
|
leaderboardConfig: { ascending, gameMustBeOver },
|
|
909
930
|
entryCount,
|
|
@@ -934,8 +955,40 @@ function parseRegistration(raw, tournamentId) {
|
|
|
934
955
|
};
|
|
935
956
|
}
|
|
936
957
|
function parsePrize(raw) {
|
|
937
|
-
const
|
|
938
|
-
const
|
|
958
|
+
const record = raw;
|
|
959
|
+
const prizeEnum = record.prize;
|
|
960
|
+
if (!prizeEnum) {
|
|
961
|
+
throw new Error(`PrizeRecord missing prize field: ${JSON.stringify(raw)}`);
|
|
962
|
+
}
|
|
963
|
+
const activePrize = typeof prizeEnum.activeVariant === "function" ? prizeEnum.activeVariant() : prizeEnum.Token !== void 0 ? "Token" : prizeEnum.Extension !== void 0 ? "Extension" : null;
|
|
964
|
+
const prizeVariantBag = prizeEnum.variant ?? prizeEnum;
|
|
965
|
+
if (activePrize === "Extension") {
|
|
966
|
+
const ext = prizeVariantBag.Extension;
|
|
967
|
+
return {
|
|
968
|
+
prizeId: String(record.id ?? "0"),
|
|
969
|
+
tournamentId: String(record.context_id ?? "0"),
|
|
970
|
+
payoutPosition: 0,
|
|
971
|
+
tokenAddress: null,
|
|
972
|
+
tokenType: "extension",
|
|
973
|
+
amount: null,
|
|
974
|
+
tokenId: null,
|
|
975
|
+
distributionType: null,
|
|
976
|
+
distributionWeight: null,
|
|
977
|
+
distributionShares: null,
|
|
978
|
+
distributionCount: null,
|
|
979
|
+
sponsorAddress: num.toHex(record.sponsor_address),
|
|
980
|
+
extensionAddress: ext?.address != null ? num.toHex(ext.address) : null,
|
|
981
|
+
extensionConfig: Array.isArray(ext?.config) ? ext.config.map((x) => num.toHex(x)) : null
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
if (activePrize !== "Token") {
|
|
985
|
+
throw new Error(`Unrecognised Prize variant: ${JSON.stringify(prizeEnum)}`);
|
|
986
|
+
}
|
|
987
|
+
const tokenPayload = prizeVariantBag.Token;
|
|
988
|
+
if (!tokenPayload) {
|
|
989
|
+
throw new Error(`Prize::Token missing payload: ${JSON.stringify(prizeEnum)}`);
|
|
990
|
+
}
|
|
991
|
+
const tokenTypeData = tokenPayload.token_type;
|
|
939
992
|
let tokenType = "erc20";
|
|
940
993
|
let amount = null;
|
|
941
994
|
let tokenId = null;
|
|
@@ -976,10 +1029,10 @@ function parsePrize(raw) {
|
|
|
976
1029
|
}
|
|
977
1030
|
}
|
|
978
1031
|
return {
|
|
979
|
-
prizeId: String(
|
|
980
|
-
tournamentId: String(
|
|
1032
|
+
prizeId: String(record.id ?? "0"),
|
|
1033
|
+
tournamentId: String(record.context_id ?? "0"),
|
|
981
1034
|
payoutPosition,
|
|
982
|
-
tokenAddress: num.toHex(
|
|
1035
|
+
tokenAddress: num.toHex(tokenPayload.token_address),
|
|
983
1036
|
tokenType,
|
|
984
1037
|
amount,
|
|
985
1038
|
tokenId,
|
|
@@ -987,7 +1040,9 @@ function parsePrize(raw) {
|
|
|
987
1040
|
distributionWeight,
|
|
988
1041
|
distributionShares,
|
|
989
1042
|
distributionCount,
|
|
990
|
-
sponsorAddress: num.toHex(
|
|
1043
|
+
sponsorAddress: num.toHex(record.sponsor_address),
|
|
1044
|
+
extensionAddress: null,
|
|
1045
|
+
extensionConfig: null
|
|
991
1046
|
};
|
|
992
1047
|
}
|
|
993
1048
|
function parseOption(raw) {
|
|
@@ -1017,7 +1072,8 @@ function parseFilterResult(raw) {
|
|
|
1017
1072
|
function parseTournamentFullState(raw) {
|
|
1018
1073
|
const obj = raw;
|
|
1019
1074
|
const entryCount = Number(obj.entry_count ?? 0);
|
|
1020
|
-
|
|
1075
|
+
const protocolFeeShare = obj.protocol_fee_bps != null ? Number(obj.protocol_fee_bps) : null;
|
|
1076
|
+
return parseTournament(obj.tournament, entryCount, protocolFeeShare);
|
|
1021
1077
|
}
|
|
1022
1078
|
async function viewerTournaments(contract, offset, limit) {
|
|
1023
1079
|
return wrapRpcCall(async () => {
|
|
@@ -1112,6 +1168,20 @@ async function viewerPrizes(contract, tournamentId) {
|
|
|
1112
1168
|
return result.map(parsePrize);
|
|
1113
1169
|
}, contract.address);
|
|
1114
1170
|
}
|
|
1171
|
+
function rewardClaim(partial) {
|
|
1172
|
+
return {
|
|
1173
|
+
prizeId: null,
|
|
1174
|
+
payoutIndex: null,
|
|
1175
|
+
position: null,
|
|
1176
|
+
refundTokenId: null,
|
|
1177
|
+
extensionTokenId: null,
|
|
1178
|
+
extensionParams: null,
|
|
1179
|
+
...partial
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
function spanToHex(v) {
|
|
1183
|
+
return Array.isArray(v) ? v.map((x) => num.toHex(x)) : [];
|
|
1184
|
+
}
|
|
1115
1185
|
function translateCairoRewardType(rewardType) {
|
|
1116
1186
|
if (!rewardType || typeof rewardType !== "object") {
|
|
1117
1187
|
throw new Error(`Unexpected RewardType payload: ${JSON.stringify(rewardType)}`);
|
|
@@ -1120,70 +1190,73 @@ function translateCairoRewardType(rewardType) {
|
|
|
1120
1190
|
const outer = typeof rt.activeVariant === "function" ? rt.activeVariant() : null;
|
|
1121
1191
|
const innerBag = typeof rt.activeVariant === "function" ? rt.variant : rt;
|
|
1122
1192
|
if (outer === "Prize" || innerBag.Prize !== void 0) {
|
|
1123
|
-
const
|
|
1193
|
+
const prizeClaim = innerBag.Prize;
|
|
1194
|
+
const pcBag = typeof prizeClaim?.activeVariant === "function" ? prizeClaim.variant : prizeClaim;
|
|
1195
|
+
if (pcBag?.Token === void 0 && pcBag?.Extension !== void 0) {
|
|
1196
|
+
const ext = pcBag.Extension;
|
|
1197
|
+
const tokenId = parseOption(ext.token_id);
|
|
1198
|
+
return rewardClaim({
|
|
1199
|
+
claimKind: "prize_extension",
|
|
1200
|
+
prizeId: BigInt(ext.prize_id ?? 0).toString(),
|
|
1201
|
+
extensionTokenId: tokenId != null ? num.toHex(tokenId) : null,
|
|
1202
|
+
extensionParams: spanToHex(ext.payout_params)
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
const prize = pcBag?.Token ?? prizeClaim;
|
|
1124
1206
|
const subVariant = typeof prize?.activeVariant === "function" ? prize.activeVariant() : null;
|
|
1125
1207
|
const subBag = typeof prize?.activeVariant === "function" ? prize.variant : prize;
|
|
1126
1208
|
if (subVariant === "Single" || subBag?.Single !== void 0) {
|
|
1127
|
-
return {
|
|
1209
|
+
return rewardClaim({
|
|
1128
1210
|
claimKind: "prize_single",
|
|
1129
|
-
prizeId: BigInt(subBag.Single).toString()
|
|
1130
|
-
|
|
1131
|
-
position: null,
|
|
1132
|
-
refundTokenId: null
|
|
1133
|
-
};
|
|
1211
|
+
prizeId: BigInt(subBag.Single).toString()
|
|
1212
|
+
});
|
|
1134
1213
|
}
|
|
1135
1214
|
if (subVariant === "Distributed" || subBag?.Distributed !== void 0) {
|
|
1136
1215
|
const distributed = subBag.Distributed;
|
|
1137
1216
|
const prizeId = distributed?.["0"] ?? distributed?.[0];
|
|
1138
1217
|
const payoutIndex = distributed?.["1"] ?? distributed?.[1];
|
|
1139
|
-
return {
|
|
1218
|
+
return rewardClaim({
|
|
1140
1219
|
claimKind: "prize_distributed",
|
|
1141
1220
|
prizeId: BigInt(prizeId).toString(),
|
|
1142
|
-
payoutIndex: Number(payoutIndex)
|
|
1143
|
-
|
|
1144
|
-
refundTokenId: null
|
|
1145
|
-
};
|
|
1221
|
+
payoutIndex: Number(payoutIndex)
|
|
1222
|
+
});
|
|
1146
1223
|
}
|
|
1147
1224
|
}
|
|
1148
1225
|
if (outer === "EntryFee" || innerBag.EntryFee !== void 0) {
|
|
1149
|
-
const
|
|
1226
|
+
const entryFeeClaim = innerBag.EntryFee;
|
|
1227
|
+
const efBag = typeof entryFeeClaim?.activeVariant === "function" ? entryFeeClaim.variant : entryFeeClaim;
|
|
1228
|
+
if (efBag?.Token === void 0 && efBag?.Extension !== void 0) {
|
|
1229
|
+
const ext = efBag.Extension;
|
|
1230
|
+
const tokenId = parseOption(ext.token_id);
|
|
1231
|
+
return rewardClaim({
|
|
1232
|
+
claimKind: "entry_fee_extension",
|
|
1233
|
+
extensionTokenId: tokenId != null ? num.toHex(tokenId) : null,
|
|
1234
|
+
extensionParams: spanToHex(ext.claim_params)
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
const entryFee = efBag?.Token ?? entryFeeClaim;
|
|
1150
1238
|
const subVariant = typeof entryFee?.activeVariant === "function" ? entryFee.activeVariant() : null;
|
|
1151
1239
|
const subBag = typeof entryFee?.activeVariant === "function" ? entryFee.variant : entryFee;
|
|
1152
1240
|
if (subVariant === "Position" || subBag?.Position !== void 0) {
|
|
1153
|
-
return {
|
|
1241
|
+
return rewardClaim({
|
|
1154
1242
|
claimKind: "entry_fee_position",
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
position: Number(subBag.Position),
|
|
1158
|
-
refundTokenId: null
|
|
1159
|
-
};
|
|
1243
|
+
position: Number(subBag.Position)
|
|
1244
|
+
});
|
|
1160
1245
|
}
|
|
1161
1246
|
if (subVariant === "TournamentCreator" || subBag?.TournamentCreator !== void 0) {
|
|
1162
|
-
return {
|
|
1163
|
-
claimKind: "entry_fee_tournament_creator",
|
|
1164
|
-
prizeId: null,
|
|
1165
|
-
payoutIndex: null,
|
|
1166
|
-
position: null,
|
|
1167
|
-
refundTokenId: null
|
|
1168
|
-
};
|
|
1247
|
+
return rewardClaim({ claimKind: "entry_fee_tournament_creator" });
|
|
1169
1248
|
}
|
|
1170
1249
|
if (subVariant === "GameCreator" || subBag?.GameCreator !== void 0) {
|
|
1171
|
-
return {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
position: null,
|
|
1176
|
-
refundTokenId: null
|
|
1177
|
-
};
|
|
1250
|
+
return rewardClaim({ claimKind: "entry_fee_game_creator" });
|
|
1251
|
+
}
|
|
1252
|
+
if (subVariant === "ProtocolFee" || subBag?.ProtocolFee !== void 0) {
|
|
1253
|
+
return rewardClaim({ claimKind: "entry_fee_protocol_fee" });
|
|
1178
1254
|
}
|
|
1179
1255
|
if (subVariant === "Refund" || subBag?.Refund !== void 0) {
|
|
1180
|
-
return {
|
|
1256
|
+
return rewardClaim({
|
|
1181
1257
|
claimKind: "entry_fee_refund",
|
|
1182
|
-
prizeId: null,
|
|
1183
|
-
payoutIndex: null,
|
|
1184
|
-
position: null,
|
|
1185
1258
|
refundTokenId: `0x${BigInt(subBag.Refund).toString(16)}`
|
|
1186
|
-
};
|
|
1259
|
+
});
|
|
1187
1260
|
}
|
|
1188
1261
|
}
|
|
1189
1262
|
throw new Error(
|
|
@@ -1194,13 +1267,15 @@ async function viewerRewardClaims(contract, tournamentId, offset, limit) {
|
|
|
1194
1267
|
return wrapRpcCall(async () => {
|
|
1195
1268
|
const result = await contract.call("tournament_reward_claims", [tournamentId, offset, limit]);
|
|
1196
1269
|
const obj = result;
|
|
1197
|
-
const claims = obj.claims
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1270
|
+
const claims = (obj.claims ?? []).map(
|
|
1271
|
+
(raw) => {
|
|
1272
|
+
const claim = raw;
|
|
1273
|
+
return {
|
|
1274
|
+
...translateCairoRewardType(claim.reward_type),
|
|
1275
|
+
claimed: Boolean(claim.claimed)
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1204
1279
|
return {
|
|
1205
1280
|
claims,
|
|
1206
1281
|
total: Number(obj.total ?? 0),
|
|
@@ -1480,20 +1555,6 @@ var budokanViewer_default = [
|
|
|
1480
1555
|
}
|
|
1481
1556
|
]
|
|
1482
1557
|
},
|
|
1483
|
-
{
|
|
1484
|
-
type: "enum",
|
|
1485
|
-
name: "core::option::Option::<budokan_interfaces::budokan::EntryFee>",
|
|
1486
|
-
variants: [
|
|
1487
|
-
{
|
|
1488
|
-
name: "Some",
|
|
1489
|
-
type: "budokan_interfaces::budokan::EntryFee"
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
name: "None",
|
|
1493
|
-
type: "()"
|
|
1494
|
-
}
|
|
1495
|
-
]
|
|
1496
|
-
},
|
|
1497
1558
|
{
|
|
1498
1559
|
type: "struct",
|
|
1499
1560
|
name: "core::array::Span::<core::felt252>",
|
|
@@ -1518,6 +1579,34 @@ var budokanViewer_default = [
|
|
|
1518
1579
|
}
|
|
1519
1580
|
]
|
|
1520
1581
|
},
|
|
1582
|
+
{
|
|
1583
|
+
type: "enum",
|
|
1584
|
+
name: "budokan_interfaces::budokan::EntryFeeKind",
|
|
1585
|
+
variants: [
|
|
1586
|
+
{
|
|
1587
|
+
name: "BuiltIn",
|
|
1588
|
+
type: "budokan_interfaces::budokan::EntryFee"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
name: "Extension",
|
|
1592
|
+
type: "metagame_extensions_interfaces::extension::ExtensionConfig"
|
|
1593
|
+
}
|
|
1594
|
+
]
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
type: "enum",
|
|
1598
|
+
name: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>",
|
|
1599
|
+
variants: [
|
|
1600
|
+
{
|
|
1601
|
+
name: "Some",
|
|
1602
|
+
type: "budokan_interfaces::budokan::EntryFeeKind"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
name: "None",
|
|
1606
|
+
type: "()"
|
|
1607
|
+
}
|
|
1608
|
+
]
|
|
1609
|
+
},
|
|
1521
1610
|
{
|
|
1522
1611
|
type: "enum",
|
|
1523
1612
|
name: "game_components_interfaces::entry_requirement::EntryRequirementType",
|
|
@@ -1608,7 +1697,7 @@ var budokanViewer_default = [
|
|
|
1608
1697
|
},
|
|
1609
1698
|
{
|
|
1610
1699
|
name: "entry_fee",
|
|
1611
|
-
type: "core::option::Option::<budokan_interfaces::budokan::
|
|
1700
|
+
type: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>"
|
|
1612
1701
|
},
|
|
1613
1702
|
{
|
|
1614
1703
|
name: "entry_requirement",
|
|
@@ -1635,6 +1724,10 @@ var budokanViewer_default = [
|
|
|
1635
1724
|
{
|
|
1636
1725
|
name: "phase",
|
|
1637
1726
|
type: "budokan_interfaces::budokan::Phase"
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
name: "protocol_fee_bps",
|
|
1730
|
+
type: "core::integer::u16"
|
|
1638
1731
|
}
|
|
1639
1732
|
]
|
|
1640
1733
|
},
|
|
@@ -1764,7 +1857,49 @@ var budokanViewer_default = [
|
|
|
1764
1857
|
},
|
|
1765
1858
|
{
|
|
1766
1859
|
type: "struct",
|
|
1767
|
-
name: "game_components_interfaces::prize::
|
|
1860
|
+
name: "game_components_interfaces::prize::TokenPrizePayload",
|
|
1861
|
+
members: [
|
|
1862
|
+
{
|
|
1863
|
+
name: "token_address",
|
|
1864
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
name: "token_type",
|
|
1868
|
+
type: "game_components_interfaces::prize::TokenTypeData"
|
|
1869
|
+
}
|
|
1870
|
+
]
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
type: "struct",
|
|
1874
|
+
name: "game_components_interfaces::prize::ExtensionPrizePayload",
|
|
1875
|
+
members: [
|
|
1876
|
+
{
|
|
1877
|
+
name: "address",
|
|
1878
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
name: "config",
|
|
1882
|
+
type: "core::array::Span::<core::felt252>"
|
|
1883
|
+
}
|
|
1884
|
+
]
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
type: "enum",
|
|
1888
|
+
name: "game_components_interfaces::prize::Prize",
|
|
1889
|
+
variants: [
|
|
1890
|
+
{
|
|
1891
|
+
name: "Token",
|
|
1892
|
+
type: "game_components_interfaces::prize::TokenPrizePayload"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
name: "Extension",
|
|
1896
|
+
type: "game_components_interfaces::prize::ExtensionPrizePayload"
|
|
1897
|
+
}
|
|
1898
|
+
]
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
type: "struct",
|
|
1902
|
+
name: "game_components_interfaces::prize::PrizeRecord",
|
|
1768
1903
|
members: [
|
|
1769
1904
|
{
|
|
1770
1905
|
name: "id",
|
|
@@ -1775,16 +1910,12 @@ var budokanViewer_default = [
|
|
|
1775
1910
|
type: "core::integer::u64"
|
|
1776
1911
|
},
|
|
1777
1912
|
{
|
|
1778
|
-
name: "
|
|
1913
|
+
name: "sponsor_address",
|
|
1779
1914
|
type: "core::starknet::contract_address::ContractAddress"
|
|
1780
1915
|
},
|
|
1781
1916
|
{
|
|
1782
|
-
name: "
|
|
1783
|
-
type: "game_components_interfaces::prize::
|
|
1784
|
-
},
|
|
1785
|
-
{
|
|
1786
|
-
name: "sponsor_address",
|
|
1787
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
1917
|
+
name: "prize",
|
|
1918
|
+
type: "game_components_interfaces::prize::Prize"
|
|
1788
1919
|
}
|
|
1789
1920
|
]
|
|
1790
1921
|
},
|
|
@@ -1802,6 +1933,52 @@ var budokanViewer_default = [
|
|
|
1802
1933
|
}
|
|
1803
1934
|
]
|
|
1804
1935
|
},
|
|
1936
|
+
{
|
|
1937
|
+
type: "enum",
|
|
1938
|
+
name: "core::option::Option::<core::felt252>",
|
|
1939
|
+
variants: [
|
|
1940
|
+
{
|
|
1941
|
+
name: "Some",
|
|
1942
|
+
type: "core::felt252"
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
name: "None",
|
|
1946
|
+
type: "()"
|
|
1947
|
+
}
|
|
1948
|
+
]
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
type: "struct",
|
|
1952
|
+
name: "budokan_interfaces::budokan::ExtensionPrizeClaim",
|
|
1953
|
+
members: [
|
|
1954
|
+
{
|
|
1955
|
+
name: "prize_id",
|
|
1956
|
+
type: "core::integer::u64"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
name: "token_id",
|
|
1960
|
+
type: "core::option::Option::<core::felt252>"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
name: "payout_params",
|
|
1964
|
+
type: "core::array::Span::<core::felt252>"
|
|
1965
|
+
}
|
|
1966
|
+
]
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
type: "enum",
|
|
1970
|
+
name: "budokan_interfaces::budokan::PrizeClaim",
|
|
1971
|
+
variants: [
|
|
1972
|
+
{
|
|
1973
|
+
name: "Token",
|
|
1974
|
+
type: "game_components_interfaces::prize::PrizeType"
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
name: "Extension",
|
|
1978
|
+
type: "budokan_interfaces::budokan::ExtensionPrizeClaim"
|
|
1979
|
+
}
|
|
1980
|
+
]
|
|
1981
|
+
},
|
|
1805
1982
|
{
|
|
1806
1983
|
type: "enum",
|
|
1807
1984
|
name: "budokan_interfaces::budokan::EntryFeeRewardType",
|
|
@@ -1821,6 +1998,38 @@ var budokanViewer_default = [
|
|
|
1821
1998
|
{
|
|
1822
1999
|
name: "Refund",
|
|
1823
2000
|
type: "core::felt252"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
name: "ProtocolFee",
|
|
2004
|
+
type: "()"
|
|
2005
|
+
}
|
|
2006
|
+
]
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
type: "struct",
|
|
2010
|
+
name: "budokan_interfaces::budokan::ExtensionEntryFeeClaim",
|
|
2011
|
+
members: [
|
|
2012
|
+
{
|
|
2013
|
+
name: "token_id",
|
|
2014
|
+
type: "core::option::Option::<core::felt252>"
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
name: "claim_params",
|
|
2018
|
+
type: "core::array::Span::<core::felt252>"
|
|
2019
|
+
}
|
|
2020
|
+
]
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
type: "enum",
|
|
2024
|
+
name: "budokan_interfaces::budokan::EntryFeeClaim",
|
|
2025
|
+
variants: [
|
|
2026
|
+
{
|
|
2027
|
+
name: "Token",
|
|
2028
|
+
type: "budokan_interfaces::budokan::EntryFeeRewardType"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
name: "Extension",
|
|
2032
|
+
type: "budokan_interfaces::budokan::ExtensionEntryFeeClaim"
|
|
1824
2033
|
}
|
|
1825
2034
|
]
|
|
1826
2035
|
},
|
|
@@ -1830,11 +2039,11 @@ var budokanViewer_default = [
|
|
|
1830
2039
|
variants: [
|
|
1831
2040
|
{
|
|
1832
2041
|
name: "Prize",
|
|
1833
|
-
type: "
|
|
2042
|
+
type: "budokan_interfaces::budokan::PrizeClaim"
|
|
1834
2043
|
},
|
|
1835
2044
|
{
|
|
1836
2045
|
name: "EntryFee",
|
|
1837
|
-
type: "budokan_interfaces::budokan::
|
|
2046
|
+
type: "budokan_interfaces::budokan::EntryFeeClaim"
|
|
1838
2047
|
}
|
|
1839
2048
|
]
|
|
1840
2049
|
},
|
|
@@ -2125,6 +2334,62 @@ var budokanViewer_default = [
|
|
|
2125
2334
|
],
|
|
2126
2335
|
state_mutability: "view"
|
|
2127
2336
|
},
|
|
2337
|
+
{
|
|
2338
|
+
type: "function",
|
|
2339
|
+
name: "tournament_registrations_by_owner",
|
|
2340
|
+
inputs: [
|
|
2341
|
+
{
|
|
2342
|
+
name: "tournament_id",
|
|
2343
|
+
type: "core::integer::u64"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
name: "owner",
|
|
2347
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
name: "offset",
|
|
2351
|
+
type: "core::integer::u32"
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
name: "limit",
|
|
2355
|
+
type: "core::integer::u32"
|
|
2356
|
+
}
|
|
2357
|
+
],
|
|
2358
|
+
outputs: [
|
|
2359
|
+
{
|
|
2360
|
+
type: "budokan_interfaces::viewer::RegistrationResult"
|
|
2361
|
+
}
|
|
2362
|
+
],
|
|
2363
|
+
state_mutability: "view"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
type: "function",
|
|
2367
|
+
name: "tournament_registrations_by_token_ids",
|
|
2368
|
+
inputs: [
|
|
2369
|
+
{
|
|
2370
|
+
name: "tournament_id",
|
|
2371
|
+
type: "core::integer::u64"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
name: "token_ids",
|
|
2375
|
+
type: "core::array::Array::<core::felt252>"
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
name: "offset",
|
|
2379
|
+
type: "core::integer::u32"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
name: "limit",
|
|
2383
|
+
type: "core::integer::u32"
|
|
2384
|
+
}
|
|
2385
|
+
],
|
|
2386
|
+
outputs: [
|
|
2387
|
+
{
|
|
2388
|
+
type: "budokan_interfaces::viewer::RegistrationResult"
|
|
2389
|
+
}
|
|
2390
|
+
],
|
|
2391
|
+
state_mutability: "view"
|
|
2392
|
+
},
|
|
2128
2393
|
{
|
|
2129
2394
|
type: "function",
|
|
2130
2395
|
name: "leaderboard",
|
|
@@ -2160,7 +2425,7 @@ var budokanViewer_default = [
|
|
|
2160
2425
|
],
|
|
2161
2426
|
outputs: [
|
|
2162
2427
|
{
|
|
2163
|
-
type: "core::array::Array::<game_components_interfaces::prize::
|
|
2428
|
+
type: "core::array::Array::<game_components_interfaces::prize::PrizeRecord>"
|
|
2164
2429
|
}
|
|
2165
2430
|
],
|
|
2166
2431
|
state_mutability: "view"
|
|
@@ -2421,21 +2686,55 @@ var budokan_default = [
|
|
|
2421
2686
|
},
|
|
2422
2687
|
{
|
|
2423
2688
|
type: "impl",
|
|
2424
|
-
name: "
|
|
2425
|
-
interface_name: "
|
|
2689
|
+
name: "BudokanRewardsAdminImpl",
|
|
2690
|
+
interface_name: "budokan::budokan::Budokan::IBudokanRewardsAdmin"
|
|
2426
2691
|
},
|
|
2427
2692
|
{
|
|
2428
|
-
type: "
|
|
2429
|
-
name: "
|
|
2430
|
-
|
|
2431
|
-
{
|
|
2432
|
-
name: "False",
|
|
2433
|
-
type: "()"
|
|
2434
|
-
},
|
|
2693
|
+
type: "interface",
|
|
2694
|
+
name: "budokan::budokan::Budokan::IBudokanRewardsAdmin",
|
|
2695
|
+
items: [
|
|
2435
2696
|
{
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2697
|
+
type: "function",
|
|
2698
|
+
name: "set_rewards_class_hash",
|
|
2699
|
+
inputs: [
|
|
2700
|
+
{
|
|
2701
|
+
name: "new_class_hash",
|
|
2702
|
+
type: "core::starknet::class_hash::ClassHash"
|
|
2703
|
+
}
|
|
2704
|
+
],
|
|
2705
|
+
outputs: [],
|
|
2706
|
+
state_mutability: "external"
|
|
2707
|
+
},
|
|
2708
|
+
{
|
|
2709
|
+
type: "function",
|
|
2710
|
+
name: "rewards_class_hash",
|
|
2711
|
+
inputs: [],
|
|
2712
|
+
outputs: [
|
|
2713
|
+
{
|
|
2714
|
+
type: "core::starknet::class_hash::ClassHash"
|
|
2715
|
+
}
|
|
2716
|
+
],
|
|
2717
|
+
state_mutability: "view"
|
|
2718
|
+
}
|
|
2719
|
+
]
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
type: "impl",
|
|
2723
|
+
name: "GameContextImpl",
|
|
2724
|
+
interface_name: "game_components_interfaces::metagame::context::IMetagameContext"
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
type: "enum",
|
|
2728
|
+
name: "core::bool",
|
|
2729
|
+
variants: [
|
|
2730
|
+
{
|
|
2731
|
+
name: "False",
|
|
2732
|
+
type: "()"
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
name: "True",
|
|
2736
|
+
type: "()"
|
|
2737
|
+
}
|
|
2439
2738
|
]
|
|
2440
2739
|
},
|
|
2441
2740
|
{
|
|
@@ -2503,11 +2802,11 @@ var budokan_default = [
|
|
|
2503
2802
|
members: [
|
|
2504
2803
|
{
|
|
2505
2804
|
name: "name",
|
|
2506
|
-
type: "core::
|
|
2805
|
+
type: "core::felt252"
|
|
2507
2806
|
},
|
|
2508
2807
|
{
|
|
2509
2808
|
name: "value",
|
|
2510
|
-
type: "core::
|
|
2809
|
+
type: "core::felt252"
|
|
2511
2810
|
}
|
|
2512
2811
|
]
|
|
2513
2812
|
},
|
|
@@ -2735,50 +3034,54 @@ var budokan_default = [
|
|
|
2735
3034
|
]
|
|
2736
3035
|
},
|
|
2737
3036
|
{
|
|
2738
|
-
type: "
|
|
2739
|
-
name: "core::
|
|
2740
|
-
|
|
2741
|
-
{
|
|
2742
|
-
name: "Some",
|
|
2743
|
-
type: "budokan_interfaces::budokan::EntryFee"
|
|
2744
|
-
},
|
|
3037
|
+
type: "struct",
|
|
3038
|
+
name: "core::array::Span::<core::felt252>",
|
|
3039
|
+
members: [
|
|
2745
3040
|
{
|
|
2746
|
-
name: "
|
|
2747
|
-
type: "
|
|
3041
|
+
name: "snapshot",
|
|
3042
|
+
type: "@core::array::Array::<core::felt252>"
|
|
2748
3043
|
}
|
|
2749
3044
|
]
|
|
2750
3045
|
},
|
|
2751
3046
|
{
|
|
2752
3047
|
type: "struct",
|
|
2753
|
-
name: "
|
|
3048
|
+
name: "metagame_extensions_interfaces::extension::ExtensionConfig",
|
|
2754
3049
|
members: [
|
|
2755
3050
|
{
|
|
2756
|
-
name: "
|
|
2757
|
-
type: "
|
|
3051
|
+
name: "address",
|
|
3052
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
name: "config",
|
|
3056
|
+
type: "core::array::Span::<core::felt252>"
|
|
2758
3057
|
}
|
|
2759
3058
|
]
|
|
2760
3059
|
},
|
|
2761
3060
|
{
|
|
2762
|
-
type: "
|
|
2763
|
-
name: "
|
|
2764
|
-
|
|
3061
|
+
type: "enum",
|
|
3062
|
+
name: "budokan_interfaces::budokan::EntryFeeKind",
|
|
3063
|
+
variants: [
|
|
2765
3064
|
{
|
|
2766
|
-
name: "
|
|
2767
|
-
type: "
|
|
3065
|
+
name: "BuiltIn",
|
|
3066
|
+
type: "budokan_interfaces::budokan::EntryFee"
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
name: "Extension",
|
|
3070
|
+
type: "metagame_extensions_interfaces::extension::ExtensionConfig"
|
|
2768
3071
|
}
|
|
2769
3072
|
]
|
|
2770
3073
|
},
|
|
2771
3074
|
{
|
|
2772
|
-
type: "
|
|
2773
|
-
name: "
|
|
2774
|
-
|
|
3075
|
+
type: "enum",
|
|
3076
|
+
name: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>",
|
|
3077
|
+
variants: [
|
|
2775
3078
|
{
|
|
2776
|
-
name: "
|
|
2777
|
-
type: "
|
|
3079
|
+
name: "Some",
|
|
3080
|
+
type: "budokan_interfaces::budokan::EntryFeeKind"
|
|
2778
3081
|
},
|
|
2779
3082
|
{
|
|
2780
|
-
name: "
|
|
2781
|
-
type: "
|
|
3083
|
+
name: "None",
|
|
3084
|
+
type: "()"
|
|
2782
3085
|
}
|
|
2783
3086
|
]
|
|
2784
3087
|
},
|
|
@@ -2792,7 +3095,7 @@ var budokan_default = [
|
|
|
2792
3095
|
},
|
|
2793
3096
|
{
|
|
2794
3097
|
name: "extension",
|
|
2795
|
-
type: "
|
|
3098
|
+
type: "metagame_extensions_interfaces::extension::ExtensionConfig"
|
|
2796
3099
|
}
|
|
2797
3100
|
]
|
|
2798
3101
|
},
|
|
@@ -2872,7 +3175,7 @@ var budokan_default = [
|
|
|
2872
3175
|
},
|
|
2873
3176
|
{
|
|
2874
3177
|
name: "entry_fee",
|
|
2875
|
-
type: "core::option::Option::<budokan_interfaces::budokan::
|
|
3178
|
+
type: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>"
|
|
2876
3179
|
},
|
|
2877
3180
|
{
|
|
2878
3181
|
name: "entry_requirement",
|
|
@@ -2914,6 +3217,20 @@ var budokan_default = [
|
|
|
2914
3217
|
}
|
|
2915
3218
|
]
|
|
2916
3219
|
},
|
|
3220
|
+
{
|
|
3221
|
+
type: "enum",
|
|
3222
|
+
name: "core::option::Option::<core::felt252>",
|
|
3223
|
+
variants: [
|
|
3224
|
+
{
|
|
3225
|
+
name: "Some",
|
|
3226
|
+
type: "core::felt252"
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
name: "None",
|
|
3230
|
+
type: "()"
|
|
3231
|
+
}
|
|
3232
|
+
]
|
|
3233
|
+
},
|
|
2917
3234
|
{
|
|
2918
3235
|
type: "struct",
|
|
2919
3236
|
name: "core::integer::u256",
|
|
@@ -2946,10 +3263,6 @@ var budokan_default = [
|
|
|
2946
3263
|
name: "NFT",
|
|
2947
3264
|
type: "game_components_interfaces::entry_requirement::NFTQualification"
|
|
2948
3265
|
},
|
|
2949
|
-
{
|
|
2950
|
-
name: "Address",
|
|
2951
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
2952
|
-
},
|
|
2953
3266
|
{
|
|
2954
3267
|
name: "Extension",
|
|
2955
3268
|
type: "core::array::Span::<core::felt252>"
|
|
@@ -2970,6 +3283,38 @@ var budokan_default = [
|
|
|
2970
3283
|
}
|
|
2971
3284
|
]
|
|
2972
3285
|
},
|
|
3286
|
+
{
|
|
3287
|
+
type: "enum",
|
|
3288
|
+
name: "core::option::Option::<core::array::Span::<core::felt252>>",
|
|
3289
|
+
variants: [
|
|
3290
|
+
{
|
|
3291
|
+
name: "Some",
|
|
3292
|
+
type: "core::array::Span::<core::felt252>"
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
name: "None",
|
|
3296
|
+
type: "()"
|
|
3297
|
+
}
|
|
3298
|
+
]
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
type: "struct",
|
|
3302
|
+
name: "budokan_interfaces::budokan::TournamentRecipientParams",
|
|
3303
|
+
members: [
|
|
3304
|
+
{
|
|
3305
|
+
name: "player_address",
|
|
3306
|
+
type: "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
3307
|
+
},
|
|
3308
|
+
{
|
|
3309
|
+
name: "qualifier",
|
|
3310
|
+
type: "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
name: "qualification",
|
|
3314
|
+
type: "core::option::Option::<game_components_interfaces::entry_requirement::QualificationProof>"
|
|
3315
|
+
}
|
|
3316
|
+
]
|
|
3317
|
+
},
|
|
2973
3318
|
{
|
|
2974
3319
|
type: "enum",
|
|
2975
3320
|
name: "game_components_interfaces::prize::PrizeType",
|
|
@@ -2984,6 +3329,38 @@ var budokan_default = [
|
|
|
2984
3329
|
}
|
|
2985
3330
|
]
|
|
2986
3331
|
},
|
|
3332
|
+
{
|
|
3333
|
+
type: "struct",
|
|
3334
|
+
name: "budokan_interfaces::budokan::ExtensionPrizeClaim",
|
|
3335
|
+
members: [
|
|
3336
|
+
{
|
|
3337
|
+
name: "prize_id",
|
|
3338
|
+
type: "core::integer::u64"
|
|
3339
|
+
},
|
|
3340
|
+
{
|
|
3341
|
+
name: "token_id",
|
|
3342
|
+
type: "core::option::Option::<core::felt252>"
|
|
3343
|
+
},
|
|
3344
|
+
{
|
|
3345
|
+
name: "payout_params",
|
|
3346
|
+
type: "core::array::Span::<core::felt252>"
|
|
3347
|
+
}
|
|
3348
|
+
]
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
type: "enum",
|
|
3352
|
+
name: "budokan_interfaces::budokan::PrizeClaim",
|
|
3353
|
+
variants: [
|
|
3354
|
+
{
|
|
3355
|
+
name: "Token",
|
|
3356
|
+
type: "game_components_interfaces::prize::PrizeType"
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
name: "Extension",
|
|
3360
|
+
type: "budokan_interfaces::budokan::ExtensionPrizeClaim"
|
|
3361
|
+
}
|
|
3362
|
+
]
|
|
3363
|
+
},
|
|
2987
3364
|
{
|
|
2988
3365
|
type: "enum",
|
|
2989
3366
|
name: "budokan_interfaces::budokan::EntryFeeRewardType",
|
|
@@ -3003,6 +3380,38 @@ var budokan_default = [
|
|
|
3003
3380
|
{
|
|
3004
3381
|
name: "Refund",
|
|
3005
3382
|
type: "core::felt252"
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
name: "ProtocolFee",
|
|
3386
|
+
type: "()"
|
|
3387
|
+
}
|
|
3388
|
+
]
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
type: "struct",
|
|
3392
|
+
name: "budokan_interfaces::budokan::ExtensionEntryFeeClaim",
|
|
3393
|
+
members: [
|
|
3394
|
+
{
|
|
3395
|
+
name: "token_id",
|
|
3396
|
+
type: "core::option::Option::<core::felt252>"
|
|
3397
|
+
},
|
|
3398
|
+
{
|
|
3399
|
+
name: "claim_params",
|
|
3400
|
+
type: "core::array::Span::<core::felt252>"
|
|
3401
|
+
}
|
|
3402
|
+
]
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
type: "enum",
|
|
3406
|
+
name: "budokan_interfaces::budokan::EntryFeeClaim",
|
|
3407
|
+
variants: [
|
|
3408
|
+
{
|
|
3409
|
+
name: "Token",
|
|
3410
|
+
type: "budokan_interfaces::budokan::EntryFeeRewardType"
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
name: "Extension",
|
|
3414
|
+
type: "budokan_interfaces::budokan::ExtensionEntryFeeClaim"
|
|
3006
3415
|
}
|
|
3007
3416
|
]
|
|
3008
3417
|
},
|
|
@@ -3012,11 +3421,11 @@ var budokan_default = [
|
|
|
3012
3421
|
variants: [
|
|
3013
3422
|
{
|
|
3014
3423
|
name: "Prize",
|
|
3015
|
-
type: "
|
|
3424
|
+
type: "budokan_interfaces::budokan::PrizeClaim"
|
|
3016
3425
|
},
|
|
3017
3426
|
{
|
|
3018
3427
|
name: "EntryFee",
|
|
3019
|
-
type: "budokan_interfaces::budokan::
|
|
3428
|
+
type: "budokan_interfaces::budokan::EntryFeeClaim"
|
|
3020
3429
|
}
|
|
3021
3430
|
]
|
|
3022
3431
|
},
|
|
@@ -3078,16 +3487,8 @@ var budokan_default = [
|
|
|
3078
3487
|
},
|
|
3079
3488
|
{
|
|
3080
3489
|
type: "struct",
|
|
3081
|
-
name: "game_components_interfaces::prize::
|
|
3490
|
+
name: "game_components_interfaces::prize::TokenPrizePayload",
|
|
3082
3491
|
members: [
|
|
3083
|
-
{
|
|
3084
|
-
name: "id",
|
|
3085
|
-
type: "core::integer::u64"
|
|
3086
|
-
},
|
|
3087
|
-
{
|
|
3088
|
-
name: "context_id",
|
|
3089
|
-
type: "core::integer::u64"
|
|
3090
|
-
},
|
|
3091
3492
|
{
|
|
3092
3493
|
name: "token_address",
|
|
3093
3494
|
type: "core::starknet::contract_address::ContractAddress"
|
|
@@ -3095,10 +3496,34 @@ var budokan_default = [
|
|
|
3095
3496
|
{
|
|
3096
3497
|
name: "token_type",
|
|
3097
3498
|
type: "game_components_interfaces::prize::TokenTypeData"
|
|
3098
|
-
}
|
|
3499
|
+
}
|
|
3500
|
+
]
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
type: "struct",
|
|
3504
|
+
name: "game_components_interfaces::prize::ExtensionPrizePayload",
|
|
3505
|
+
members: [
|
|
3099
3506
|
{
|
|
3100
|
-
name: "
|
|
3507
|
+
name: "address",
|
|
3101
3508
|
type: "core::starknet::contract_address::ContractAddress"
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
name: "config",
|
|
3512
|
+
type: "core::array::Span::<core::felt252>"
|
|
3513
|
+
}
|
|
3514
|
+
]
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
type: "enum",
|
|
3518
|
+
name: "game_components_interfaces::prize::Prize",
|
|
3519
|
+
variants: [
|
|
3520
|
+
{
|
|
3521
|
+
name: "Token",
|
|
3522
|
+
type: "game_components_interfaces::prize::TokenPrizePayload"
|
|
3523
|
+
},
|
|
3524
|
+
{
|
|
3525
|
+
name: "Extension",
|
|
3526
|
+
type: "game_components_interfaces::prize::ExtensionPrizePayload"
|
|
3102
3527
|
}
|
|
3103
3528
|
]
|
|
3104
3529
|
},
|
|
@@ -3133,38 +3558,6 @@ var budokan_default = [
|
|
|
3133
3558
|
],
|
|
3134
3559
|
state_mutability: "view"
|
|
3135
3560
|
},
|
|
3136
|
-
{
|
|
3137
|
-
type: "function",
|
|
3138
|
-
name: "tournament_entries",
|
|
3139
|
-
inputs: [
|
|
3140
|
-
{
|
|
3141
|
-
name: "tournament_id",
|
|
3142
|
-
type: "core::integer::u64"
|
|
3143
|
-
}
|
|
3144
|
-
],
|
|
3145
|
-
outputs: [
|
|
3146
|
-
{
|
|
3147
|
-
type: "core::integer::u32"
|
|
3148
|
-
}
|
|
3149
|
-
],
|
|
3150
|
-
state_mutability: "view"
|
|
3151
|
-
},
|
|
3152
|
-
{
|
|
3153
|
-
type: "function",
|
|
3154
|
-
name: "get_leaderboard",
|
|
3155
|
-
inputs: [
|
|
3156
|
-
{
|
|
3157
|
-
name: "tournament_id",
|
|
3158
|
-
type: "core::integer::u64"
|
|
3159
|
-
}
|
|
3160
|
-
],
|
|
3161
|
-
outputs: [
|
|
3162
|
-
{
|
|
3163
|
-
type: "core::array::Array::<core::felt252>"
|
|
3164
|
-
}
|
|
3165
|
-
],
|
|
3166
|
-
state_mutability: "view"
|
|
3167
|
-
},
|
|
3168
3561
|
{
|
|
3169
3562
|
type: "function",
|
|
3170
3563
|
name: "current_phase",
|
|
@@ -3219,7 +3612,7 @@ var budokan_default = [
|
|
|
3219
3612
|
},
|
|
3220
3613
|
{
|
|
3221
3614
|
name: "entry_fee",
|
|
3222
|
-
type: "core::option::Option::<budokan_interfaces::budokan::
|
|
3615
|
+
type: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>"
|
|
3223
3616
|
},
|
|
3224
3617
|
{
|
|
3225
3618
|
name: "entry_requirement",
|
|
@@ -3255,16 +3648,24 @@ var budokan_default = [
|
|
|
3255
3648
|
},
|
|
3256
3649
|
{
|
|
3257
3650
|
name: "player_name",
|
|
3258
|
-
type: "core::felt252"
|
|
3651
|
+
type: "core::option::Option::<core::felt252>"
|
|
3259
3652
|
},
|
|
3260
3653
|
{
|
|
3261
3654
|
name: "player_address",
|
|
3262
|
-
type: "core::starknet::contract_address::ContractAddress"
|
|
3655
|
+
type: "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
3656
|
+
},
|
|
3657
|
+
{
|
|
3658
|
+
name: "qualifier",
|
|
3659
|
+
type: "core::option::Option::<core::starknet::contract_address::ContractAddress>"
|
|
3263
3660
|
},
|
|
3264
3661
|
{
|
|
3265
3662
|
name: "qualification",
|
|
3266
3663
|
type: "core::option::Option::<game_components_interfaces::entry_requirement::QualificationProof>"
|
|
3267
3664
|
},
|
|
3665
|
+
{
|
|
3666
|
+
name: "entry_fee_pay_params",
|
|
3667
|
+
type: "core::option::Option::<core::array::Span::<core::felt252>>"
|
|
3668
|
+
},
|
|
3268
3669
|
{
|
|
3269
3670
|
name: "salt",
|
|
3270
3671
|
type: "core::integer::u16"
|
|
@@ -3283,19 +3684,51 @@ var budokan_default = [
|
|
|
3283
3684
|
},
|
|
3284
3685
|
{
|
|
3285
3686
|
type: "function",
|
|
3286
|
-
name: "
|
|
3687
|
+
name: "enter_tournament_for_recipients",
|
|
3287
3688
|
inputs: [
|
|
3288
3689
|
{
|
|
3289
3690
|
name: "tournament_id",
|
|
3290
3691
|
type: "core::integer::u64"
|
|
3291
3692
|
},
|
|
3292
3693
|
{
|
|
3293
|
-
name: "
|
|
3294
|
-
type: "core::
|
|
3694
|
+
name: "recipients",
|
|
3695
|
+
type: "core::array::Array::<budokan_interfaces::budokan::TournamentRecipientParams>"
|
|
3295
3696
|
},
|
|
3296
3697
|
{
|
|
3297
|
-
name: "
|
|
3298
|
-
type: "core::
|
|
3698
|
+
name: "player_name",
|
|
3699
|
+
type: "core::option::Option::<core::felt252>"
|
|
3700
|
+
},
|
|
3701
|
+
{
|
|
3702
|
+
name: "salt",
|
|
3703
|
+
type: "core::integer::u16"
|
|
3704
|
+
},
|
|
3705
|
+
{
|
|
3706
|
+
name: "metadata_value",
|
|
3707
|
+
type: "core::integer::u16"
|
|
3708
|
+
}
|
|
3709
|
+
],
|
|
3710
|
+
outputs: [
|
|
3711
|
+
{
|
|
3712
|
+
type: "core::array::Array::<core::felt252>"
|
|
3713
|
+
}
|
|
3714
|
+
],
|
|
3715
|
+
state_mutability: "external"
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
type: "function",
|
|
3719
|
+
name: "ban_entry",
|
|
3720
|
+
inputs: [
|
|
3721
|
+
{
|
|
3722
|
+
name: "tournament_id",
|
|
3723
|
+
type: "core::integer::u64"
|
|
3724
|
+
},
|
|
3725
|
+
{
|
|
3726
|
+
name: "game_token_id",
|
|
3727
|
+
type: "core::felt252"
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
name: "proof",
|
|
3731
|
+
type: "core::array::Span::<core::felt252>"
|
|
3299
3732
|
}
|
|
3300
3733
|
],
|
|
3301
3734
|
outputs: [],
|
|
@@ -3346,12 +3779,8 @@ var budokan_default = [
|
|
|
3346
3779
|
type: "core::integer::u64"
|
|
3347
3780
|
},
|
|
3348
3781
|
{
|
|
3349
|
-
name: "
|
|
3350
|
-
type: "
|
|
3351
|
-
},
|
|
3352
|
-
{
|
|
3353
|
-
name: "token_type",
|
|
3354
|
-
type: "game_components_interfaces::prize::TokenTypeData"
|
|
3782
|
+
name: "prize",
|
|
3783
|
+
type: "game_components_interfaces::prize::Prize"
|
|
3355
3784
|
},
|
|
3356
3785
|
{
|
|
3357
3786
|
name: "position",
|
|
@@ -3360,7 +3789,7 @@ var budokan_default = [
|
|
|
3360
3789
|
],
|
|
3361
3790
|
outputs: [
|
|
3362
3791
|
{
|
|
3363
|
-
type: "
|
|
3792
|
+
type: "core::integer::u64"
|
|
3364
3793
|
}
|
|
3365
3794
|
],
|
|
3366
3795
|
state_mutability: "external"
|
|
@@ -3534,6 +3963,14 @@ var budokan_default = [
|
|
|
3534
3963
|
{
|
|
3535
3964
|
name: "additional_shares",
|
|
3536
3965
|
type: "core::array::Span::<game_components_interfaces::entry_fee::AdditionalShare>"
|
|
3966
|
+
},
|
|
3967
|
+
{
|
|
3968
|
+
name: "distribution",
|
|
3969
|
+
type: "core::option::Option::<game_components_interfaces::distribution::Distribution>"
|
|
3970
|
+
},
|
|
3971
|
+
{
|
|
3972
|
+
name: "distribution_count",
|
|
3973
|
+
type: "core::integer::u32"
|
|
3537
3974
|
}
|
|
3538
3975
|
]
|
|
3539
3976
|
},
|
|
@@ -3643,6 +4080,28 @@ var budokan_default = [
|
|
|
3643
4080
|
name: "PrizeImpl",
|
|
3644
4081
|
interface_name: "game_components_interfaces::prize::IPrize"
|
|
3645
4082
|
},
|
|
4083
|
+
{
|
|
4084
|
+
type: "struct",
|
|
4085
|
+
name: "game_components_interfaces::prize::PrizeRecord",
|
|
4086
|
+
members: [
|
|
4087
|
+
{
|
|
4088
|
+
name: "id",
|
|
4089
|
+
type: "core::integer::u64"
|
|
4090
|
+
},
|
|
4091
|
+
{
|
|
4092
|
+
name: "context_id",
|
|
4093
|
+
type: "core::integer::u64"
|
|
4094
|
+
},
|
|
4095
|
+
{
|
|
4096
|
+
name: "sponsor_address",
|
|
4097
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
4098
|
+
},
|
|
4099
|
+
{
|
|
4100
|
+
name: "prize",
|
|
4101
|
+
type: "game_components_interfaces::prize::Prize"
|
|
4102
|
+
}
|
|
4103
|
+
]
|
|
4104
|
+
},
|
|
3646
4105
|
{
|
|
3647
4106
|
type: "interface",
|
|
3648
4107
|
name: "game_components_interfaces::prize::IPrize",
|
|
@@ -3658,7 +4117,7 @@ var budokan_default = [
|
|
|
3658
4117
|
],
|
|
3659
4118
|
outputs: [
|
|
3660
4119
|
{
|
|
3661
|
-
type: "game_components_interfaces::prize::
|
|
4120
|
+
type: "game_components_interfaces::prize::PrizeRecord"
|
|
3662
4121
|
}
|
|
3663
4122
|
],
|
|
3664
4123
|
state_mutability: "view"
|
|
@@ -3773,17 +4232,168 @@ var budokan_default = [
|
|
|
3773
4232
|
},
|
|
3774
4233
|
{
|
|
3775
4234
|
type: "function",
|
|
3776
|
-
name: "
|
|
4235
|
+
name: "is_token_banned",
|
|
4236
|
+
inputs: [
|
|
4237
|
+
{
|
|
4238
|
+
name: "token_id",
|
|
4239
|
+
type: "core::felt252"
|
|
4240
|
+
}
|
|
4241
|
+
],
|
|
4242
|
+
outputs: [
|
|
4243
|
+
{
|
|
4244
|
+
type: "core::bool"
|
|
4245
|
+
}
|
|
4246
|
+
],
|
|
4247
|
+
state_mutability: "view"
|
|
4248
|
+
},
|
|
4249
|
+
{
|
|
4250
|
+
type: "function",
|
|
4251
|
+
name: "get_entry_count",
|
|
4252
|
+
inputs: [
|
|
4253
|
+
{
|
|
4254
|
+
name: "context_id",
|
|
4255
|
+
type: "core::integer::u64"
|
|
4256
|
+
}
|
|
4257
|
+
],
|
|
4258
|
+
outputs: [
|
|
4259
|
+
{
|
|
4260
|
+
type: "core::integer::u32"
|
|
4261
|
+
}
|
|
4262
|
+
],
|
|
4263
|
+
state_mutability: "view"
|
|
4264
|
+
}
|
|
4265
|
+
]
|
|
4266
|
+
},
|
|
4267
|
+
{
|
|
4268
|
+
type: "impl",
|
|
4269
|
+
name: "LeaderboardImpl",
|
|
4270
|
+
interface_name: "game_components_interfaces::leaderboard::ILeaderboard"
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
type: "struct",
|
|
4274
|
+
name: "game_components_interfaces::structs::leaderboard::LeaderboardEntry",
|
|
4275
|
+
members: [
|
|
4276
|
+
{
|
|
4277
|
+
name: "id",
|
|
4278
|
+
type: "core::felt252"
|
|
4279
|
+
},
|
|
4280
|
+
{
|
|
4281
|
+
name: "score",
|
|
4282
|
+
type: "core::integer::u64"
|
|
4283
|
+
}
|
|
4284
|
+
]
|
|
4285
|
+
},
|
|
4286
|
+
{
|
|
4287
|
+
type: "struct",
|
|
4288
|
+
name: "game_components_interfaces::structs::leaderboard::LeaderboardStoreConfig",
|
|
4289
|
+
members: [
|
|
4290
|
+
{
|
|
4291
|
+
name: "max_entries",
|
|
4292
|
+
type: "core::integer::u32"
|
|
4293
|
+
},
|
|
4294
|
+
{
|
|
4295
|
+
name: "ascending",
|
|
4296
|
+
type: "core::bool"
|
|
4297
|
+
},
|
|
4298
|
+
{
|
|
4299
|
+
name: "game_address",
|
|
4300
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
4301
|
+
}
|
|
4302
|
+
]
|
|
4303
|
+
},
|
|
4304
|
+
{
|
|
4305
|
+
type: "interface",
|
|
4306
|
+
name: "game_components_interfaces::leaderboard::ILeaderboard",
|
|
4307
|
+
items: [
|
|
4308
|
+
{
|
|
4309
|
+
type: "function",
|
|
4310
|
+
name: "get_leaderboard_entries",
|
|
4311
|
+
inputs: [
|
|
4312
|
+
{
|
|
4313
|
+
name: "context_id",
|
|
4314
|
+
type: "core::integer::u64"
|
|
4315
|
+
}
|
|
4316
|
+
],
|
|
4317
|
+
outputs: [
|
|
4318
|
+
{
|
|
4319
|
+
type: "core::array::Array::<game_components_interfaces::structs::leaderboard::LeaderboardEntry>"
|
|
4320
|
+
}
|
|
4321
|
+
],
|
|
4322
|
+
state_mutability: "view"
|
|
4323
|
+
},
|
|
4324
|
+
{
|
|
4325
|
+
type: "function",
|
|
4326
|
+
name: "get_leaderboard_entry",
|
|
3777
4327
|
inputs: [
|
|
3778
4328
|
{
|
|
3779
4329
|
name: "context_id",
|
|
3780
4330
|
type: "core::integer::u64"
|
|
3781
4331
|
},
|
|
3782
4332
|
{
|
|
3783
|
-
name: "
|
|
4333
|
+
name: "position",
|
|
4334
|
+
type: "core::integer::u32"
|
|
4335
|
+
}
|
|
4336
|
+
],
|
|
4337
|
+
outputs: [
|
|
4338
|
+
{
|
|
4339
|
+
type: "game_components_interfaces::structs::leaderboard::LeaderboardEntry"
|
|
4340
|
+
}
|
|
4341
|
+
],
|
|
4342
|
+
state_mutability: "view"
|
|
4343
|
+
},
|
|
4344
|
+
{
|
|
4345
|
+
type: "function",
|
|
4346
|
+
name: "get_top_leaderboard_entries",
|
|
4347
|
+
inputs: [
|
|
4348
|
+
{
|
|
4349
|
+
name: "context_id",
|
|
4350
|
+
type: "core::integer::u64"
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
name: "count",
|
|
3784
4354
|
type: "core::integer::u32"
|
|
3785
4355
|
}
|
|
3786
4356
|
],
|
|
4357
|
+
outputs: [
|
|
4358
|
+
{
|
|
4359
|
+
type: "core::array::Array::<game_components_interfaces::structs::leaderboard::LeaderboardEntry>"
|
|
4360
|
+
}
|
|
4361
|
+
],
|
|
4362
|
+
state_mutability: "view"
|
|
4363
|
+
},
|
|
4364
|
+
{
|
|
4365
|
+
type: "function",
|
|
4366
|
+
name: "get_position",
|
|
4367
|
+
inputs: [
|
|
4368
|
+
{
|
|
4369
|
+
name: "context_id",
|
|
4370
|
+
type: "core::integer::u64"
|
|
4371
|
+
},
|
|
4372
|
+
{
|
|
4373
|
+
name: "token_id",
|
|
4374
|
+
type: "core::felt252"
|
|
4375
|
+
}
|
|
4376
|
+
],
|
|
4377
|
+
outputs: [
|
|
4378
|
+
{
|
|
4379
|
+
type: "core::option::Option::<core::integer::u32>"
|
|
4380
|
+
}
|
|
4381
|
+
],
|
|
4382
|
+
state_mutability: "view"
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
type: "function",
|
|
4386
|
+
name: "qualifies",
|
|
4387
|
+
inputs: [
|
|
4388
|
+
{
|
|
4389
|
+
name: "context_id",
|
|
4390
|
+
type: "core::integer::u64"
|
|
4391
|
+
},
|
|
4392
|
+
{
|
|
4393
|
+
name: "score",
|
|
4394
|
+
type: "core::integer::u64"
|
|
4395
|
+
}
|
|
4396
|
+
],
|
|
3787
4397
|
outputs: [
|
|
3788
4398
|
{
|
|
3789
4399
|
type: "core::bool"
|
|
@@ -3793,7 +4403,23 @@ var budokan_default = [
|
|
|
3793
4403
|
},
|
|
3794
4404
|
{
|
|
3795
4405
|
type: "function",
|
|
3796
|
-
name: "
|
|
4406
|
+
name: "is_full",
|
|
4407
|
+
inputs: [
|
|
4408
|
+
{
|
|
4409
|
+
name: "context_id",
|
|
4410
|
+
type: "core::integer::u64"
|
|
4411
|
+
}
|
|
4412
|
+
],
|
|
4413
|
+
outputs: [
|
|
4414
|
+
{
|
|
4415
|
+
type: "core::bool"
|
|
4416
|
+
}
|
|
4417
|
+
],
|
|
4418
|
+
state_mutability: "view"
|
|
4419
|
+
},
|
|
4420
|
+
{
|
|
4421
|
+
type: "function",
|
|
4422
|
+
name: "get_leaderboard_length",
|
|
3797
4423
|
inputs: [
|
|
3798
4424
|
{
|
|
3799
4425
|
name: "context_id",
|
|
@@ -3806,6 +4432,46 @@ var budokan_default = [
|
|
|
3806
4432
|
}
|
|
3807
4433
|
],
|
|
3808
4434
|
state_mutability: "view"
|
|
4435
|
+
},
|
|
4436
|
+
{
|
|
4437
|
+
type: "function",
|
|
4438
|
+
name: "get_config",
|
|
4439
|
+
inputs: [
|
|
4440
|
+
{
|
|
4441
|
+
name: "context_id",
|
|
4442
|
+
type: "core::integer::u64"
|
|
4443
|
+
}
|
|
4444
|
+
],
|
|
4445
|
+
outputs: [
|
|
4446
|
+
{
|
|
4447
|
+
type: "game_components_interfaces::structs::leaderboard::LeaderboardStoreConfig"
|
|
4448
|
+
}
|
|
4449
|
+
],
|
|
4450
|
+
state_mutability: "view"
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
type: "function",
|
|
4454
|
+
name: "find_position",
|
|
4455
|
+
inputs: [
|
|
4456
|
+
{
|
|
4457
|
+
name: "context_id",
|
|
4458
|
+
type: "core::integer::u64"
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
name: "score",
|
|
4462
|
+
type: "core::integer::u64"
|
|
4463
|
+
},
|
|
4464
|
+
{
|
|
4465
|
+
name: "token_id",
|
|
4466
|
+
type: "core::felt252"
|
|
4467
|
+
}
|
|
4468
|
+
],
|
|
4469
|
+
outputs: [
|
|
4470
|
+
{
|
|
4471
|
+
type: "core::option::Option::<core::integer::u32>"
|
|
4472
|
+
}
|
|
4473
|
+
],
|
|
4474
|
+
state_mutability: "view"
|
|
3809
4475
|
}
|
|
3810
4476
|
]
|
|
3811
4477
|
},
|
|
@@ -3946,6 +4612,12 @@ var budokan_default = [
|
|
|
3946
4612
|
kind: "enum",
|
|
3947
4613
|
variants: []
|
|
3948
4614
|
},
|
|
4615
|
+
{
|
|
4616
|
+
type: "event",
|
|
4617
|
+
name: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
4618
|
+
kind: "enum",
|
|
4619
|
+
variants: []
|
|
4620
|
+
},
|
|
3949
4621
|
{
|
|
3950
4622
|
type: "event",
|
|
3951
4623
|
name: "budokan::events::TournamentCreated",
|
|
@@ -3961,11 +4633,6 @@ var budokan_default = [
|
|
|
3961
4633
|
type: "core::starknet::contract_address::ContractAddress",
|
|
3962
4634
|
kind: "key"
|
|
3963
4635
|
},
|
|
3964
|
-
{
|
|
3965
|
-
name: "created_at",
|
|
3966
|
-
type: "core::integer::u64",
|
|
3967
|
-
kind: "data"
|
|
3968
|
-
},
|
|
3969
4636
|
{
|
|
3970
4637
|
name: "created_by",
|
|
3971
4638
|
type: "core::starknet::contract_address::ContractAddress",
|
|
@@ -3982,18 +4649,23 @@ var budokan_default = [
|
|
|
3982
4649
|
kind: "data"
|
|
3983
4650
|
},
|
|
3984
4651
|
{
|
|
3985
|
-
name: "
|
|
3986
|
-
type: "
|
|
4652
|
+
name: "config",
|
|
4653
|
+
type: "core::felt252",
|
|
3987
4654
|
kind: "data"
|
|
3988
4655
|
},
|
|
3989
4656
|
{
|
|
3990
|
-
name: "
|
|
3991
|
-
type: "
|
|
4657
|
+
name: "client_url",
|
|
4658
|
+
type: "core::option::Option::<core::byte_array::ByteArray>",
|
|
4659
|
+
kind: "data"
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
name: "renderer",
|
|
4663
|
+
type: "core::option::Option::<core::starknet::contract_address::ContractAddress>",
|
|
3992
4664
|
kind: "data"
|
|
3993
4665
|
},
|
|
3994
4666
|
{
|
|
3995
4667
|
name: "entry_fee",
|
|
3996
|
-
type: "core::option::Option::<budokan_interfaces::budokan::
|
|
4668
|
+
type: "core::option::Option::<budokan_interfaces::budokan::EntryFeeKind>",
|
|
3997
4669
|
kind: "data"
|
|
3998
4670
|
},
|
|
3999
4671
|
{
|
|
@@ -4002,8 +4674,8 @@ var budokan_default = [
|
|
|
4002
4674
|
kind: "data"
|
|
4003
4675
|
},
|
|
4004
4676
|
{
|
|
4005
|
-
name: "
|
|
4006
|
-
type: "
|
|
4677
|
+
name: "protocol_fee_bps",
|
|
4678
|
+
type: "core::integer::u16",
|
|
4007
4679
|
kind: "data"
|
|
4008
4680
|
}
|
|
4009
4681
|
]
|
|
@@ -4023,11 +4695,6 @@ var budokan_default = [
|
|
|
4023
4695
|
type: "core::felt252",
|
|
4024
4696
|
kind: "key"
|
|
4025
4697
|
},
|
|
4026
|
-
{
|
|
4027
|
-
name: "game_address",
|
|
4028
|
-
type: "core::starknet::contract_address::ContractAddress",
|
|
4029
|
-
kind: "data"
|
|
4030
|
-
},
|
|
4031
4698
|
{
|
|
4032
4699
|
name: "player_address",
|
|
4033
4700
|
type: "core::starknet::contract_address::ContractAddress",
|
|
@@ -4037,22 +4704,12 @@ var budokan_default = [
|
|
|
4037
4704
|
name: "entry_number",
|
|
4038
4705
|
type: "core::integer::u32",
|
|
4039
4706
|
kind: "data"
|
|
4040
|
-
},
|
|
4041
|
-
{
|
|
4042
|
-
name: "has_submitted",
|
|
4043
|
-
type: "core::bool",
|
|
4044
|
-
kind: "data"
|
|
4045
|
-
},
|
|
4046
|
-
{
|
|
4047
|
-
name: "is_banned",
|
|
4048
|
-
type: "core::bool",
|
|
4049
|
-
kind: "data"
|
|
4050
4707
|
}
|
|
4051
4708
|
]
|
|
4052
4709
|
},
|
|
4053
4710
|
{
|
|
4054
4711
|
type: "event",
|
|
4055
|
-
name: "budokan::events::
|
|
4712
|
+
name: "budokan::events::TournamentEntryStateChanged",
|
|
4056
4713
|
kind: "struct",
|
|
4057
4714
|
members: [
|
|
4058
4715
|
{
|
|
@@ -4061,8 +4718,18 @@ var budokan_default = [
|
|
|
4061
4718
|
kind: "key"
|
|
4062
4719
|
},
|
|
4063
4720
|
{
|
|
4064
|
-
name: "
|
|
4065
|
-
type: "core::
|
|
4721
|
+
name: "game_token_id",
|
|
4722
|
+
type: "core::felt252",
|
|
4723
|
+
kind: "key"
|
|
4724
|
+
},
|
|
4725
|
+
{
|
|
4726
|
+
name: "has_submitted",
|
|
4727
|
+
type: "core::bool",
|
|
4728
|
+
kind: "data"
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
name: "is_banned",
|
|
4732
|
+
type: "core::bool",
|
|
4066
4733
|
kind: "data"
|
|
4067
4734
|
}
|
|
4068
4735
|
]
|
|
@@ -4088,13 +4755,8 @@ var budokan_default = [
|
|
|
4088
4755
|
kind: "data"
|
|
4089
4756
|
},
|
|
4090
4757
|
{
|
|
4091
|
-
name: "
|
|
4092
|
-
type: "
|
|
4093
|
-
kind: "data"
|
|
4094
|
-
},
|
|
4095
|
-
{
|
|
4096
|
-
name: "token_type",
|
|
4097
|
-
type: "game_components_interfaces::prize::TokenTypeData",
|
|
4758
|
+
name: "prize",
|
|
4759
|
+
type: "game_components_interfaces::prize::Prize",
|
|
4098
4760
|
kind: "data"
|
|
4099
4761
|
},
|
|
4100
4762
|
{
|
|
@@ -4203,6 +4865,11 @@ var budokan_default = [
|
|
|
4203
4865
|
type: "game_components_metagame::prize::prize_component::PrizeComponent::Event",
|
|
4204
4866
|
kind: "flat"
|
|
4205
4867
|
},
|
|
4868
|
+
{
|
|
4869
|
+
name: "ReentrancyGuardEvent",
|
|
4870
|
+
type: "openzeppelin_security::reentrancyguard::ReentrancyGuardComponent::Event",
|
|
4871
|
+
kind: "flat"
|
|
4872
|
+
},
|
|
4206
4873
|
{
|
|
4207
4874
|
name: "TournamentCreated",
|
|
4208
4875
|
type: "budokan::events::TournamentCreated",
|
|
@@ -4214,8 +4881,8 @@ var budokan_default = [
|
|
|
4214
4881
|
kind: "nested"
|
|
4215
4882
|
},
|
|
4216
4883
|
{
|
|
4217
|
-
name: "
|
|
4218
|
-
type: "budokan::events::
|
|
4884
|
+
name: "TournamentEntryStateChanged",
|
|
4885
|
+
type: "budokan::events::TournamentEntryStateChanged",
|
|
4219
4886
|
kind: "nested"
|
|
4220
4887
|
},
|
|
4221
4888
|
{
|
|
@@ -4232,6 +4899,108 @@ var budokan_default = [
|
|
|
4232
4899
|
name: "QualificationEntriesUpdated",
|
|
4233
4900
|
type: "budokan::events::QualificationEntriesUpdated",
|
|
4234
4901
|
kind: "nested"
|
|
4902
|
+
},
|
|
4903
|
+
{
|
|
4904
|
+
name: "ProtocolFeeBpsUpdated",
|
|
4905
|
+
type: "budokan::events::ProtocolFeeBpsUpdated",
|
|
4906
|
+
kind: "nested"
|
|
4907
|
+
},
|
|
4908
|
+
{
|
|
4909
|
+
name: "ProtocolFeeRecipientUpdated",
|
|
4910
|
+
type: "budokan::events::ProtocolFeeRecipientUpdated",
|
|
4911
|
+
kind: "nested"
|
|
4912
|
+
}
|
|
4913
|
+
]
|
|
4914
|
+
},
|
|
4915
|
+
{
|
|
4916
|
+
type: "interface",
|
|
4917
|
+
name: "budokan::budokan::Budokan::IBudokanProtocolFeeAdmin",
|
|
4918
|
+
items: [
|
|
4919
|
+
{
|
|
4920
|
+
type: "function",
|
|
4921
|
+
name: "set_protocol_fee_bps",
|
|
4922
|
+
inputs: [
|
|
4923
|
+
{
|
|
4924
|
+
name: "bps",
|
|
4925
|
+
type: "core::integer::u16"
|
|
4926
|
+
}
|
|
4927
|
+
],
|
|
4928
|
+
outputs: [],
|
|
4929
|
+
state_mutability: "external"
|
|
4930
|
+
},
|
|
4931
|
+
{
|
|
4932
|
+
type: "function",
|
|
4933
|
+
name: "set_protocol_fee_recipient",
|
|
4934
|
+
inputs: [
|
|
4935
|
+
{
|
|
4936
|
+
name: "recipient",
|
|
4937
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
4938
|
+
}
|
|
4939
|
+
],
|
|
4940
|
+
outputs: [],
|
|
4941
|
+
state_mutability: "external"
|
|
4942
|
+
},
|
|
4943
|
+
{
|
|
4944
|
+
type: "function",
|
|
4945
|
+
name: "protocol_fee_bps",
|
|
4946
|
+
inputs: [],
|
|
4947
|
+
outputs: [
|
|
4948
|
+
{
|
|
4949
|
+
type: "core::integer::u16"
|
|
4950
|
+
}
|
|
4951
|
+
],
|
|
4952
|
+
state_mutability: "view"
|
|
4953
|
+
},
|
|
4954
|
+
{
|
|
4955
|
+
type: "function",
|
|
4956
|
+
name: "protocol_fee_recipient",
|
|
4957
|
+
inputs: [],
|
|
4958
|
+
outputs: [
|
|
4959
|
+
{
|
|
4960
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
4961
|
+
}
|
|
4962
|
+
],
|
|
4963
|
+
state_mutability: "view"
|
|
4964
|
+
},
|
|
4965
|
+
{
|
|
4966
|
+
type: "function",
|
|
4967
|
+
name: "tournament_protocol_fee_bps",
|
|
4968
|
+
inputs: [
|
|
4969
|
+
{
|
|
4970
|
+
name: "tournament_id",
|
|
4971
|
+
type: "core::integer::u64"
|
|
4972
|
+
}
|
|
4973
|
+
],
|
|
4974
|
+
outputs: [
|
|
4975
|
+
{
|
|
4976
|
+
type: "core::integer::u16"
|
|
4977
|
+
}
|
|
4978
|
+
],
|
|
4979
|
+
state_mutability: "view"
|
|
4980
|
+
}
|
|
4981
|
+
]
|
|
4982
|
+
},
|
|
4983
|
+
{
|
|
4984
|
+
type: "event",
|
|
4985
|
+
name: "budokan::events::ProtocolFeeBpsUpdated",
|
|
4986
|
+
kind: "struct",
|
|
4987
|
+
members: [
|
|
4988
|
+
{
|
|
4989
|
+
name: "bps",
|
|
4990
|
+
type: "core::integer::u16",
|
|
4991
|
+
kind: "data"
|
|
4992
|
+
}
|
|
4993
|
+
]
|
|
4994
|
+
},
|
|
4995
|
+
{
|
|
4996
|
+
type: "event",
|
|
4997
|
+
name: "budokan::events::ProtocolFeeRecipientUpdated",
|
|
4998
|
+
kind: "struct",
|
|
4999
|
+
members: [
|
|
5000
|
+
{
|
|
5001
|
+
name: "recipient",
|
|
5002
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
5003
|
+
kind: "key"
|
|
4235
5004
|
}
|
|
4236
5005
|
]
|
|
4237
5006
|
}
|
|
@@ -4383,6 +5152,7 @@ var BudokanClient = class {
|
|
|
4383
5152
|
if (prizes.length === 0) return t;
|
|
4384
5153
|
const tokenMap = /* @__PURE__ */ new Map();
|
|
4385
5154
|
for (const p of prizes) {
|
|
5155
|
+
if (p.tokenType === "extension" || p.tokenAddress == null) continue;
|
|
4386
5156
|
const key = p.tokenAddress;
|
|
4387
5157
|
const existing = tokenMap.get(key);
|
|
4388
5158
|
if (existing) {
|