From d2d2ebc26bb8f66c0f68a4d760422d72d2a1a57f Mon Sep 17 00:00:00 2001 From: Timidan Date: Thu, 22 Jun 2023 17:34:57 +0100 Subject: [PATCH 1/9] add rfSzn5 airdrop scripts and tests --- scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts | 356 ++++++++++++++++++ scripts/airdrops/rfSzn5BdgsAirdrop.ts | 245 ++++++++++++ scripts/helperFunctions.ts | 4 + ...vegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP.svg | 1 + ...avegotchi-RF-SZN5-Baadge-TOP-10-RARITY.svg | 1 + .../Aavegotchi-RF-SZN5-Baadge-TOP-10-XP.svg | 1 + ...egotchi-RF-SZN5-Baadge-TOP-100-KINSHIP.svg | 1 + ...vegotchi-RF-SZN5-Baadge-TOP-100-RARITY.svg | 1 + .../Aavegotchi-RF-SZN5-Baadge-TOP-100-XP.svg | 1 + ...chi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER.svg | 1 + ...otchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP.svg | 1 + ...otchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP.svg | 1 + ...otchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP.svg | 1 + svgs/wearables-sides.ts | 55 ++- svgs/wearables.ts | 17 + test/szn5BaadgeAirdropTest.ts | 202 ++++++++++ 22 files changed, 893 insertions(+), 2 deletions(-) create mode 100644 scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts create mode 100644 scripts/airdrops/rfSzn5BdgsAirdrop.ts create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-XP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-XP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY.svg create mode 100644 svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP.svg create mode 100644 test/szn5BaadgeAirdropTest.ts diff --git a/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts b/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts new file mode 100644 index 000000000..3db0ab716 --- /dev/null +++ b/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts @@ -0,0 +1,356 @@ +import { ItemTypeInputNew } from "../../itemTypeHelpers"; + +export const itemTypes: ItemTypeInputNew[] = [ + { + name: "CHAAMPION of Rarity Farming SZN5 (Rarity)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of RARITY for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 370, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "CHAAMPION of Rarity Farming SZN5 (Kinship)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of KINSHIP for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 371, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "CHAAMPION of Rarity Farming SZN5 (XP)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of XP for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 372, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 RARITY 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all RARITY for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 373, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 KINSHIP 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all KINSHIP for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 374, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 XP 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all XP for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 5k to 7500 winning gotchis each round!", + svgId: 375, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 RARITY 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all RARITY for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 376, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 KINSHIP 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all KINSHIP for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 377, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 XP 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all XP for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 378, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 Raanked", + description: + "This Aavegotchi achieved leaderboard ranking in at least one category during the fifth season of Rarity Farming. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 379, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "common", + maxQuantity: 12809, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 RARITY Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of RARITY for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 380, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 KINSHIP Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of KINSHIP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 381, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 XP Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of XP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 382, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 RARITY Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of RARITY for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 383, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 KINSHIP Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of KINSHIP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 384, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN5 XP Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of XP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 385, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, +]; diff --git a/scripts/airdrops/rfSzn5BdgsAirdrop.ts b/scripts/airdrops/rfSzn5BdgsAirdrop.ts new file mode 100644 index 000000000..641b4892d --- /dev/null +++ b/scripts/airdrops/rfSzn5BdgsAirdrop.ts @@ -0,0 +1,245 @@ +import { run } from "hardhat"; +import { itemTypes } from "../../scripts/addItemTypes/itemTypes/rfSzn5Bdgs"; +import { + updateBaadgeTaskForSvgType, + mintSvgTaskForBaadges, + airdropTaskForBaadges, +} from "../../scripts/svgHelperFunctions"; + +import { + getRfSznTypeRanking, + getPlaayersIds, + hasDuplicateGotchiIds, +} from "../../scripts/helperFunctions"; + +import { dataArgs as dataArgs1 } from "../../data/airdrops/rarityfarming/szn5/rnd1"; +import { dataArgs as dataArgs2 } from "../../data/airdrops/rarityfarming/szn5/rnd2"; +import { dataArgs as dataArgs3 } from "../../data/airdrops/rarityfarming/szn5/rnd3"; +import { dataArgs as dataArgs4 } from "../../data/airdrops/rarityfarming/szn5/rnd4"; + +export async function main() { + const baadges: string[] = [ + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY", //370 + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP", //371 + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP", //372 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY", //373 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP", //374 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP", //375 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY", //376 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP", //377 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP", //378 + + "Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER", //379 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY", //380 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP", //381 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-XP", //382 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY", //383 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP", //384 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-XP", //385 + ]; + + //Upload SVGs + let ids: number[] = []; + for (let i = 370; i <= 385; i++) { + ids.push(i); + } + let upload = await updateBaadgeTaskForSvgType(baadges, "sZN5Baadges", ids); + + await run("updateSvgs", upload); + + //Mint baadge item types + let mint = await mintSvgTaskForBaadges("rfSzn5Bdgs"); + + console.log("mint:", mint); + await run("mintBaadgeSvgs", mint); + + //Airdrop + const rarityArray = [ + dataArgs1.rarityGotchis, + dataArgs2.rarityGotchis, + dataArgs3.rarityGotchis, + dataArgs4.rarityGotchis, + ]; + const kinshipArray = [ + dataArgs1.kinshipGotchis, + dataArgs2.kinshipGotchis, + dataArgs3.kinshipGotchis, + dataArgs4.kinshipGotchis, + ]; + const xpArray = [ + dataArgs1.xpGotchis, + dataArgs2.xpGotchis, + dataArgs3.xpGotchis, + dataArgs4.xpGotchis, + ]; + + const rarityRFSzn5 = await getRfSznTypeRanking(rarityArray, "rarity"); + console.log("Rarity: ", rarityRFSzn5); + const top10rarity = rarityRFSzn5.slice(3, 10); + console.log("Top 10 Rarity", top10rarity); + const top100rarity = rarityRFSzn5.slice(10, 100); + console.log("Top 100 Rarity", top100rarity); + console.log("Top 100 Rarity Array Length", top100rarity.length); + + const kinshipRFSzn5 = await getRfSznTypeRanking(kinshipArray, "kinship"); + console.log("Kinship: ", kinshipRFSzn5); + const top10kinship = kinshipRFSzn5.slice(3, 10); + console.log("Top 10 Kinship", top10kinship); + const top100kinship = kinshipRFSzn5.slice(10, 100); + console.log("Top 100 Kinship", top100kinship); + + const xpRFSzn5 = await getRfSznTypeRanking(xpArray, "xp"); + console.log("XP: ", xpRFSzn5); + const top10xp = xpRFSzn5.slice(3, 10); + console.log("Top 10 XP", top10xp); + const top100xp = xpRFSzn5.slice(10, 100); + console.log("Top 100 XP", top100xp); + console.log("Top 10 XP Array Length", top10xp.length); + console.log("Top 100 XP Array Length", top100xp.length); + + const rarityPlaayers = await getPlaayersIds(rarityArray); + const kinshipPlaayers = await getPlaayersIds(kinshipArray); + const xpPlaayers = await getPlaayersIds(xpArray); + + const plaayers = [rarityPlaayers, kinshipPlaayers, xpPlaayers]; + const totalPlaayers = await getPlaayersIds(plaayers); + console.log("Total amount of players: ", totalPlaayers.length); + console.log("Max Rank Baadge amount: ", itemTypes[9].maxQuantity); + + console.log( + "Does totalPlaayers Array Have Duplicates: ", + await hasDuplicateGotchiIds(totalPlaayers) + ); + + console.log(itemTypes[0].name); + console.log("Rarity Chaamp: ", rarityRFSzn5[0]); + const rarityChaampion = await airdropTaskForBaadges( + [itemTypes[0]], + [rarityRFSzn5[0]] + ); + await run("airdropBaadges", rarityChaampion); + + console.log(itemTypes[1].name); + const kinshipChaampion = await airdropTaskForBaadges( + [itemTypes[1]], + [kinshipRFSzn5[0]] + ); + await run("airdropBaadges", kinshipChaampion); + + //xp tie breakers go to gotchi id: 6952 for higher rf 4 average xp score + console.log(itemTypes[2].name); + console.log("XP Chaampion: ", xpRFSzn5[0]); + const xpChaampion = await airdropTaskForBaadges( + [itemTypes[2]], + [xpRFSzn5[0]] + ); + await run("airdropBaadges", xpChaampion); + + console.log(itemTypes[3].name); + const rarity2nd = await airdropTaskForBaadges( + [itemTypes[3]], + [rarityRFSzn5[1]] + ); + await run("airdropBaadges", rarity2nd); + + console.log(itemTypes[4].name); + const kinship2nd = await airdropTaskForBaadges( + [itemTypes[4]], + [kinshipRFSzn5[1]] + ); + await run("airdropBaadges", kinship2nd); + + console.log(itemTypes[5].name); + const xp2nd = await airdropTaskForBaadges([itemTypes[5]], [xpRFSzn5[1]]); + await run("airdropBaadges", xp2nd); + + console.log(itemTypes[6].name); + const rarity3rd = await airdropTaskForBaadges( + [itemTypes[6]], + [rarityRFSzn5[2]] + ); + await run("airdropBaadges", rarity3rd); + + console.log(itemTypes[7].name); + const kinship3rd = await airdropTaskForBaadges( + [itemTypes[7]], + [kinshipRFSzn5[2]] + ); + await run("airdropBaadges", kinship3rd); + + console.log(itemTypes[8].name); + const xp3rd = await airdropTaskForBaadges([itemTypes[8]], [xpRFSzn5[2]]); + await run("airdropBaadges", xp3rd); + + console.log(itemTypes[10].name); + const rarityTop10 = await airdropTaskForBaadges([itemTypes[10]], top10rarity); + await run("airdropBaadges", rarityTop10); + + console.log(itemTypes[11].name); + const kinshipTop10 = await airdropTaskForBaadges( + [itemTypes[11]], + top10kinship + ); + await run("airdropBaadges", kinshipTop10); + + console.log(itemTypes[12].name); + const xpTop10 = await airdropTaskForBaadges([itemTypes[12]], top10xp); + await run("airdropBaadges", xpTop10); + + console.log(itemTypes[13].name); + const rarityTop100 = await airdropTaskForBaadges( + [itemTypes[13]], + top100rarity + ); + await run("airdropBaadges", rarityTop100); + + console.log(itemTypes[14].name); + const kinshipTop100 = await airdropTaskForBaadges( + [itemTypes[14]], + top100kinship + ); + await run("airdropBaadges", kinshipTop100); + + console.log(itemTypes[15].name); + const xpTop100 = await airdropTaskForBaadges([itemTypes[15]], top100xp); + await run("airdropBaadges", xpTop100); + + console.log(itemTypes[9].name); + + const raankingNumbersArray: number[] = []; + for (let x = 0; x < totalPlaayers.length; x++) { + raankingNumbersArray.push(Number(totalPlaayers[x])); + } + + const perBatch = 200; + const batches = Math.ceil(raankingNumbersArray.length / perBatch); + + console.log("Begin airdrops!"); + + //comment out for testing + for (let index = 0; index < batches; index++) { + console.log("Airdropping batch:", index); + let gotchiBatch = raankingNumbersArray.slice( + index * perBatch, + (index + 1) * perBatch + ); + + let plaayerAirdrop = await airdropTaskForBaadges( + [itemTypes[9]], + gotchiBatch + ); + + await run("airdropBaadges", plaayerAirdrop); + console.log("Complete Airdropping batch:", index); + } +} + +if (require.main === module) { + main() + .then(() => process.exit(0)) + // .then(() => console.log('upgrade completed') /* process.exit(0) */) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/scripts/helperFunctions.ts b/scripts/helperFunctions.ts index 95059dafd..62a64f50c 100644 --- a/scripts/helperFunctions.ts +++ b/scripts/helperFunctions.ts @@ -121,6 +121,10 @@ export async function getDiamondSigner( method: "hardhat_impersonateAccount", params: [override ? override : owner], }); + await hre.network.provider.request({ + method: "hardhat_setBalance", + params: [owner, "0x1000000000000000000000000"], + }); return await hre.ethers.getSigner(override ? override : owner); } else if (hre.network.name === "matic") { console.log("Diamond signer - Matic"); diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP.svg new file mode 100644 index 000000000..9f73f9777 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY.svg new file mode 100644 index 000000000..4f391ed3f --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-XP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-XP.svg new file mode 100644 index 000000000..e5c8181d9 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-10-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP.svg new file mode 100644 index 000000000..aca9549e9 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY.svg new file mode 100644 index 000000000..bf59b6bf2 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-XP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-XP.svg new file mode 100644 index 000000000..8cb9f42a9 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-100-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER.svg new file mode 100644 index 000000000..2aedf0df8 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP.svg new file mode 100644 index 000000000..41ed292ad --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY.svg new file mode 100644 index 000000000..7241c36b6 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP.svg new file mode 100644 index 000000000..43f750471 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP.svg new file mode 100644 index 000000000..26974c786 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY.svg new file mode 100644 index 000000000..ee2088a57 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP.svg new file mode 100644 index 000000000..72ce187db --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP.svg new file mode 100644 index 000000000..c1e50a87a --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY.svg new file mode 100644 index 000000000..1c23a9096 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP.svg b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP.svg new file mode 100644 index 000000000..64df965a6 --- /dev/null +++ b/svgs/sZN5Baadges/Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/wearables-sides.ts b/svgs/wearables-sides.ts index a1721827d..82fb4c65e 100644 --- a/svgs/wearables-sides.ts +++ b/svgs/wearables-sides.ts @@ -375,6 +375,23 @@ export const wearablesRightSvgs = [ wearable("367_EyesofDevotionRight"), wearable("368_BeardofDivinityRight"), wearable("369_StaffofCreationRight"), + //szn 5 baadges + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, ]; export const wearablesBackSvgs = [ @@ -744,14 +761,31 @@ export const wearablesBackSvgs = [ wearable("359_ForgeGogglesBack"), wearable("360_GeodeSmasherBack"), wearable("361_GeoBack"), - bodyWearable("362_FAKEShirt"), - wearable("363_FAKEBeretBack"), + bodyWearable("362_FakeShirt"), + wearable("363_FakeBeretBack"), wearable("364_PaintBrushBack"), wearable("365_PaintPaletteBack"), bodyWearable("366_HeavenlyRobes"), "367_EyesofDevotionBack", "368_BeardofDivinityBack", wearable("369_StaffofCreationBack"), + //szn 5 baadges + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, ]; export const wearablesLeftSvgs = [ @@ -1129,6 +1163,23 @@ export const wearablesLeftSvgs = [ wearable("367_EyesofDevotionLeft"), wearable("368_BeardofDivinityLeft"), wearable("369_StaffofCreationLeft"), + //szn 5 baadges + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, ]; export const wearablesLeftSleeveSvgs = [ diff --git a/svgs/wearables.ts b/svgs/wearables.ts index ac70263ec..a7c46e1af 100644 --- a/svgs/wearables.ts +++ b/svgs/wearables.ts @@ -376,6 +376,23 @@ export const wearablesSvgs = [ wearable("367_EyesofDevotion"), wearable("368_BeardofDivinity"), wearable("369_StaffofCreation"), + //szn 5 baadges + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, ]; export const sleeveSvgs = [ diff --git a/test/szn5BaadgeAirdropTest.ts b/test/szn5BaadgeAirdropTest.ts new file mode 100644 index 000000000..0d0f12e9d --- /dev/null +++ b/test/szn5BaadgeAirdropTest.ts @@ -0,0 +1,202 @@ +import { ethers } from "hardhat"; +import { maticDiamondAddress } from "../scripts/helperFunctions"; +import { AavegotchiFacet } from "../typechain"; +import { Signer } from "@ethersproject/abstract-signer"; +import { expect } from "chai"; + +import { itemTypes } from "../scripts/addItemTypes/itemTypes/rfSzn5Bdgs"; +import { dataArgs as dataArgs1 } from "../data/airdrops/rarityfarming/szn5/rnd1"; +import { dataArgs as dataArgs2 } from "../data/airdrops/rarityfarming/szn5/rnd2"; +import { dataArgs as dataArgs3 } from "../data/airdrops/rarityfarming/szn5/rnd3"; +import { dataArgs as dataArgs4 } from "../data/airdrops/rarityfarming/szn5/rnd4"; + +import { getRfSznTypeRanking } from "../scripts/helperFunctions"; + +describe("Airdrop SZN5 Baadges", async function () { + this.timeout(200000000); + + let aavegotchiFacet: AavegotchiFacet, + signer: Signer, + rarityRFSzn5: number[], + kinshipRFSzn5: number[], + xpRFSzn5: number[]; + + before(async function () { + signer = await ethers.getSigner(maticDiamondAddress); + + const rarityArray = [ + dataArgs1.rarityGotchis, + dataArgs2.rarityGotchis, + dataArgs3.rarityGotchis, + dataArgs4.rarityGotchis, + ]; + const kinshipArray = [ + dataArgs1.kinshipGotchis, + dataArgs2.kinshipGotchis, + dataArgs3.kinshipGotchis, + dataArgs4.kinshipGotchis, + ]; + const xpArray = [ + dataArgs1.xpGotchis, + dataArgs2.xpGotchis, + dataArgs3.xpGotchis, + dataArgs4.xpGotchis, + ]; + + aavegotchiFacet = (await ethers.getContractAt( + "contracts/Aavegotchi/facets/AavegotchiFacet.sol:AavegotchiFacet", + maticDiamondAddress, + signer + )) as AavegotchiFacet; + + rarityRFSzn5 = await getRfSznTypeRanking(rarityArray, "rarity"); + + kinshipRFSzn5 = await getRfSznTypeRanking(kinshipArray, "kinship"); + + xpRFSzn5 = await getRfSznTypeRanking(xpArray, "xp"); + + // await main(); + }); + + it.only("Should airdrop szn5 champion baadges", async function () { + //rarity champ + let rarityChamp = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[0]); + + let itemIds = getAavegotchiItemIds(rarityChamp); + + expect(exists(itemTypes[0].svgId.toString(), itemIds)).to.equal(true); + + //kinship champ + let kinshipChamp = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[0]); + itemIds = getAavegotchiItemIds(kinshipChamp); + + expect(exists(itemTypes[1].svgId.toString(), itemIds)).to.equal(true); + + //xp champ (tiebreaker) + let xpChamp = await aavegotchiFacet.getAavegotchi(xpRFSzn5[0]); + itemIds = getAavegotchiItemIds(xpChamp); + + expect(exists(itemTypes[2].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn5 2nd and 3rd place baadges", async function () { + //rarity 2nd + let rarity2nd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[1]); + let itemIds = getAavegotchiItemIds(rarity2nd); + + expect(exists(itemTypes[3].svgId.toString(), itemIds)).to.equal(true); + + //kinship 2nd + let kinship2nd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[1]); + itemIds = getAavegotchiItemIds(kinship2nd); + + expect(exists(itemTypes[4].svgId.toString(), itemIds)).to.equal(true); + + // //xp 2nd + let xp2nd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[1]); + itemIds = getAavegotchiItemIds(xp2nd); + + expect(exists(itemTypes[5].svgId.toString(), itemIds)).to.equal(true); + + //rarity 3rd + let rarity3rd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[2]); + itemIds = getAavegotchiItemIds(rarity3rd); + + expect(exists(itemTypes[6].svgId.toString(), itemIds)).to.equal(true); + + //kinship 3rd + let kinship3rd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[2]); + itemIds = getAavegotchiItemIds(kinship3rd); + + expect(exists(itemTypes[7].svgId.toString(), itemIds)).to.equal(true); + + //xp 3rd + let xp3rd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[2]); + itemIds = getAavegotchiItemIds(xp3rd); + + expect(exists(itemTypes[8].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn5 top10 baadges", async function () { + //rarity top 10 + let rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[3]); + let itemIds = getAavegotchiItemIds(rarityTop10); + + expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); + + rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[9]); + itemIds = getAavegotchiItemIds(rarityTop10); + + expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); + + //kinship top 10 + let kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[3]); + itemIds = getAavegotchiItemIds(kinshipTop10); + + expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); + + kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[9]); + itemIds = getAavegotchiItemIds(kinshipTop10); + + expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); + + //XP top 10 + let xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[3]); + itemIds = getAavegotchiItemIds(xpTop10); + + expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); + + xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[9]); + itemIds = getAavegotchiItemIds(xpTop10); + + expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn5 top100 baadges", async function () { + //rarity top 100 + let rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[10]); + let itemIds = getAavegotchiItemIds(rarityTop100); + + expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); + + rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[99]); + itemIds = getAavegotchiItemIds(rarityTop100); + + expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); + + //kinship top 100 + let kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[10]); + itemIds = getAavegotchiItemIds(kinshipTop100); + + expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); + + kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[99]); + itemIds = getAavegotchiItemIds(kinshipTop100); + + expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); + + //XP top 100 + let xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[10]); + itemIds = getAavegotchiItemIds(xpTop100); + + expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true); + + xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[99]); + itemIds = getAavegotchiItemIds(xpTop100); + + expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true); + }); +}); + +function getAavegotchiItemIds(gotchi: any) { + let itemIds: string[] = []; + const allItems: any[] = gotchi.items; + allItems.forEach((item) => { + itemIds.push(item.itemId.toString()); + }); + return itemIds; +} + +function exists(itemId: string, itemIds: string[]) { + return itemIds.includes(itemId); +} From 06c9bb28120ecaf3042a7ce79eee143b4f96acb1 Mon Sep 17 00:00:00 2001 From: Timidan Date: Tue, 1 Aug 2023 16:22:23 +0100 Subject: [PATCH 2/9] use defender --- tasks/baadgeAirdrop.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/baadgeAirdrop.ts b/tasks/baadgeAirdrop.ts index ec6401bfd..a72a0a740 100644 --- a/tasks/baadgeAirdrop.ts +++ b/tasks/baadgeAirdrop.ts @@ -6,6 +6,7 @@ import { getDiamondSigner, itemManagerAlt, gasPrice, + getRelayerSigner, } from "../scripts/helperFunctions"; import { ItemsTransferFacet } from "../typechain"; @@ -57,7 +58,7 @@ task( console.log("Batch Ids for airdrop: ", batchIds); console.log("tokenids:", tokenIds); - const signer: Signer = await getDiamondSigner(hre, itemManagerAlt, false); + const signer: Signer = await getRelayerSigner(hre); const itemsTransferFacet = (await hre.ethers.getContractAt( "ItemsTransferFacet", From 184f72ec50e1d7d85c34891d9b3aa232beb4bfb9 Mon Sep 17 00:00:00 2001 From: Timidan Date: Sat, 16 Dec 2023 13:42:38 +0100 Subject: [PATCH 3/9] sync with new wearables --- scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts | 32 +++++++++--------- scripts/airdrops/rfSzn5BdgsAirdrop.ts | 35 ++++++++++---------- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts b/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts index 3db0ab716..5afee857d 100644 --- a/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts +++ b/scripts/addItemTypes/itemTypes/rfSzn5Bdgs.ts @@ -5,7 +5,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "CHAAMPION of Rarity Farming SZN5 (Rarity)", description: "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of RARITY for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 370, + svgId: 388, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -27,7 +27,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "CHAAMPION of Rarity Farming SZN5 (Kinship)", description: "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of KINSHIP for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 371, + svgId: 389, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -49,7 +49,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "CHAAMPION of Rarity Farming SZN5 (XP)", description: "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of XP for Rarity Farming SZN 5. FANTASTIC! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 372, + svgId: 390, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -71,7 +71,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 RARITY 2nd Place", description: "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all RARITY for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 373, + svgId: 391, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -93,7 +93,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 KINSHIP 2nd Place", description: "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all KINSHIP for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 374, + svgId: 392, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -115,7 +115,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 XP 2nd Place", description: "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all XP for Rarity Farming SZN 5. Incredible! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 5k to 7500 winning gotchis each round!", - svgId: 375, + svgId: 393, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -137,7 +137,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 RARITY 3rd Place", description: "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all RARITY for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 376, + svgId: 394, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -159,7 +159,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 KINSHIP 3rd Place", description: "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all KINSHIP for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 377, + svgId: 395, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -181,7 +181,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 XP 3rd Place", description: "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all XP for Rarity Farming SZN 5. Impressive! From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 378, + svgId: 396, minLevel: 0, canBeTransferred: false, rarityLevel: "godlike", @@ -203,7 +203,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 Raanked", description: "This Aavegotchi achieved leaderboard ranking in at least one category during the fifth season of Rarity Farming. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 379, + svgId: 397, minLevel: 0, canBeTransferred: false, rarityLevel: "common", @@ -225,7 +225,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 RARITY Top 10", description: "This Aavegotchi achieved a rank in the top 10 of RARITY for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 380, + svgId: 398, minLevel: 0, canBeTransferred: false, rarityLevel: "mythical", @@ -247,7 +247,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 KINSHIP Top 10", description: "This Aavegotchi achieved a rank in the top 10 of KINSHIP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 381, + svgId: 399, minLevel: 0, canBeTransferred: false, rarityLevel: "mythical", @@ -269,7 +269,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 XP Top 10", description: "This Aavegotchi achieved a rank in the top 10 of XP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 382, + svgId: 400, minLevel: 0, canBeTransferred: false, rarityLevel: "mythical", @@ -291,7 +291,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 RARITY Top 100", description: "This Aavegotchi achieved a rank in the top 100 of RARITY for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 383, + svgId: 401, minLevel: 0, canBeTransferred: false, rarityLevel: "legendary", @@ -313,7 +313,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 KINSHIP Top 100", description: "This Aavegotchi achieved a rank in the top 100 of KINSHIP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 384, + svgId: 402, minLevel: 0, canBeTransferred: false, rarityLevel: "legendary", @@ -335,7 +335,7 @@ export const itemTypes: ItemTypeInputNew[] = [ name: "Rarity Farming SZN5 XP Top 100", description: "This Aavegotchi achieved a rank in the top 100 of XP for Rarity Farming SZN 5. From January 31st to March 28th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", - svgId: 385, + svgId: 403, minLevel: 0, canBeTransferred: false, rarityLevel: "legendary", diff --git a/scripts/airdrops/rfSzn5BdgsAirdrop.ts b/scripts/airdrops/rfSzn5BdgsAirdrop.ts index 641b4892d..c5f039286 100644 --- a/scripts/airdrops/rfSzn5BdgsAirdrop.ts +++ b/scripts/airdrops/rfSzn5BdgsAirdrop.ts @@ -19,23 +19,23 @@ import { dataArgs as dataArgs4 } from "../../data/airdrops/rarityfarming/szn5/rn export async function main() { const baadges: string[] = [ - "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY", //370 - "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP", //371 - "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP", //372 - "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY", //373 - "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP", //374 - "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP", //375 - "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY", //376 - "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP", //377 - "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP", //378 - - "Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER", //379 - "Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY", //380 - "Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP", //381 - "Aavegotchi-RF-SZN5-Baadge-TOP-10-XP", //382 - "Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY", //383 - "Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP", //384 - "Aavegotchi-RF-SZN5-Baadge-TOP-100-XP", //385 + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-RARITY", //388 + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-KINSHIP", //389 + "Aavegotchi-RF-SZN5-Trophy-1ST-PLACE-XP", //390 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-RARITY", //391 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-KINSHIP", //392 + "Aavegotchi-RF-SZN5-Trophy-2ND-PLACE-XP", //393 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-RARITY", //394 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-KINSHIP", //395 + "Aavegotchi-RF-SZN5-Trophy-3RD-PLACE-XP", //396 + + "Aavegotchi-RF-SZN5-Baadge-TOP-RAANKED-PLAAYER", //397 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-RARITY", //398 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-KINSHIP", //399 + "Aavegotchi-RF-SZN5-Baadge-TOP-10-XP", //400 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-RARITY", //401 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-KINSHIP", //402 + "Aavegotchi-RF-SZN5-Baadge-TOP-100-XP", //403 ]; //Upload SVGs @@ -126,7 +126,6 @@ export async function main() { ); await run("airdropBaadges", kinshipChaampion); - //xp tie breakers go to gotchi id: 6952 for higher rf 4 average xp score console.log(itemTypes[2].name); console.log("XP Chaampion: ", xpRFSzn5[0]); const xpChaampion = await airdropTaskForBaadges( From f28637661706434df69455403974a4b50c5221b8 Mon Sep 17 00:00:00 2001 From: Timidan Date: Sat, 16 Dec 2023 13:57:37 +0100 Subject: [PATCH 4/9] sync itemtypes --- svgs/wearables-sides.ts | 153 +++++++++++++++++++++++++++------------- svgs/wearables.ts | 51 +++++++++----- 2 files changed, 140 insertions(+), 64 deletions(-) diff --git a/svgs/wearables-sides.ts b/svgs/wearables-sides.ts index 82fb4c65e..591e57cf9 100644 --- a/svgs/wearables-sides.ts +++ b/svgs/wearables-sides.ts @@ -375,23 +375,42 @@ export const wearablesRightSvgs = [ wearable("367_EyesofDevotionRight"), wearable("368_BeardofDivinityRight"), wearable("369_StaffofCreationRight"), + //forge wearables2 + wearable("370_WavyHairRight"), + wearable("371_PlasticEarringsRight"), + bodyWearableRight("372_PartyDress"), + bodyWearableRight("373_Overalls"), + "374_LensFrensPlantRight", + wearable("375_GMSeedsRight"), + wearable("376_LickBrainRight"), + wearable("377_LickEyesRight"), + wearable("378_LickTongueRight"), + wearable("379_LickTentacleRight"), + wearable("380_SebastienHairRight"), + wearable("381_VoxelEyesRight"), + wearable("382_GOATeeRight"), + bodyWearableRight("383_SandboxHoodie"), + wearable("384_FaangsRight"), + wearable("385_BlockScannersRight"), + wearable("386_StaffCharmingRight"), + wearable("387_RoflnogginRight"), //szn 5 baadges - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesBackSvgs = [ @@ -769,23 +788,42 @@ export const wearablesBackSvgs = [ "367_EyesofDevotionBack", "368_BeardofDivinityBack", wearable("369_StaffofCreationBack"), + //forge wearables2 + wearable("370_WavyHairBack"), + wearable("371_PlasticEarringsBack"), + bodyWearable("372_PartyDress"), + bodyWearable("373_Overalls"), + wearable("374_LensFrensPlantBack"), + wearable("375_GMSeedsBack"), + wearable("376_LickBrainBack"), + wearable("377_LickEyesBack"), + "378_LickTongue", + wearable("379_LickTentacleBack"), + wearable("380_SebastienHairBack"), + "381_VoxelEyes", + "382_GOATee", + bodyWearable("383_SandboxHoodie"), + "384_Faangs", + "385_BlockScanners", + wearable("386_StaffCharmingBack"), + wearable("387_RoflnogginBack"), //szn 5 baadges - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesLeftSvgs = [ @@ -1163,23 +1201,42 @@ export const wearablesLeftSvgs = [ wearable("367_EyesofDevotionLeft"), wearable("368_BeardofDivinityLeft"), wearable("369_StaffofCreationLeft"), + //forge wearables2 + wearable("370_WavyHairLeft"), + wearable("371_PlasticEarringsLeft"), + bodyWearableLeft("372_PartyDress"), + bodyWearableLeft("373_Overalls"), + wearable("374_LensFrensPlantLeft"), + wearable("375_GMSeedsLeft"), + wearable("376_LickBrainLeft"), + wearable("377_LickEyesLeft"), + wearable("378_LickTongueLeft"), + wearable("379_LickTentacleLeft"), + wearable("380_SebastienHairLeft"), + wearable("381_VoxelEyesLeft"), + wearable("382_GOATeeLeft"), + bodyWearableLeft("383_SandboxHoodie"), + wearable("384_FaangsLeft"), + wearable("385_BlockScannersLeft"), + wearable("386_StaffCharmingLeft"), + wearable("387_RoflnogginLeft"), //szn 5 baadges - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesLeftSleeveSvgs = [ diff --git a/svgs/wearables.ts b/svgs/wearables.ts index a7c46e1af..215bce55f 100644 --- a/svgs/wearables.ts +++ b/svgs/wearables.ts @@ -376,23 +376,42 @@ export const wearablesSvgs = [ wearable("367_EyesofDevotion"), wearable("368_BeardofDivinity"), wearable("369_StaffofCreation"), + //forge wearables2 + wearable("370_WavyHair"), + wearable("371_PlasticEarrings"), + bodyWearable("372_PartyDress"), + bodyWearable("373_Overalls"), + wearable("374_LensFrensPlant"), + wearable("375_GMSeeds"), + wearable("376_LickBrain"), + wearable("377_LickEyes"), + wearable("378_LickTongue"), + wearable("379_LickTentacle"), + wearable("380_SebastienHair"), + wearable("381_VoxelEyes"), + wearable("382_GOATee"), + bodyWearable("383_SandboxHoodie"), + wearable("384_Faangs"), + wearable("385_BlockScanners"), + wearable("386_StaffCharming"), + wearable("387_Roflnoggin"), //szn 5 baadges - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const sleeveSvgs = [ From 8506a20dc57c67c04d1821cafde264744674be03 Mon Sep 17 00:00:00 2001 From: Timidan Date: Sat, 16 Dec 2023 14:40:03 +0100 Subject: [PATCH 5/9] final baadge sync --- svgs/wearables-sides.ts | 51 +++++++++++++++++++++++++++++++++++++++++ svgs/wearables.ts | 17 ++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/svgs/wearables-sides.ts b/svgs/wearables-sides.ts index 74d0b23f0..a66e2d8b2 100644 --- a/svgs/wearables-sides.ts +++ b/svgs/wearables-sides.ts @@ -396,6 +396,23 @@ export const wearablesRightSvgs = [ wearable("385_BlockScannersRight"), wearable("386_StaffCharmingRight"), wearable("387_RoflnogginRight"), + //szn 5 baadges + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesBackSvgs = [ @@ -792,6 +809,23 @@ export const wearablesBackSvgs = [ "385_BlockScanners", wearable("386_StaffCharmingBack"), wearable("387_RoflnogginBack"), + //szn 5 baadges + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesLeftSvgs = [ @@ -1188,6 +1222,23 @@ export const wearablesLeftSvgs = [ wearable("385_BlockScannersLeft"), wearable("386_StaffCharmingLeft"), wearable("387_RoflnogginLeft"), + //szn 5 baadges + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const wearablesLeftSleeveSvgs = [ diff --git a/svgs/wearables.ts b/svgs/wearables.ts index 918ab3f4e..a699fd977 100644 --- a/svgs/wearables.ts +++ b/svgs/wearables.ts @@ -395,6 +395,23 @@ export const wearablesSvgs = [ wearable("385_BlockScanners"), wearable("386_StaffCharming"), wearable("387_Roflnoggin"), + //szn 5 baadges + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, ]; export const sleeveSvgs = [ From 89ad46c4d3aac08fd0aa8d7bccf75f624dc25b40 Mon Sep 17 00:00:00 2001 From: Timidan Date: Sat, 16 Dec 2023 14:48:27 +0100 Subject: [PATCH 6/9] revert change --- svgs/wearables-sides.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svgs/wearables-sides.ts b/svgs/wearables-sides.ts index a66e2d8b2..45d923413 100644 --- a/svgs/wearables-sides.ts +++ b/svgs/wearables-sides.ts @@ -782,8 +782,8 @@ export const wearablesBackSvgs = [ wearable("359_ForgeGogglesBack"), wearable("360_GeodeSmasherBack"), wearable("361_GeoBack"), - bodyWearable("362_FakeShirt"), - wearable("363_FakeBeretBack"), + bodyWearable("362_FAKEShirt"), + wearable("363_FAKEBeretBack"), wearable("364_PaintBrushBack"), wearable("365_PaintPaletteBack"), bodyWearable("366_HeavenlyRobes"), From 83835b868bfa7b286b6a36a697b2d22df58e78f7 Mon Sep 17 00:00:00 2001 From: Timidan Date: Mon, 18 Dec 2023 21:29:59 +0100 Subject: [PATCH 7/9] update baadges script --- scripts/airdrops/rfSzn5BdgsAirdrop.ts | 32 +++++++++++++-------------- scripts/svgHelperFunctions.ts | 2 +- tasks/baadgeAirdrop.ts | 3 ++- tasks/mintBaadgeSvgs.ts | 15 +++++++------ test/szn5BaadgeAirdropTest.ts | 4 ++-- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/scripts/airdrops/rfSzn5BdgsAirdrop.ts b/scripts/airdrops/rfSzn5BdgsAirdrop.ts index c5f039286..ed3c88019 100644 --- a/scripts/airdrops/rfSzn5BdgsAirdrop.ts +++ b/scripts/airdrops/rfSzn5BdgsAirdrop.ts @@ -40,7 +40,7 @@ export async function main() { //Upload SVGs let ids: number[] = []; - for (let i = 370; i <= 385; i++) { + for (let i = 388; i <= 403; i++) { ids.push(i); } let upload = await updateBaadgeTaskForSvgType(baadges, "sZN5Baadges", ids); @@ -216,21 +216,21 @@ export async function main() { console.log("Begin airdrops!"); //comment out for testing - for (let index = 0; index < batches; index++) { - console.log("Airdropping batch:", index); - let gotchiBatch = raankingNumbersArray.slice( - index * perBatch, - (index + 1) * perBatch - ); - - let plaayerAirdrop = await airdropTaskForBaadges( - [itemTypes[9]], - gotchiBatch - ); - - await run("airdropBaadges", plaayerAirdrop); - console.log("Complete Airdropping batch:", index); - } + // for (let index = 0; index < batches; index++) { + // console.log("Airdropping batch:", index); + // let gotchiBatch = raankingNumbersArray.slice( + // index * perBatch, + // (index + 1) * perBatch + // ); + + // let plaayerAirdrop = await airdropTaskForBaadges( + // [itemTypes[9]], + // gotchiBatch + // ); + + // await run("airdropBaadges", plaayerAirdrop); + // console.log("Complete Airdropping batch:", index); + // } } if (require.main === module) { diff --git a/scripts/svgHelperFunctions.ts b/scripts/svgHelperFunctions.ts index 1854212ee..0b017c904 100644 --- a/scripts/svgHelperFunctions.ts +++ b/scripts/svgHelperFunctions.ts @@ -616,7 +616,7 @@ export async function mintSvgTaskForBaadges(fileName: string) { itemManager: itemManagerAlt, itemFile: fileName, uploadItemTypes: true, - sendToItemManager: true, + sendToRelayer: true, }; return taskArgs; diff --git a/tasks/baadgeAirdrop.ts b/tasks/baadgeAirdrop.ts index a72a0a740..bdfa78d20 100644 --- a/tasks/baadgeAirdrop.ts +++ b/tasks/baadgeAirdrop.ts @@ -7,6 +7,7 @@ import { itemManagerAlt, gasPrice, getRelayerSigner, + xpRelayerAddress, } from "../scripts/helperFunctions"; import { ItemsTransferFacet } from "../typechain"; @@ -67,7 +68,7 @@ task( )) as ItemsTransferFacet; const tx = await itemsTransferFacet.batchBatchTransferToParent( - itemManagerAlt, + xpRelayerAddress, maticDiamondAddress, tokenIds, batchIds, diff --git a/tasks/mintBaadgeSvgs.ts b/tasks/mintBaadgeSvgs.ts index 6e784f45a..a26b75b75 100644 --- a/tasks/mintBaadgeSvgs.ts +++ b/tasks/mintBaadgeSvgs.ts @@ -6,6 +6,7 @@ import { getRelayerSigner, itemManagerAlt, maticDiamondAddress, + xpRelayerAddress, } from "../scripts/helperFunctions"; import { DAOFacet } from "../typechain/DAOFacet"; import { BigNumberish } from "@ethersproject/bignumber"; @@ -16,14 +17,14 @@ export interface MintBaadgeTaskArgs { itemManager: string; itemFile: string; uploadItemTypes: boolean; - sendToItemManager: boolean; + sendToRelayer: boolean; } task("mintBaadgeSvgs", "Adds itemTypes and SVGs") .addParam("itemManager", "Address of the item manager", "0") .addParam("itemFile", "File name of the items to add") .addFlag("uploadItemTypes", "Upload itemTypes") - .addFlag("sendToItemManager", "Mint and send the items to itemManager") + .addFlag("sendToRelayer", "Mint and send the items to itemManager") .setAction( async (taskArgs: MintBaadgeTaskArgs, hre: HardhatRuntimeEnvironment) => { @@ -34,8 +35,8 @@ task("mintBaadgeSvgs", "Adds itemTypes and SVGs") } const itemFile: string = taskArgs.itemFile; - const itemManager = taskArgs.itemManager; - const sendToItemManager = taskArgs.sendToItemManager; + + const sendToRelayer = taskArgs.sendToRelayer; const uploadItemTypes = taskArgs.uploadItemTypes; const { @@ -72,7 +73,7 @@ task("mintBaadgeSvgs", "Adds itemTypes and SVGs") console.log("Items were added:", tx.hash); } - if (sendToItemManager) { + if (sendToRelayer) { const itemIds: BigNumberish[] = []; const quantities: BigNumberish[] = []; currentItemTypes.forEach((itemType: ItemTypeOutput) => { @@ -82,9 +83,9 @@ task("mintBaadgeSvgs", "Adds itemTypes and SVGs") console.log("final quantities:", itemIds, quantities); - console.log(`Mint prize items to Item Manager ${itemManager}`); + console.log(`Mint prize items to Defender Relayer ${xpRelayerAddress}`); - tx = await daoFacet.mintItems(itemManager, itemIds, quantities, { + tx = await daoFacet.mintItems(xpRelayerAddress, itemIds, quantities, { gasPrice: gasPrice, }); receipt = await tx.wait(); diff --git a/test/szn5BaadgeAirdropTest.ts b/test/szn5BaadgeAirdropTest.ts index 0d0f12e9d..691a83f61 100644 --- a/test/szn5BaadgeAirdropTest.ts +++ b/test/szn5BaadgeAirdropTest.ts @@ -11,7 +11,7 @@ import { dataArgs as dataArgs3 } from "../data/airdrops/rarityfarming/szn5/rnd3" import { dataArgs as dataArgs4 } from "../data/airdrops/rarityfarming/szn5/rnd4"; import { getRfSznTypeRanking } from "../scripts/helperFunctions"; - +import { main } from "../scripts/airdrops/rfSzn5BdgsAirdrop"; describe("Airdrop SZN5 Baadges", async function () { this.timeout(200000000); @@ -55,7 +55,7 @@ describe("Airdrop SZN5 Baadges", async function () { xpRFSzn5 = await getRfSznTypeRanking(xpArray, "xp"); - // await main(); + await main(); }); it.only("Should airdrop szn5 champion baadges", async function () { From 52ac292692ed702bc10f474045ba5bd179a6dbe4 Mon Sep 17 00:00:00 2001 From: Timidan Date: Tue, 2 Jan 2024 18:05:05 +0100 Subject: [PATCH 8/9] add rfSzn6 baadges --- scripts/addItemTypes/itemTypes/rfSzn6Bdgs.ts | 356 ++++++++++++++++++ scripts/airdrops/rfSzn6BdgsAirdrop.ts | 244 ++++++++++++ ...vegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP.svg | 1 + ...avegotchi-RF-SZN6-Baadge-TOP-10-RARITY.svg | 1 + .../Aavegotchi-RF-SZN6-Baadge-TOP-10-XP.svg | 1 + ...egotchi-RF-SZN6-Baadge-TOP-100-KINSHIP.svg | 1 + ...vegotchi-RF-SZN6-Baadge-TOP-100-RARITY.svg | 1 + .../Aavegotchi-RF-SZN6-Baadge-TOP-100-XP.svg | 1 + ...chi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER.svg | 1 + ...otchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP.svg | 1 + ...otchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP.svg | 1 + ...otchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP.svg | 1 + ...gotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY.svg | 1 + ...Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP.svg | 1 + svgs/wearables-sides.ts | 51 +++ svgs/wearables.ts | 17 + test/szn6BaadgeAirdropTest.ts | 202 ++++++++++ 21 files changed, 886 insertions(+) create mode 100644 scripts/addItemTypes/itemTypes/rfSzn6Bdgs.ts create mode 100644 scripts/airdrops/rfSzn6BdgsAirdrop.ts create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-RARITY.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-XP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-KINSHIP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-RARITY.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-XP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY.svg create mode 100644 svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP.svg create mode 100644 test/szn6BaadgeAirdropTest.ts diff --git a/scripts/addItemTypes/itemTypes/rfSzn6Bdgs.ts b/scripts/addItemTypes/itemTypes/rfSzn6Bdgs.ts new file mode 100644 index 000000000..e8b84886d --- /dev/null +++ b/scripts/addItemTypes/itemTypes/rfSzn6Bdgs.ts @@ -0,0 +1,356 @@ +import { ItemTypeInputNew } from "../../itemTypeHelpers"; + +export const itemTypes: ItemTypeInputNew[] = [ + { + name: "CHAAMPION of Rarity Farming SZN6 (Rarity)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of RARITY for Rarity Farming SZN 6. FANTASTIC! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 404, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "CHAAMPION of Rarity Farming SZN6 (Kinship)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of KINSHIP for Rarity Farming SZN 6. FANTASTIC! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 405, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "CHAAMPION of Rarity Farming SZN6 (XP)", + description: + "Scored across all four rounds, this Aavegotchi is the ultimate chaampion of XP for Rarity Farming SZN 6. FANTASTIC! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 406, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 RARITY 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all RARITY for Rarity Farming SZN 6. Incredible! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 407, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 KINSHIP 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all KINSHIP for Rarity Farming SZN 6. Incredible! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 408, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 XP 2nd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 2nd highest ranked of all XP for Rarity Farming SZN 6. Incredible! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 5k to 7500 winning gotchis each round!", + svgId: 409, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 RARITY 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all RARITY for Rarity Farming SZN 6. Impressive! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 410, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 KINSHIP 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all KINSHIP for Rarity Farming SZN 6. Impressive! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 411, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 XP 3rd Place", + description: + "Scored across all four rounds, this Aavegotchi is the 3rd highest ranked of all XP for Rarity Farming SZN 6. Impressive! From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 412, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "godlike", + maxQuantity: 1, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 Raanked", + description: + "This Aavegotchi achieved leaderboard ranking in at least one category during the fifth season of Rarity Farming. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 413, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "common", + maxQuantity: 12809, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 RARITY Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of RARITY for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 414, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 KINSHIP Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of KINSHIP for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 415, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 XP Top 10", + description: + "This Aavegotchi achieved a rank in the top 10 of XP for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 416, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "mythical", + maxQuantity: 7, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 RARITY Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of RARITY for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 417, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 KINSHIP Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of KINSHIP for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 418, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, + { + name: "Rarity Farming SZN6 XP Top 100", + description: + "This Aavegotchi achieved a rank in the top 100 of XP for Rarity Farming SZN 6. From June 21st to August 10th, 2023, the fifth season of Rarity Farming distributed 1.5 million GHST over 8 weeks. Each of the 3 leaderboards has 7500 winning gotchis each round!", + svgId: 419, + minLevel: 0, + canBeTransferred: false, + rarityLevel: "legendary", + maxQuantity: 90, + totalQuantity: 0, + setId: [], + author: "xibot", + dimensions: { x: 0, y: 0, width: 0, height: 0 }, + allowedCollaterals: [], + ghstPrice: 0, + traitModifiers: [0, 0, 0, 0, 0, 0], + slotPositions: "none", + category: 1, + experienceBonus: 0, + kinshipBonus: 0, + canPurchaseWithGhst: false, + }, +]; diff --git a/scripts/airdrops/rfSzn6BdgsAirdrop.ts b/scripts/airdrops/rfSzn6BdgsAirdrop.ts new file mode 100644 index 000000000..95f88a84e --- /dev/null +++ b/scripts/airdrops/rfSzn6BdgsAirdrop.ts @@ -0,0 +1,244 @@ +import { run } from "hardhat"; +import { itemTypes } from "../../scripts/addItemTypes/itemTypes/rfSzn6Bdgs"; +import { + updateBaadgeTaskForSvgType, + mintSvgTaskForBaadges, + airdropTaskForBaadges, +} from "../../scripts/svgHelperFunctions"; + +import { + getRfSznTypeRanking, + getPlaayersIds, + hasDuplicateGotchiIds, +} from "../../scripts/helperFunctions"; + +import { dataArgs as dataArgs1 } from "../../data/airdrops/rarityfarming/szn6/rnd1"; +import { dataArgs as dataArgs2 } from "../../data/airdrops/rarityfarming/szn6/rnd2"; +import { dataArgs as dataArgs3 } from "../../data/airdrops/rarityfarming/szn6/rnd3"; +import { dataArgs as dataArgs4 } from "../../data/airdrops/rarityfarming/szn6/rnd4"; + +export async function main() { + const baadges: string[] = [ + "Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY", //404 + "Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP", //405 + "Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP", //406 + "Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY", //407 + "Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP", //408 + "Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP", //409 + "Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY", //410 + "Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP", //411 + "Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP", //412 + + "Aavegotchi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER", //413 + "Aavegotchi-RF-SZN6-Baadge-TOP-10-RARITY", //414 + "Aavegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP", //415 + "Aavegotchi-RF-SZN6-Baadge-TOP-10-XP", //416 + "Aavegotchi-RF-SZN6-Baadge-TOP-100-RARITY", //417 + "Aavegotchi-RF-SZN6-Baadge-TOP-100-KINSHIP", //418 + "Aavegotchi-RF-SZN6-Baadge-TOP-100-XP", //419 + ]; + + //Upload SVGs + let ids: number[] = []; + for (let i = 404; i <= 419; i++) { + ids.push(i); + } + let upload = await updateBaadgeTaskForSvgType(baadges, "sZN6Baadges", ids); + + await run("updateSvgs", upload); + + //Mint baadge item types + let mint = await mintSvgTaskForBaadges("rfSzn6Bdgs"); + + console.log("mint:", mint); + await run("", mint); + + //Airdrop + const rarityArray = [ + dataArgs1.rarityGotchis, + dataArgs2.rarityGotchis, + dataArgs3.rarityGotchis, + dataArgs4.rarityGotchis, + ]; + const kinshipArray = [ + dataArgs1.kinshipGotchis, + dataArgs2.kinshipGotchis, + dataArgs3.kinshipGotchis, + dataArgs4.kinshipGotchis, + ]; + const xpArray = [ + dataArgs1.xpGotchis, + dataArgs2.xpGotchis, + dataArgs3.xpGotchis, + dataArgs4.xpGotchis, + ]; + + const rarityRFSzn6 = await getRfSznTypeRanking(rarityArray, "rarity"); + console.log("Rarity: ", rarityRFSzn6); + const top10rarity = rarityRFSzn6.slice(3, 10); + console.log("Top 10 Rarity", top10rarity); + const top100rarity = rarityRFSzn6.slice(10, 100); + console.log("Top 100 Rarity", top100rarity); + console.log("Top 100 Rarity Array Length", top100rarity.length); + + const kinshipRFSzn6 = await getRfSznTypeRanking(kinshipArray, "kinship"); + console.log("Kinship: ", kinshipRFSzn6); + const top10kinship = kinshipRFSzn6.slice(3, 10); + console.log("Top 10 Kinship", top10kinship); + const top100kinship = kinshipRFSzn6.slice(10, 100); + console.log("Top 100 Kinship", top100kinship); + + const xpRFSzn6 = await getRfSznTypeRanking(xpArray, "xp"); + console.log("XP: ", xpRFSzn6); + const top10xp = xpRFSzn6.slice(3, 10); + console.log("Top 10 XP", top10xp); + const top100xp = xpRFSzn6.slice(10, 100); + console.log("Top 100 XP", top100xp); + console.log("Top 10 XP Array Length", top10xp.length); + console.log("Top 100 XP Array Length", top100xp.length); + + const rarityPlaayers = await getPlaayersIds(rarityArray); + const kinshipPlaayers = await getPlaayersIds(kinshipArray); + const xpPlaayers = await getPlaayersIds(xpArray); + + const plaayers = [rarityPlaayers, kinshipPlaayers, xpPlaayers]; + const totalPlaayers = await getPlaayersIds(plaayers); + console.log("Total amount of players: ", totalPlaayers.length); + console.log("Max Rank Baadge amount: ", itemTypes[9].maxQuantity); + + console.log( + "Does totalPlaayers Array Have Duplicates: ", + await hasDuplicateGotchiIds(totalPlaayers) + ); + + console.log(itemTypes[0].name); + console.log("Rarity Chaamp: ", rarityRFSzn6[0]); + const rarityChaampion = await airdropTaskForBaadges( + [itemTypes[0]], + [rarityRFSzn6[0]] + ); + await run("airdropBaadges", rarityChaampion); + + console.log(itemTypes[1].name); + const kinshipChaampion = await airdropTaskForBaadges( + [itemTypes[1]], + [kinshipRFSzn6[0]] + ); + await run("airdropBaadges", kinshipChaampion); + + console.log(itemTypes[2].name); + console.log("XP Chaampion: ", xpRFSzn6[0]); + const xpChaampion = await airdropTaskForBaadges( + [itemTypes[2]], + [xpRFSzn6[0]] + ); + await run("airdropBaadges", xpChaampion); + + console.log(itemTypes[3].name); + const rarity2nd = await airdropTaskForBaadges( + [itemTypes[3]], + [rarityRFSzn6[1]] + ); + await run("airdropBaadges", rarity2nd); + + console.log(itemTypes[4].name); + const kinship2nd = await airdropTaskForBaadges( + [itemTypes[4]], + [kinshipRFSzn6[1]] + ); + await run("airdropBaadges", kinship2nd); + + console.log(itemTypes[5].name); + const xp2nd = await airdropTaskForBaadges([itemTypes[5]], [xpRFSzn6[1]]); + await run("airdropBaadges", xp2nd); + + console.log(itemTypes[6].name); + const rarity3rd = await airdropTaskForBaadges( + [itemTypes[6]], + [rarityRFSzn6[2]] + ); + await run("airdropBaadges", rarity3rd); + + console.log(itemTypes[7].name); + const kinship3rd = await airdropTaskForBaadges( + [itemTypes[7]], + [kinshipRFSzn6[2]] + ); + await run("airdropBaadges", kinship3rd); + + console.log(itemTypes[8].name); + const xp3rd = await airdropTaskForBaadges([itemTypes[8]], [xpRFSzn6[2]]); + await run("airdropBaadges", xp3rd); + + console.log(itemTypes[10].name); + const rarityTop10 = await airdropTaskForBaadges([itemTypes[10]], top10rarity); + await run("airdropBaadges", rarityTop10); + + console.log(itemTypes[11].name); + const kinshipTop10 = await airdropTaskForBaadges( + [itemTypes[11]], + top10kinship + ); + await run("airdropBaadges", kinshipTop10); + + console.log(itemTypes[12].name); + const xpTop10 = await airdropTaskForBaadges([itemTypes[12]], top10xp); + await run("airdropBaadges", xpTop10); + + console.log(itemTypes[13].name); + const rarityTop100 = await airdropTaskForBaadges( + [itemTypes[13]], + top100rarity + ); + await run("airdropBaadges", rarityTop100); + + console.log(itemTypes[14].name); + const kinshipTop100 = await airdropTaskForBaadges( + [itemTypes[14]], + top100kinship + ); + await run("airdropBaadges", kinshipTop100); + + console.log(itemTypes[15].name); + const xpTop100 = await airdropTaskForBaadges([itemTypes[15]], top100xp); + await run("airdropBaadges", xpTop100); + + console.log(itemTypes[9].name); + + const raankingNumbersArray: number[] = []; + for (let x = 0; x < totalPlaayers.length; x++) { + raankingNumbersArray.push(Number(totalPlaayers[x])); + } + + const perBatch = 200; + const batches = Math.ceil(raankingNumbersArray.length / perBatch); + + console.log("Begin airdrops!"); + + //comment out for testing + // for (let index = 0; index < batches; index++) { + // console.log("Airdropping batch:", index); + // let gotchiBatch = raankingNumbersArray.slice( + // index * perBatch, + // (index + 1) * perBatch + // ); + + // let plaayerAirdrop = await airdropTaskForBaadges( + // [itemTypes[9]], + // gotchiBatch + // ); + + // await run("airdropBaadges", plaayerAirdrop); + // console.log("Complete Airdropping batch:", index); + // } +} + +if (require.main === module) { + main() + .then(() => process.exit(0)) + // .then(() => console.log('upgrade completed') /* process.exit(0) */) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP.svg new file mode 100644 index 000000000..6762e2ce0 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-RARITY.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-RARITY.svg new file mode 100644 index 000000000..401430f92 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-XP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-XP.svg new file mode 100644 index 000000000..fb15d2708 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-10-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-KINSHIP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-KINSHIP.svg new file mode 100644 index 000000000..087848ac2 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-RARITY.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-RARITY.svg new file mode 100644 index 000000000..985ce959c --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-XP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-XP.svg new file mode 100644 index 000000000..335729d36 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-100-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER.svg new file mode 100644 index 000000000..6ac79553a --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Baadge-TOP-RAANKED-PLAAYER.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP.svg new file mode 100644 index 000000000..95db458e2 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY.svg new file mode 100644 index 000000000..370b8b367 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP.svg new file mode 100644 index 000000000..bbb83b9c2 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-1ST-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP.svg new file mode 100644 index 000000000..0a9c94c85 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY.svg new file mode 100644 index 000000000..de34653cf --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP.svg new file mode 100644 index 000000000..fa7335685 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-2ND-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP.svg new file mode 100644 index 000000000..68bc624e6 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-KINSHIP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY.svg new file mode 100644 index 000000000..47e1db345 --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-RARITY.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP.svg b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP.svg new file mode 100644 index 000000000..50ca8cbdf --- /dev/null +++ b/svgs/sZN6Baadges/Aavegotchi-RF-SZN6-Trophy-3RD-PLACE-XP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/wearables-sides.ts b/svgs/wearables-sides.ts index 45d923413..ae401564d 100644 --- a/svgs/wearables-sides.ts +++ b/svgs/wearables-sides.ts @@ -413,6 +413,23 @@ export const wearablesRightSvgs = [ 401, 402, 403, + //szn 6 badges + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, ]; export const wearablesBackSvgs = [ @@ -826,6 +843,23 @@ export const wearablesBackSvgs = [ 401, 402, 403, + //szn 6 badges + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, ]; export const wearablesLeftSvgs = [ @@ -1239,6 +1273,23 @@ export const wearablesLeftSvgs = [ 401, 402, 403, + //szn 6 badges + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, ]; export const wearablesLeftSleeveSvgs = [ diff --git a/svgs/wearables.ts b/svgs/wearables.ts index a699fd977..b025735a7 100644 --- a/svgs/wearables.ts +++ b/svgs/wearables.ts @@ -412,6 +412,23 @@ export const wearablesSvgs = [ 401, 402, 403, + //szn 6 badges + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, ]; export const sleeveSvgs = [ diff --git a/test/szn6BaadgeAirdropTest.ts b/test/szn6BaadgeAirdropTest.ts new file mode 100644 index 000000000..dad862f34 --- /dev/null +++ b/test/szn6BaadgeAirdropTest.ts @@ -0,0 +1,202 @@ +import { ethers } from "hardhat"; +import { maticDiamondAddress } from "../scripts/helperFunctions"; +import { AavegotchiFacet } from "../typechain"; +import { Signer } from "@ethersproject/abstract-signer"; +import { expect } from "chai"; + +import { itemTypes } from "../scripts/addItemTypes/itemTypes/rfSzn6Bdgs"; +import { dataArgs as dataArgs1 } from "../data/airdrops/rarityfarming/szn6/rnd1"; +import { dataArgs as dataArgs2 } from "../data/airdrops/rarityfarming/szn6/rnd2"; +import { dataArgs as dataArgs3 } from "../data/airdrops/rarityfarming/szn6/rnd3"; +import { dataArgs as dataArgs4 } from "../data/airdrops/rarityfarming/szn6/rnd4"; + +import { getRfSznTypeRanking } from "../scripts/helperFunctions"; +import { main } from "../scripts/airdrops/rfSzn6BdgsAirdrop"; +describe("Airdrop SZN6 Baadges", async function () { + this.timeout(200000000); + + let aavegotchiFacet: AavegotchiFacet, + signer: Signer, + rarityRFSzn5: number[], + kinshipRFSzn5: number[], + xpRFSzn5: number[]; + + before(async function () { + signer = await ethers.getSigner(maticDiamondAddress); + + const rarityArray = [ + dataArgs1.rarityGotchis, + dataArgs2.rarityGotchis, + dataArgs3.rarityGotchis, + dataArgs4.rarityGotchis, + ]; + const kinshipArray = [ + dataArgs1.kinshipGotchis, + dataArgs2.kinshipGotchis, + dataArgs3.kinshipGotchis, + dataArgs4.kinshipGotchis, + ]; + const xpArray = [ + dataArgs1.xpGotchis, + dataArgs2.xpGotchis, + dataArgs3.xpGotchis, + dataArgs4.xpGotchis, + ]; + + aavegotchiFacet = (await ethers.getContractAt( + "contracts/Aavegotchi/facets/AavegotchiFacet.sol:AavegotchiFacet", + maticDiamondAddress, + signer + )) as AavegotchiFacet; + + rarityRFSzn5 = await getRfSznTypeRanking(rarityArray, "rarity"); + + kinshipRFSzn5 = await getRfSznTypeRanking(kinshipArray, "kinship"); + + xpRFSzn5 = await getRfSznTypeRanking(xpArray, "xp"); + + await main(); + }); + + it.only("Should airdrop szn6 champion baadges", async function () { + //rarity champ + let rarityChamp = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[0]); + + let itemIds = getAavegotchiItemIds(rarityChamp); + + expect(exists(itemTypes[0].svgId.toString(), itemIds)).to.equal(true); + + //kinship champ + let kinshipChamp = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[0]); + itemIds = getAavegotchiItemIds(kinshipChamp); + + expect(exists(itemTypes[1].svgId.toString(), itemIds)).to.equal(true); + + //xp champ (tiebreaker) + let xpChamp = await aavegotchiFacet.getAavegotchi(xpRFSzn5[0]); + itemIds = getAavegotchiItemIds(xpChamp); + + expect(exists(itemTypes[2].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn6 2nd and 3rd place baadges", async function () { + //rarity 2nd + let rarity2nd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[1]); + let itemIds = getAavegotchiItemIds(rarity2nd); + + expect(exists(itemTypes[3].svgId.toString(), itemIds)).to.equal(true); + + //kinship 2nd + let kinship2nd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[1]); + itemIds = getAavegotchiItemIds(kinship2nd); + + expect(exists(itemTypes[4].svgId.toString(), itemIds)).to.equal(true); + + // //xp 2nd + let xp2nd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[1]); + itemIds = getAavegotchiItemIds(xp2nd); + + expect(exists(itemTypes[5].svgId.toString(), itemIds)).to.equal(true); + + //rarity 3rd + let rarity3rd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[2]); + itemIds = getAavegotchiItemIds(rarity3rd); + + expect(exists(itemTypes[6].svgId.toString(), itemIds)).to.equal(true); + + //kinship 3rd + let kinship3rd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[2]); + itemIds = getAavegotchiItemIds(kinship3rd); + + expect(exists(itemTypes[7].svgId.toString(), itemIds)).to.equal(true); + + //xp 3rd + let xp3rd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[2]); + itemIds = getAavegotchiItemIds(xp3rd); + + expect(exists(itemTypes[8].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn6 top10 baadges", async function () { + //rarity top 10 + let rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[3]); + let itemIds = getAavegotchiItemIds(rarityTop10); + + expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); + + rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[9]); + itemIds = getAavegotchiItemIds(rarityTop10); + + expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); + + //kinship top 10 + let kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[3]); + itemIds = getAavegotchiItemIds(kinshipTop10); + + expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); + + kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[9]); + itemIds = getAavegotchiItemIds(kinshipTop10); + + expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); + + //XP top 10 + let xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[3]); + itemIds = getAavegotchiItemIds(xpTop10); + + expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); + + xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[9]); + itemIds = getAavegotchiItemIds(xpTop10); + + expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); + }); + + it.only("Should airdrop szn6 top100 baadges", async function () { + //rarity top 100 + let rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[10]); + let itemIds = getAavegotchiItemIds(rarityTop100); + + expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); + + rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[99]); + itemIds = getAavegotchiItemIds(rarityTop100); + + expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); + + //kinship top 100 + let kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[10]); + itemIds = getAavegotchiItemIds(kinshipTop100); + + expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); + + kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[99]); + itemIds = getAavegotchiItemIds(kinshipTop100); + + expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); + + //XP top 100 + let xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[10]); + itemIds = getAavegotchiItemIds(xpTop100); + + expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true); + + xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[99]); + itemIds = getAavegotchiItemIds(xpTop100); + + expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true); + }); +}); + +function getAavegotchiItemIds(gotchi: any) { + let itemIds: string[] = []; + const allItems: any[] = gotchi.items; + allItems.forEach((item) => { + itemIds.push(item.itemId.toString()); + }); + return itemIds; +} + +function exists(itemId: string, itemIds: string[]) { + return itemIds.includes(itemId); +} From 239be8bb1fb5f32f14a46d93c088261b2199dfcb Mon Sep 17 00:00:00 2001 From: Timidan Date: Tue, 2 Jan 2024 21:42:19 +0100 Subject: [PATCH 9/9] update variable naming --- scripts/airdrops/rfSzn6BdgsAirdrop.ts | 2 +- test/szn6BaadgeAirdropTest.ts | 54 +++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/airdrops/rfSzn6BdgsAirdrop.ts b/scripts/airdrops/rfSzn6BdgsAirdrop.ts index 95f88a84e..62c39b8bc 100644 --- a/scripts/airdrops/rfSzn6BdgsAirdrop.ts +++ b/scripts/airdrops/rfSzn6BdgsAirdrop.ts @@ -51,7 +51,7 @@ export async function main() { let mint = await mintSvgTaskForBaadges("rfSzn6Bdgs"); console.log("mint:", mint); - await run("", mint); + await run("mintBaadgeSvgs", mint); //Airdrop const rarityArray = [ diff --git a/test/szn6BaadgeAirdropTest.ts b/test/szn6BaadgeAirdropTest.ts index dad862f34..cd0d50731 100644 --- a/test/szn6BaadgeAirdropTest.ts +++ b/test/szn6BaadgeAirdropTest.ts @@ -17,9 +17,9 @@ describe("Airdrop SZN6 Baadges", async function () { let aavegotchiFacet: AavegotchiFacet, signer: Signer, - rarityRFSzn5: number[], - kinshipRFSzn5: number[], - xpRFSzn5: number[]; + rarityRFSzn6: number[], + kinshipRFSzn6: number[], + xpRFSzn6: number[]; before(async function () { signer = await ethers.getSigner(maticDiamondAddress); @@ -49,31 +49,31 @@ describe("Airdrop SZN6 Baadges", async function () { signer )) as AavegotchiFacet; - rarityRFSzn5 = await getRfSznTypeRanking(rarityArray, "rarity"); + rarityRFSzn6 = await getRfSznTypeRanking(rarityArray, "rarity"); - kinshipRFSzn5 = await getRfSznTypeRanking(kinshipArray, "kinship"); + kinshipRFSzn6 = await getRfSznTypeRanking(kinshipArray, "kinship"); - xpRFSzn5 = await getRfSznTypeRanking(xpArray, "xp"); + xpRFSzn6 = await getRfSznTypeRanking(xpArray, "xp"); await main(); }); it.only("Should airdrop szn6 champion baadges", async function () { //rarity champ - let rarityChamp = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[0]); + let rarityChamp = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[0]); let itemIds = getAavegotchiItemIds(rarityChamp); expect(exists(itemTypes[0].svgId.toString(), itemIds)).to.equal(true); //kinship champ - let kinshipChamp = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[0]); + let kinshipChamp = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[0]); itemIds = getAavegotchiItemIds(kinshipChamp); expect(exists(itemTypes[1].svgId.toString(), itemIds)).to.equal(true); //xp champ (tiebreaker) - let xpChamp = await aavegotchiFacet.getAavegotchi(xpRFSzn5[0]); + let xpChamp = await aavegotchiFacet.getAavegotchi(xpRFSzn6[0]); itemIds = getAavegotchiItemIds(xpChamp); expect(exists(itemTypes[2].svgId.toString(), itemIds)).to.equal(true); @@ -81,37 +81,37 @@ describe("Airdrop SZN6 Baadges", async function () { it.only("Should airdrop szn6 2nd and 3rd place baadges", async function () { //rarity 2nd - let rarity2nd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[1]); + let rarity2nd = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[1]); let itemIds = getAavegotchiItemIds(rarity2nd); expect(exists(itemTypes[3].svgId.toString(), itemIds)).to.equal(true); //kinship 2nd - let kinship2nd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[1]); + let kinship2nd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[1]); itemIds = getAavegotchiItemIds(kinship2nd); expect(exists(itemTypes[4].svgId.toString(), itemIds)).to.equal(true); // //xp 2nd - let xp2nd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[1]); + let xp2nd = await aavegotchiFacet.getAavegotchi(xpRFSzn6[1]); itemIds = getAavegotchiItemIds(xp2nd); expect(exists(itemTypes[5].svgId.toString(), itemIds)).to.equal(true); //rarity 3rd - let rarity3rd = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[2]); + let rarity3rd = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[2]); itemIds = getAavegotchiItemIds(rarity3rd); expect(exists(itemTypes[6].svgId.toString(), itemIds)).to.equal(true); //kinship 3rd - let kinship3rd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[2]); + let kinship3rd = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[2]); itemIds = getAavegotchiItemIds(kinship3rd); expect(exists(itemTypes[7].svgId.toString(), itemIds)).to.equal(true); //xp 3rd - let xp3rd = await aavegotchiFacet.getAavegotchi(xpRFSzn5[2]); + let xp3rd = await aavegotchiFacet.getAavegotchi(xpRFSzn6[2]); itemIds = getAavegotchiItemIds(xp3rd); expect(exists(itemTypes[8].svgId.toString(), itemIds)).to.equal(true); @@ -119,34 +119,34 @@ describe("Airdrop SZN6 Baadges", async function () { it.only("Should airdrop szn6 top10 baadges", async function () { //rarity top 10 - let rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[3]); + let rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[3]); let itemIds = getAavegotchiItemIds(rarityTop10); expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); - rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[9]); + rarityTop10 = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[9]); itemIds = getAavegotchiItemIds(rarityTop10); expect(exists(itemTypes[10].svgId.toString(), itemIds)).to.equal(true); //kinship top 10 - let kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[3]); + let kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[3]); itemIds = getAavegotchiItemIds(kinshipTop10); expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); - kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[9]); + kinshipTop10 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[9]); itemIds = getAavegotchiItemIds(kinshipTop10); expect(exists(itemTypes[11].svgId.toString(), itemIds)).to.equal(true); //XP top 10 - let xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[3]); + let xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn6[3]); itemIds = getAavegotchiItemIds(xpTop10); expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); - xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[9]); + xpTop10 = await aavegotchiFacet.getAavegotchi(xpRFSzn6[9]); itemIds = getAavegotchiItemIds(xpTop10); expect(exists(itemTypes[12].svgId.toString(), itemIds)).to.equal(true); @@ -154,34 +154,34 @@ describe("Airdrop SZN6 Baadges", async function () { it.only("Should airdrop szn6 top100 baadges", async function () { //rarity top 100 - let rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[10]); + let rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[10]); let itemIds = getAavegotchiItemIds(rarityTop100); expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); - rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn5[99]); + rarityTop100 = await aavegotchiFacet.getAavegotchi(rarityRFSzn6[99]); itemIds = getAavegotchiItemIds(rarityTop100); expect(exists(itemTypes[13].svgId.toString(), itemIds)).to.equal(true); //kinship top 100 - let kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[10]); + let kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[10]); itemIds = getAavegotchiItemIds(kinshipTop100); expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); - kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn5[99]); + kinshipTop100 = await aavegotchiFacet.getAavegotchi(kinshipRFSzn6[99]); itemIds = getAavegotchiItemIds(kinshipTop100); expect(exists(itemTypes[14].svgId.toString(), itemIds)).to.equal(true); //XP top 100 - let xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[10]); + let xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn6[10]); itemIds = getAavegotchiItemIds(xpTop100); expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true); - xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn5[99]); + xpTop100 = await aavegotchiFacet.getAavegotchi(xpRFSzn6[99]); itemIds = getAavegotchiItemIds(xpTop100); expect(exists(itemTypes[15].svgId.toString(), itemIds)).to.equal(true);