Smart Contract

TheFabricantNFTStandard

A.7752ea736384322f.TheFabricantNFTStandard

Deployed

3h ago
Feb 28, 2026, 08:14:46 PM UTC

Dependents

0 imports
1import MetadataViews from 0x1d7e57aa55817448
2import TheFabricantMetadataViews from 0x7752ea736384322f
3import NonFungibleToken from 0x1d7e57aa55817448
4import FungibleToken from 0xf233dcee88fe0abe
5
6access(all) contract interface TheFabricantNFTStandard {
7
8    access(contract) var nftIdsToOwner: {UInt64: Address}
9
10    // -----------------------------------------------------------------------
11    // NFT Interface
12    // -----------------------------------------------------------------------
13    // Season
14    // Collection
15    // metadata
16    // standards
17    // We should have a set of scripts and txs that work for all nfts
18    // We want to be able to get the nftIdsToOwner
19    // Must be user mintable and admin mintable
20
21    // NOTE: The TFNFT interface describes the bare minimum that
22    // a TF NFT should implement to be considered as such. It specifies
23    // functions as opposed to properties to avoid being prescriptive.
24    access(all) resource interface TFNFT {
25        // NFT View
26        // Display
27        // Edition
28        // Serial
29        // Royalty
30        // Media
31        // License
32        // ExternalURL
33        // NFTCollectionData
34        // NFTCollectionDisplay
35        // Rarity
36        // Trait
37
38        // The id is likely to also be the edition number of the NFT in the collection
39        access(all) let id: UInt64  
40
41        // NOTE: name, description and collection are not included because they may be
42        // derived from the RevealableMetadata.
43
44        // NOTE: UUID is a property on all resources so a reserved keyword.
45        //access(all) let uuid: UInt64 //Display, Serial, 
46        
47        access(contract) let collectionId: String
48
49        // id and editionNumber might not be the same in the nft...
50        access(contract) let editionNumber: UInt64 //Edition
51        access(contract) let maxEditionNumber: UInt64?
52
53        access(contract) let originalRecipient: Address
54
55        access(contract) let license: MetadataViews.License? //License
56
57        // NFTs have a name prop and an edition number prop.
58        // the name prop is usually just the last node in the 
59        // collection name eg XXories Original.
60        // The edition number is the number the NFT is in the series.
61        // getFullName() returns the name + editionNumber
62        // eg XXories Original #4
63        access(all) fun getFullName(): String
64
65        access(all) fun getEditionName(): String
66        
67        access(all) fun getEditions(): MetadataViews.Editions
68
69        // NOTE: Refer to Revealable interface. Each campaign might have a 
70        // different number of images/videos for its nfts. Enforcing
71        // MetadataViews.Medias in the nft would make it un-Revealable,
72        // as .Medias is immutable. Thus, this function should be used
73        // to collect the media assets into a .Medias struct.
74        access(all) fun getMedias(): MetadataViews.Medias
75
76        // Helper function for TF use to get images
77        // {"mainImage": "imageURL", "imageTwo": "imageURL"}
78        access(all) fun getImages(): {String: String} 
79        access(all) fun getVideos(): {String: String}
80
81        // NOTE: This returns the traits that will be shown in marketplaces,
82        // on dApps etc. We don't have a traits property to afford
83        // flexibility to the implementation. The implementor might
84        // want to have a 'revealable' trait for example,
85        // and MetadataViews.Traits is immutable so not compatible.
86        access(all) fun getTraits(): MetadataViews.Traits? 
87
88        // NOTE: Same as above, rarity might be revealed.
89        access(all) fun getRarity(): MetadataViews.Rarity?
90
91        access(all) fun getExternalRoyalties(): MetadataViews.Royalties
92
93        access(all) fun getTFRoyalties(): TheFabricantMetadataViews.Royalties
94
95        access(all) fun getDisplay(): MetadataViews.Display
96
97        access(all) fun getCollectionData(): MetadataViews.NFTCollectionData
98
99        access(all) fun getCollectionDisplay(): MetadataViews.NFTCollectionDisplay
100
101        access(all) fun getNFTView(): MetadataViews.NFTView
102
103        access(all) fun getViews(): [Type]
104
105        access(all) fun resolveView(_ view: Type): AnyStruct?
106
107    }
108
109    access(all) resource interface TFRoyalties {
110        access(all) let royalties: MetadataViews.Royalties //Royalty
111        access(all) let royaltiesTFMarketplace: TheFabricantMetadataViews.Royalties
112    }
113
114    // Used to expose the public mint function so that users can mint
115    access(all) resource interface TFNFTPublicMinter {
116
117        access(all) fun getPublicMinterDetails(): {String: AnyStruct}
118    }
119}
120