diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index f78ef84..82f6783 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -19,9 +19,9 @@ jobs: with: go-version: 1.18 - name: Install Flow CLI - run: bash -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" + run: bash -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v1.21.0-cadence-v1.0.0-preview.27 - name: Run tests - run: sh ./test.sh + run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" test/*_tests.cdc - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: diff --git a/README.md b/README.md index 282a827..b82c004 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,11 @@ they can: ## Deployment Details -| Network | Address | -| ------- | ------------------------------------------------------------------------------------ | -| Testnet | [0x294e44e1ec6993c6](https://testnet.contractbrowser.com/account/0x294e44e1ec6993c6) | -| Mainnet | [0xd8a7e05a7ac670c0](https://contractbrowser.com/account/0xd8a7e05a7ac670c0) | +| Network | Address | +| ---------- | ------------------------------------------------------------------------------------ | +| Testnet | [0x294e44e1ec6993c6](https://testnet.contractbrowser.com/account/0x294e44e1ec6993c6) | +| Mainnet | [0xd8a7e05a7ac670c0](https://contractbrowser.com/account/0xd8a7e05a7ac670c0) | +| Previewnet | [0x28b81f5880d5554e](https://previewnet.flowdiver.io/account/28b81f5880d5554e) | ### Hosted `CapabilityFactory` & `CapabilityFilter` Implementations @@ -33,12 +34,12 @@ they can: > generalized implementations likely cover most use cases, but you'll want to weigh the decision to use them according > to your risk tolerance and specific scenario. -| Use Case | Testnet Address | Mainnet Address | -| -------- | ------------------------------------------------------------------------------------- | --------------------------------------- | -| NFT Capability Factories | [0x1055970ee34ef4dc](https://f.dnz.dev/0x1055970ee34ef4dc/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0xee9ff4f07a2d6dad](https://f.dnz.dev/0xee9ff4f07a2d6dad/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | -| FT Capability Factories | [0x08bed9e8508ed20e](https://f.dnz.dev/0x08bed9e8508ed20e/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0x410aa603925923d9](https://f.dnz.dev/0x410aa603925923d9/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | -| NFT + FT Capability Factories | [0x1b7fa5972fcb8af5](https://f.dnz.dev/0x1b7fa5972fcb8af5/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0x071d382668250606](https://f.dnz.dev/0x071d382668250606/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | -| AllowAllFilter | [0xe2664be06bb0fe62](https://f.dnz.dev/0xe2664be06bb0fe62/storage/CapabilityFilter_0x294e44e1ec6993c6) | [0x78e93a79b05d0d7d](https://f.dnz.dev/0x78e93a79b05d0d7d/storage/CapabilityFilter_0xd8a7e05a7ac670c0) | +| Use Case | Testnet Address | Mainnet Address | Previewnet Address | +| -------- | --------------- | --------------- | ------------------ | +| NFT Capability Factories | [0x1055970ee34ef4dc](https://f.dnz.dev/0x1055970ee34ef4dc/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0xee9ff4f07a2d6dad](https://f.dnz.dev/0xee9ff4f07a2d6dad/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | [0x80340a153332a5fc](https://f.dnz.dev/0x80340a153332a5fc/raw/storage/CapabilityFactory_0x28b81f5880d5554e) | +| FT Capability Factories | [0x08bed9e8508ed20e](https://f.dnz.dev/0x08bed9e8508ed20e/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0x410aa603925923d9](https://f.dnz.dev/0x410aa603925923d9/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | [0x7207d6fbbbccaf42](https://f.dnz.dev/0x7207d6fbbbccaf42/raw/storage/CapabilityFactory_0x28b81f5880d5554e) +| NFT + FT Capability Factories | [0x1b7fa5972fcb8af5](https://f.dnz.dev/0x1b7fa5972fcb8af5/storage/CapabilityFactory_0x294e44e1ec6993c6) | [0x071d382668250606](https://f.dnz.dev/0x071d382668250606/storage/CapabilityFactory_0xd8a7e05a7ac670c0) | [0x96606f26aa36af9d](https://f.dnz.dev/0x96606f26aa36af9d/raw/storage/CapabilityFactory_0x28b81f5880d5554e) | +| AllowAllFilter | [0xe2664be06bb0fe62](https://f.dnz.dev/0xe2664be06bb0fe62/storage/CapabilityFilter_0x294e44e1ec6993c6) | [0x78e93a79b05d0d7d](https://f.dnz.dev/0x78e93a79b05d0d7d/storage/CapabilityFilter_0xd8a7e05a7ac670c0) | [0x6453b3c822c8a523](https://f.dnz.dev/0x6453b3c822c8a523/raw/storage/CapabilityFilter_0x28b81f5880d5554e) | ## Development diff --git a/flow.json b/flow.json index 6f36e87..5a32a15 100644 --- a/flow.json +++ b/flow.json @@ -6,7 +6,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "CapabilityFactory": { @@ -15,7 +16,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "CapabilityFilter": { @@ -24,7 +26,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "ExampleNFT": { @@ -51,7 +54,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "FTVaultFactory": { @@ -60,7 +64,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "FTBalanceFactory": { @@ -69,7 +74,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "FTProviderFactory": { @@ -78,7 +84,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "FTReceiverBalanceFactory": { @@ -87,7 +94,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "FTReceiverFactory": { @@ -96,7 +104,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "HybridCustody": { @@ -105,7 +114,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "NFTCollectionPublicFactory": { @@ -114,7 +124,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "NFTProviderAndCollectionFactory": { @@ -123,7 +134,8 @@ "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0" + "mainnet": "d8a7e05a7ac670c0", + "previewnet": "28b81f5880d5554e" } }, "NFTProviderFactory": { @@ -131,7 +143,8 @@ "aliases": { "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6" + "testnet": "294e44e1ec6993c6", + "previewnet": "28b81f5880d5554e" } }, "NFTCollectionFactory": { @@ -139,87 +152,95 @@ "aliases": { "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6" + "testnet": "294e44e1ec6993c6", + "previewnet": "28b81f5880d5554e" } }, "FungibleToken": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/FungibleToken.cdc", "aliases": { - "emulator": "0xee82856bf20e2aa6", - "testnet": "0x9a0766d93b6608b7", - "mainnet": "0xf233dcee88fe0abe" + "emulator": "ee82856bf20e2aa6", + "testnet": "9a0766d93b6608b7", + "mainnet": "f233dcee88fe0abe", + "previewnet": "a0225e7000ac82a9" } }, "FungibleTokenMetadataViews": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/FungibleTokenMetadataViews.cdc", "aliases": { - "emulator": "0xee82856bf20e2aa6", - "testnet": "0x9a0766d93b6608b7", - "mainnet": "0xf233dcee88fe0abe" + "emulator": "ee82856bf20e2aa6", + "testnet": "9a0766d93b6608b7", + "mainnet": "f233dcee88fe0abe", + "previewnet": "a0225e7000ac82a9" } }, "Burner": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/Burner.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x9a0766d93b6608b7", - "mainnet": "0xf233dcee88fe0abe" + "emulator": "f8d6e0586b0a20c7", + "testnet": "9a0766d93b6608b7", + "mainnet": "f233dcee88fe0abe", + "previewnet": "b6763b4399a888c8" } }, "FlowToken": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/FlowToken.cdc", "aliases": { - "emulator": "0x0ae53cb6e3f42a79", - "testnet": "0x7e60df042a9c0868", - "mainnet": "0x1654653399040a61" + "emulator": "0ae53cb6e3f42a79", + "testnet": "7e60df042a9c0868", + "mainnet": "1654653399040a61", + "previewnet": "4445e7ad11568276" } }, "NonFungibleToken": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/NonFungibleToken.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x631e88ae7f1d7c20", - "mainnet": "0x1d7e57aa55817448" + "emulator": "f8d6e0586b0a20c7", + "testnet": "631e88ae7f1d7c20", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8" } }, "StringUtils": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/StringUtils.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x31ad40c07a2a9788", - "mainnet": "0xa340dc0a4ec828ab" + "emulator": "f8d6e0586b0a20c7", + "testnet": "31ad40c07a2a9788", + "mainnet": "a340dc0a4ec828ab" } }, "ArrayUtils": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/ArrayUtils.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x31ad40c07a2a9788", - "mainnet": "0xa340dc0a4ec828ab" + "emulator": "f8d6e0586b0a20c7", + "testnet": "31ad40c07a2a9788", + "mainnet": "a340dc0a4ec828ab" } }, "AddressUtils": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/AddressUtils.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x31ad40c07a2a9788", - "mainnet": "0xa340dc0a4ec828ab" + "emulator": "f8d6e0586b0a20c7", + "testnet": "31ad40c07a2a9788", + "mainnet": "a340dc0a4ec828ab" } }, "MetadataViews": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/MetadataViews.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x631e88ae7f1d7c20", - "mainnet": "0x1d7e57aa55817448" + "emulator": "f8d6e0586b0a20c7", + "testnet": "631e88ae7f1d7c20", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8" } }, "ViewResolver": { "source": "./node_modules/@flowtyio/flow-contracts/contracts/ViewResolver.cdc", "aliases": { - "emulator": "0xf8d6e0586b0a20c7", - "testnet": "0x631e88ae7f1d7c20", - "mainnet": "0x1d7e57aa55817448" + "emulator": "f8d6e0586b0a20c7", + "testnet": "631e88ae7f1d7c20", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8" } } }, @@ -227,6 +248,7 @@ "emulator": "127.0.0.1:3569", "testing": "127.0.0.1:3569", "mainnet": "access.mainnet.nodes.onflow.org:9000", + "previewnet": "access.previewnet.nodes.onflow.org:9000", "sandboxnet": "access.sandboxnet.nodes.onflow.org:9000", "testnet": "access.devnet.nodes.onflow.org:9000" }, @@ -240,7 +262,7 @@ } }, "allow-all-testnet": { - "address": "0xe2664be06bb0fe62", + "address": "e2664be06bb0fe62", "key": { "type": "google-kms", "hashAlgorithm": "SHA2_256", @@ -263,6 +285,41 @@ "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" } }, + "hc-previewnet": { + "address": "28b81f5880d5554e", + "key": { + "type": "file", + "location": "./hc-previewnet.pkey" + } + }, + "ft-manager-previewnet": { + "address": "7207d6fbbbccaf42", + "key": { + "type": "file", + "location": "./hc-previewnet.pkey" + } + }, + "nft-ft-manager-previewnet": { + "address": "96606f26aa36af9d", + "key": { + "type": "file", + "location": "./hc-previewnet.pkey" + } + }, + "nft-manager-previewnet": { + "address": "80340a153332a5fc", + "key": { + "type": "file", + "location": "./hc-previewnet.pkey" + } + }, + "allow-all-previewnet": { + "address": "6453b3c822c8a523", + "key": { + "type": "file", + "location": "./hc-previewnet.pkey" + } + }, "hc-testnet": { "address": "294e44e1ec6993c6", "key": { @@ -280,7 +337,7 @@ } }, "ft-manager-testnet": { - "address": "0x08bed9e8508ed20e", + "address": "08bed9e8508ed20e", "key": { "type": "google-kms", "hashAlgorithm": "SHA2_256", @@ -296,7 +353,7 @@ } }, "nft-ft-manager-testnet": { - "address": "0x1b7fa5972fcb8af5", + "address": "1b7fa5972fcb8af5", "key": { "type": "google-kms", "hashAlgorithm": "SHA2_256", @@ -312,7 +369,7 @@ } }, "nft-manager-testnet": { - "address": "0x1055970ee34ef4dc", + "address": "1055970ee34ef4dc", "key": { "type": "google-kms", "hashAlgorithm": "SHA2_256", @@ -395,6 +452,24 @@ "FTVaultFactory", "NFTCollectionFactory" ] + }, + "previewnet": { + "hc-previewnet": [ + "CapabilityDelegator", + "CapabilityFactory", + "CapabilityFilter", + "HybridCustody", + "NFTProviderFactory", + "NFTProviderAndCollectionFactory", + "NFTCollectionPublicFactory", + "FTProviderFactory", + "FTAllFactory", + "FTBalanceFactory", + "FTReceiverBalanceFactory", + "FTReceiverFactory", + "FTVaultFactory", + "NFTCollectionFactory" + ] } } } \ No newline at end of file diff --git a/test/CapabilityFactory_tests.cdc b/test/CapabilityFactory_tests.cdc index 2180c30..e948ce8 100644 --- a/test/CapabilityFactory_tests.cdc +++ b/test/CapabilityFactory_tests.cdc @@ -211,11 +211,13 @@ fun setup() { deploy("NFTProviderFactory", "../contracts/factories/NFTProviderFactory.cdc") deploy("NFTCollectionPublicFactory", "../contracts/factories/NFTCollectionPublicFactory.cdc") deploy("NFTProviderAndCollectionFactory", "../contracts/factories/NFTProviderAndCollectionFactory.cdc") + deploy("NFTCollectionFactory", "../contracts/factories/NFTCollectionFactory.cdc") deploy("FTProviderFactory", "../contracts/factories/FTProviderFactory.cdc") deploy("FTBalanceFactory", "../contracts/factories/FTBalanceFactory.cdc") deploy("FTReceiverFactory", "../contracts/factories/FTReceiverFactory.cdc") deploy("FTReceiverBalanceFactory", "../contracts/factories/FTReceiverBalanceFactory.cdc") deploy("FTAllFactory", "../contracts/factories/FTAllFactory.cdc") + deploy("FTVaultFactory", "../contracts/factories/FTVaultFactory.cdc") } // BEGIN SECTION - transactions used in tests diff --git a/test/HybridCustody_tests.cdc b/test/HybridCustody_tests.cdc index c9b1584..9781ca7 100644 --- a/test/HybridCustody_tests.cdc +++ b/test/HybridCustody_tests.cdc @@ -1448,11 +1448,13 @@ fun setup() { accounts["NFTCollectionPublicFactory"] = adminAccount accounts["NFTProviderAndCollectionFactory"] = adminAccount accounts["NFTProviderFactory"] = adminAccount + accounts["NFTCollectionFactory"] = adminAccount accounts["FTProviderFactory"] = adminAccount accounts["FTBalanceFactory"] = adminAccount accounts["FTReceiverBalanceFactory"] = adminAccount accounts["FTReceiverFactory"] = adminAccount accounts["FTAllFactory"] = adminAccount + accounts["FTVaultFactory"] = adminAccount accounts["ExampleNFT"] = adminAccount accounts["ExampleNFT2"] = adminAccount accounts["ExampleToken"] = adminAccount @@ -1473,10 +1475,12 @@ fun setup() { deploy("NFTCollectionPublicFactory", "../contracts/factories/NFTCollectionPublicFactory.cdc") deploy("NFTProviderAndCollectionFactory", "../contracts/factories/NFTProviderAndCollectionFactory.cdc") deploy("NFTProviderFactory", "../contracts/factories/NFTProviderFactory.cdc") + deploy("NFTCollectionFactory", "../contracts/factories/NFTCollectionFactory.cdc") deploy("FTProviderFactory", "../contracts/factories/FTProviderFactory.cdc") deploy("FTBalanceFactory", "../contracts/factories/FTBalanceFactory.cdc") deploy("FTReceiverBalanceFactory", "../contracts/factories/FTReceiverBalanceFactory.cdc") deploy("FTReceiverFactory", "../contracts/factories/FTReceiverFactory.cdc") deploy("FTAllFactory", "../contracts/factories/FTAllFactory.cdc") + deploy("FTVaultFactory", "../contracts/factories/FTVaultFactory.cdc") deploy("HybridCustody", "../contracts/HybridCustody.cdc") } diff --git a/transactions/factory/setup_ft_manager.cdc b/transactions/factory/setup_ft_manager.cdc index 5685e32..b6aa799 100644 --- a/transactions/factory/setup_ft_manager.cdc +++ b/transactions/factory/setup_ft_manager.cdc @@ -6,6 +6,7 @@ import "FTBalanceFactory" import "FTReceiverBalanceFactory" import "FTReceiverFactory" import "FTAllFactory" +import "FTVaultFactory" transaction { prepare(acct: auth(Storage, Capabilities) &Account) { @@ -35,5 +36,7 @@ transaction { manager.updateFactory(Type<&{FungibleToken.Receiver}>(), FTReceiverFactory.Factory()) manager.updateFactory(Type<&{FungibleToken.Receiver, FungibleToken.Balance}>(), FTReceiverBalanceFactory.Factory()) manager.updateFactory(Type(), FTAllFactory.Factory()) + manager.updateFactory(Type(), FTVaultFactory.WithdrawFactory()) + manager.updateFactory(Type<&{FungibleToken.Vault}>(), FTVaultFactory.Factory()) } } diff --git a/transactions/factory/setup_nft_ft_manager.cdc b/transactions/factory/setup_nft_ft_manager.cdc index a2083f2..88d71e8 100644 --- a/transactions/factory/setup_nft_ft_manager.cdc +++ b/transactions/factory/setup_nft_ft_manager.cdc @@ -5,11 +5,13 @@ import "CapabilityFactory" import "NFTCollectionPublicFactory" import "NFTProviderAndCollectionFactory" import "NFTProviderFactory" +import "NFTCollectionFactory" import "FTProviderFactory" import "FTBalanceFactory" import "FTReceiverBalanceFactory" import "FTReceiverFactory" import "FTAllFactory" +import "FTVaultFactory" transaction { prepare(acct: auth(Storage, Capabilities) &Account) { @@ -35,10 +37,14 @@ transaction { manager.updateFactory(Type<&{NonFungibleToken.CollectionPublic}>(), NFTCollectionPublicFactory.Factory()) manager.updateFactory(Type(), NFTProviderAndCollectionFactory.Factory()) manager.updateFactory(Type(), NFTProviderFactory.Factory()) + manager.updateFactory(Type(), NFTCollectionFactory.WithdrawFactory()) + manager.updateFactory(Type<&{NonFungibleToken.Collection}>(), NFTCollectionFactory.Factory()) manager.updateFactory(Type(), FTProviderFactory.Factory()) manager.updateFactory(Type<&{FungibleToken.Balance}>(), FTBalanceFactory.Factory()) manager.updateFactory(Type<&{FungibleToken.Receiver}>(), FTReceiverFactory.Factory()) manager.updateFactory(Type<&{FungibleToken.Receiver, FungibleToken.Balance}>(), FTReceiverBalanceFactory.Factory()) manager.updateFactory(Type(), FTAllFactory.Factory()) + manager.updateFactory(Type(), FTVaultFactory.WithdrawFactory()) + manager.updateFactory(Type<&{FungibleToken.Vault}>(), FTVaultFactory.Factory()) } } diff --git a/transactions/factory/setup_nft_manager.cdc b/transactions/factory/setup_nft_manager.cdc index b35cf77..e38e2e1 100644 --- a/transactions/factory/setup_nft_manager.cdc +++ b/transactions/factory/setup_nft_manager.cdc @@ -4,6 +4,7 @@ import "CapabilityFactory" import "NFTCollectionPublicFactory" import "NFTProviderAndCollectionFactory" import "NFTProviderFactory" +import "NFTCollectionFactory" transaction { prepare(acct: auth(Storage, Capabilities) &Account) { @@ -30,5 +31,7 @@ transaction { manager.updateFactory(Type<&{NonFungibleToken.CollectionPublic}>(), NFTCollectionPublicFactory.Factory()) manager.updateFactory(Type(), NFTProviderAndCollectionFactory.Factory()) manager.updateFactory(Type(), NFTProviderFactory.Factory()) + manager.updateFactory(Type(), NFTCollectionFactory.WithdrawFactory()) + manager.updateFactory(Type<&{NonFungibleToken.Collection}>(), NFTCollectionFactory.Factory()) } }