From 97266900c064c0574ebc616091600de56325187c Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Mon, 23 Sep 2024 20:26:55 -0700 Subject: [PATCH] cycle testnet address --- contracts/DropTypes.cdc | 2 +- contracts/FlowtyDrops.cdc | 7 +++++++ flow.json | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/contracts/DropTypes.cdc b/contracts/DropTypes.cdc index 6807585..c2876f6 100644 --- a/contracts/DropTypes.cdc +++ b/contracts/DropTypes.cdc @@ -207,7 +207,7 @@ access(all) contract DropTypes { totalMinted: minter != nil ? dropDetails.minters[minter!] : nil, minter: minter, quantity: quantity, - paymentIdentifiers: paymentIdentifiers + paymentIdentifiers: paymentIdentifiers.length > 0 ? paymentIdentifiers : dropDetails.paymentTokenTypes.keys ) phaseSummaries.append(summary) } diff --git a/contracts/FlowtyDrops.cdc b/contracts/FlowtyDrops.cdc index 50ac372..e9afb8d 100644 --- a/contracts/FlowtyDrops.cdc +++ b/contracts/FlowtyDrops.cdc @@ -9,6 +9,9 @@ import "FungibleTokenRouter" // Multiple drops can be made for a single contract (like how TopShot has had lots of pack drops), // and can be split into phases to represent different behaviors over the course of a drop access(all) contract FlowtyDrops { + // The total number of nfts minted by this contract + access(all) var TotalMinted: UInt64 + access(all) let ContainerStoragePath: StoragePath access(all) let ContainerPublicPath: PublicPath @@ -151,6 +154,8 @@ access(all) contract FlowtyDrops { let mintedNFTs: @[{NonFungibleToken.NFT}] <- minter.mint(payment: <-withdrawn, amount: amount, phase: phase, data: data) assert(mintedNFTs.length == amount, message: "incorrect number of items returned") + FlowtyDrops.TotalMinted = FlowtyDrops.TotalMinted + UInt64(mintedNFTs.length) + // distribute to receiver let receiver = receiverCap.borrow() ?? panic("could not borrow receiver capability") self.details.addMinted(num: mintedNFTs.length, addr: receiverCap.address) @@ -489,5 +494,7 @@ access(all) contract FlowtyDrops { self.ContainerStoragePath = StoragePath(identifier: containerIdentifier)! self.ContainerPublicPath = PublicPath(identifier: containerIdentifier)! + + self.TotalMinted = 0 } } \ No newline at end of file diff --git a/flow.json b/flow.json index 000e344..6ee3c00 100644 --- a/flow.json +++ b/flow.json @@ -23,7 +23,7 @@ "key": "f2e846bd4c1fbf17839ae59e111c6b1c98579eda7a841412f102d6621ec671cb" }, "flowty-drops-testnet": { - "address": "0x155bce6ac93f3e00", + "address": "0x5d06d5357cdf8063", "key": { "type": "google-kms", "index": 0, @@ -33,7 +33,7 @@ } }, "droptypes-testnet": { - "address": "0x53ff16309e318ae2", + "address": "0xa8d83f18fd8ba80a", "key": { "type": "google-kms", "index": 0,