Smart Contract

AloneInfinity

A.af8520ac4018c7c3.AloneInfinity

Deployed

2h ago
Feb 28, 2026, 06:42:16 PM UTC

Dependents

0 imports
1import NonFungibleToken from 0x1d7e57aa55817448
2import FlowtyDrops from 0xbefbaccb5032a457
3import BaseNFT from 0xbefbaccb5032a457
4import NFTMetadata from 0xbefbaccb5032a457
5import UniversalCollection from 0xbefbaccb5032a457
6import ContractBorrower from 0xbefbaccb5032a457
7import BaseCollection from 0xbefbaccb5032a457
8import ViewResolver from 0x1d7e57aa55817448
9
10
11access(all) contract AloneInfinity: BaseCollection, ViewResolver {
12    access(all) var MetadataCap: Capability<&NFTMetadata.Container>
13    access(all) var totalSupply: UInt64
14
15
16    access(all) resource NFT: BaseNFT.NFT {
17        access(all) let id: UInt64
18        access(all) let metadataID: UInt64
19
20
21        init() {
22            AloneInfinity.totalSupply = AloneInfinity.totalSupply + 1
23            self.id = AloneInfinity.totalSupply
24            self.metadataID = 0
25        }
26    }
27    access(all) resource NFTMinter: FlowtyDrops.Minter {
28        access(contract) fun createNextNFT(): @{NonFungibleToken.NFT} {
29            return <- create NFT()
30        }
31    }
32
33    access(all) fun createEmptyCollection(nftType: Type): @{NonFungibleToken.Collection} {
34        return <- UniversalCollection.createCollection(nftType: Type<@NFT>())
35    }
36
37    init(params: {String: AnyStruct}, initializeIdentifier: String) {
38        self.totalSupply = 0
39        let minter <- create NFTMinter()
40        self.account.storage.save(<-minter, to: FlowtyDrops.getMinterStoragePath(type: self.getType()))
41        params["minterController"] = self.account.capabilities.storage.issue<&{FlowtyDrops.Minter}>(FlowtyDrops.getMinterStoragePath(type: self.getType()))
42        params["type"] = Type<@NFT>()
43
44
45        self.MetadataCap = ContractBorrower.borrowInitializer(typeIdentifier: initializeIdentifier).initialize(contractAcct: self.account, params: params).pubCap
46    }
47}
48