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