Skip to content

Commit

Permalink
cycle testnet address
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkline committed Sep 24, 2024
1 parent 4efcd8e commit 9726690
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/DropTypes.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
7 changes: 7 additions & 0 deletions contracts/FlowtyDrops.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -489,5 +494,7 @@ access(all) contract FlowtyDrops {

self.ContainerStoragePath = StoragePath(identifier: containerIdentifier)!
self.ContainerPublicPath = PublicPath(identifier: containerIdentifier)!

self.TotalMinted = 0
}
}
4 changes: 2 additions & 2 deletions flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"key": "f2e846bd4c1fbf17839ae59e111c6b1c98579eda7a841412f102d6621ec671cb"
},
"flowty-drops-testnet": {
"address": "0x155bce6ac93f3e00",
"address": "0x5d06d5357cdf8063",
"key": {
"type": "google-kms",
"index": 0,
Expand All @@ -33,7 +33,7 @@
}
},
"droptypes-testnet": {
"address": "0x53ff16309e318ae2",
"address": "0xa8d83f18fd8ba80a",
"key": {
"type": "google-kms",
"index": 0,
Expand Down

0 comments on commit 9726690

Please sign in to comment.