Skip to content

Commit

Permalink
Lint tx
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 8, 2024
1 parent 7206d96 commit 3d564a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cadence/contracts/Recipe.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ access(all) contract Recipe {

let numInPlay = self.numberMintedPerPlay[playID]!
let newMoment: @TopShot.NFT <- create TopShot.NFT(
serialNumber: numInPlay + UInt32(1),
serialNumber: numInPlay + 1,
playID: playID,
setID: self.setID,
subeditionID: 0
)
self.numberMintedPerPlay[playID] = numInPlay + UInt32(1)
self.numberMintedPerPlay[playID] = numInPlay + 1
return <-newMoment
}
}
Expand All @@ -194,7 +194,7 @@ access(all) contract Recipe {
// Create a new Set
access(all) fun createSet(name: String): UInt32 {
var newSet <- create Set(name: name)
Recipe.nextSetID = Recipe.nextSetID + UInt32(1)
Recipe.nextSetID = Recipe.nextSetID + 1

let newID = newSet.setID
emit SetCreated(setID: newID, series: TopShot.currentSeries)
Expand Down
8 changes: 3 additions & 5 deletions cadence/transactions/create_set.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ transaction {

let admin: &TopShot.Admin

prepare(signer: auth(Storage, Capabilities) &Account) {

let adminCap = signer.capabilities.storage.borrow<&TopShot.Admin>(/storage/TopShotAdmin)
prepare(signer: auth(Storage) &Account) {
// Borrow the Admin resource from the specified storage path
self.admin = signer.storage.borrow<&TopShot.Admin>(from: /storage/TopShotAdmin)
?? panic("Cannot borrow admin resource")

self.admin = adminCap
}

execute {
Expand Down

0 comments on commit 3d564a5

Please sign in to comment.