diff --git a/data/itemTypes/gotchigangwearables.ts b/data/itemTypes/gotchigangwearables.ts index a2c80a604..33405b3e3 100644 --- a/data/itemTypes/gotchigangwearables.ts +++ b/data/itemTypes/gotchigangwearables.ts @@ -263,7 +263,7 @@ export const itemTypes: ItemTypeInputNew[] = [ allowedCollaterals: [], minLevel: 1, ghstPrice: 0, - maxQuantity: 10, + maxQuantity: 50, traitModifiers: [0, 0, 0, -5, 0, 0], canPurchaseWithGhst: false, slotPositions: "face", @@ -284,7 +284,7 @@ export const itemTypes: ItemTypeInputNew[] = [ allowedCollaterals: [], minLevel: 1, ghstPrice: 0, - maxQuantity: 10, + maxQuantity: 50, traitModifiers: [2, 0, 0, -3, 0, 0], canPurchaseWithGhst: false, slotPositions: "pet", diff --git a/data/itemTypes/itemTypes.ts b/data/itemTypes/itemTypes.ts index 109b17646..b8f6579ca 100644 --- a/data/itemTypes/itemTypes.ts +++ b/data/itemTypes/itemTypes.ts @@ -7858,7 +7858,7 @@ export const itemTypes: ItemTypeInput[] = [ allowedCollaterals: [], minLevel: 1, ghstPrice: 0, - maxQuantity: 10, + maxQuantity: 50, traitModifiers: [0, 0, 0, -5, 0, 0], canPurchaseWithGhst: false, slotPositions: "face", @@ -7878,7 +7878,7 @@ export const itemTypes: ItemTypeInput[] = [ allowedCollaterals: [], minLevel: 1, ghstPrice: 0, - maxQuantity: 10, + maxQuantity: 50, traitModifiers: [2, 0, 0, -3, 0, 0], canPurchaseWithGhst: false, slotPositions: "pet", diff --git a/scripts/fixes/updateMaxQty.ts b/scripts/fixes/updateMaxQty.ts new file mode 100644 index 000000000..0d6141508 --- /dev/null +++ b/scripts/fixes/updateMaxQty.ts @@ -0,0 +1,58 @@ +import { ethers, network } from "hardhat"; +import { Signer } from "@ethersproject/abstract-signer"; + +import { + gasPrice, + itemManagerAlt, + maticDiamondAddress, +} from "../helperFunctions"; + +export async function main() { + const ids: number[] = [416, 417]; + const maxQty: number[] = [50, 50]; + + let signer: Signer; + + const testing = ["hardhat", "localhost"].includes(network.name); + + if (testing) { + await network.provider.request({ + method: "hardhat_impersonateAccount", + params: [itemManagerAlt], + }); + signer = await ethers.getSigner(itemManagerAlt); + } else if (network.name === "matic") { + const accounts = await ethers.getSigners(); + signer = accounts[0]; + + console.log("signer:", signer); + } else { + throw Error("Incorrect network selected"); + } + + const daoFacet = await ethers.getContractAt( + "DAOFacet", + maticDiamondAddress, + signer + ); + + //Update max quantity + let tx; + let receipt; + console.log("Update ItemTypeMaxQuantities"); + tx = await daoFacet.updateItemTypeMaxQuantity(ids, maxQty, { + gasPrice: gasPrice, + }); + receipt = await tx.wait(); + if (!receipt.status) { + throw Error(`Not Sent: ${tx.hash}`); + } + console.log("Updated ItemTypeMaxQuantities successfully"); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + });