Skip to content

Commit

Permalink
remove docs, INFT, and update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Mar 26, 2024
1 parent 5160258 commit 83d28b5
Show file tree
Hide file tree
Showing 41 changed files with 31 additions and 1,886 deletions.
16 changes: 11 additions & 5 deletions contracts/ExampleNFT.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ import "MetadataViews"

access(all) contract ExampleNFT: NonFungibleToken {

/// Standard Paths
access(all) let CollectionStoragePath: StoragePath
access(all) let CollectionPublicPath: PublicPath

/// Path where the minter should be stored
/// The standard paths for the collection are stored in the collection resource type
access(all) let MinterStoragePath: StoragePath

/// We choose the name NFT here, but this type can have any name now
/// because the interface does not require it to have a specific name any more
access(all) resource NFT: NonFungibleToken.NFT, ViewResolver.Resolver {
access(all) resource NFT: NonFungibleToken.NFT {

access(all) let id: UInt64

Expand Down Expand Up @@ -124,7 +128,7 @@ access(all) contract ExampleNFT: NonFungibleToken {
}
}

// Deprecatred: Only here for backward compatibility.
// Deprecated: Only here for backward compatibility.
access(all) resource interface ExampleNFTCollectionPublic {}

access(all) resource Collection: NonFungibleToken.Collection, ExampleNFTCollectionPublic {
Expand Down Expand Up @@ -229,8 +233,8 @@ access(all) contract ExampleNFT: NonFungibleToken {
switch viewType {
case Type<MetadataViews.NFTCollectionData>():
let collectionData = MetadataViews.NFTCollectionData(
storagePath: /storage/cadenceExampleNFTCollection,
publicPath: /public/cadenceExampleNFTCollection,
storagePath: self.CollectionStoragePath,
publicPath: self.CollectionPublicPath,
publicCollection: Type<&ExampleNFT.Collection>(),
publicLinkedType: Type<&ExampleNFT.Collection>(),
createEmptyCollectionFunction: (fun(): @{NonFungibleToken.Collection} {
Expand Down Expand Up @@ -297,7 +301,9 @@ access(all) contract ExampleNFT: NonFungibleToken {
init() {

// Set the named paths
self.MinterStoragePath = /storage/cadenceExampleNFTMinter
self.CollectionStoragePath = /storage/exampleNFTCollection
self.CollectionPublicPath = /public/exampleNFTCollection
self.MinterStoragePath = /storage/exampleNFTMinter

// Create a Collection resource and save it to storage
let collection <- create Collection()
Expand Down
3 changes: 0 additions & 3 deletions contracts/NonFungibleToken.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ access(all) contract interface NonFungibleToken: ViewResolver {
///
access(all) event Deposited(type: String, id: UInt64, uuid: UInt64, to: Address?, collectionUUID: UInt64)

/// Included for backwards-compatibility
access(all) resource interface INFT: NFT {}

/// Interface that the NFTs must conform to
///
access(all) resource interface NFT: ViewResolver.Resolver {
Expand Down
128 changes: 0 additions & 128 deletions docs/ExampleNFT/ExampleNFT.md

This file was deleted.

112 changes: 0 additions & 112 deletions docs/ExampleNFT/ExampleNFT_Collection.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/ExampleNFT/ExampleNFT_ExampleNFTCollectionPublic.md

This file was deleted.

Loading

0 comments on commit 83d28b5

Please sign in to comment.