Skip to content

Commit

Permalink
Cleanup redundant paths
Browse files Browse the repository at this point in the history
  • Loading branch information
SupunS committed Mar 28, 2024
1 parent c01c72c commit 64aa29e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions contracts/ExampleNFT.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,11 @@ access(all) contract ExampleNFT: NonFungibleToken {

// Create a Collection resource and save it to storage
let collection <- create Collection()

let identifier = "exampleNFTCollection"
let defaultStoragePath = StoragePath(identifier: identifier)!
let defaultPublicPath = PublicPath(identifier: identifier)!

self.account.storage.save(<-collection, to: defaultStoragePath)
self.account.storage.save(<-collection, to: self.CollectionStoragePath)

// create a public capability for the collection
let collectionCap = self.account.capabilities.storage.issue<&ExampleNFT.Collection>(defaultStoragePath)
self.account.capabilities.publish(collectionCap, at: defaultPublicPath)
let collectionCap = self.account.capabilities.storage.issue<&ExampleNFT.Collection>(self.CollectionStoragePath)
self.account.capabilities.publish(collectionCap, at: self.CollectionPublicPath)

// Create a Minter resource and save it to storage
let minter <- create NFTMinter()
Expand Down
Loading

0 comments on commit 64aa29e

Please sign in to comment.