From e7cd4c7ad2e71f46925dac611629f84764127d9f Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:47:28 -0600 Subject: [PATCH 1/5] remove previewnet from README deployments --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b82c004..4ae59b7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ they can: | ---------- | ------------------------------------------------------------------------------------ | | 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 @@ -34,12 +33,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 | 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) | +| 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) | ## Development From 91d042194cba2be43576f29705f57c75d1b88683 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:51:22 -0600 Subject: [PATCH 2/5] replace node_modules with dependency manager --- .gitignore | 3 +- README.md | 5 +- flow.json | 888 ++++++++++++++++++++++------------------------ package-lock.json | 35 -- package.json | 17 - 5 files changed, 420 insertions(+), 528 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/.gitignore b/.gitignore index 3c54981..dd3325f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ coverage.lcov *.pkey *.private *.pem -node_modules/ \ No newline at end of file +node_modules/ +imports/ \ No newline at end of file diff --git a/README.md b/README.md index 4ae59b7..2e9037c 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,11 @@ Follow the steps outlined below to set up your development environment. 1. **Initialize and Update Submodules** - This project uses Git submodules. To initialize and update them, run the following command in your terminal: + This project uses [Flow CLI's Dependency Manager](https://developers.flow.com/tools/flow-cli/dependency-manager). To + install them, run the following command in your terminal: ```bash - git submodule update --init --recursive + flow dependencies install ``` 2. **Run Flow Emulator** diff --git a/flow.json b/flow.json index 5a32a15..3787450 100644 --- a/flow.json +++ b/flow.json @@ -1,475 +1,417 @@ { - "contracts": { - "CapabilityDelegator": { - "source": "./contracts/CapabilityDelegator.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "CapabilityFactory": { - "source": "./contracts/CapabilityFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "CapabilityFilter": { - "source": "./contracts/CapabilityFilter.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "ExampleNFT": { - "source": "./contracts/standard/ExampleNFT.cdc", - "aliases": { - "testing": "0000000000000007" - } - }, - "ExampleNFT2": { - "source": "./contracts/standard/ExampleNFT2.cdc", - "aliases": { - "testing": "0000000000000007" - } - }, - "ExampleToken": { - "source": "./contracts/standard/ExampleToken.cdc", - "aliases": { - "testing": "0000000000000007" - } - }, - "FTAllFactory": { - "source": "./contracts/factories/FTAllFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "FTVaultFactory": { - "source": "./contracts/factories/FTVaultFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "FTBalanceFactory": { - "source": "./contracts/factories/FTBalanceFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "FTProviderFactory": { - "source": "./contracts/factories/FTProviderFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "FTReceiverBalanceFactory": { - "source": "./contracts/factories/FTReceiverBalanceFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "FTReceiverFactory": { - "source": "./contracts/factories/FTReceiverFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "HybridCustody": { - "source": "./contracts/HybridCustody.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "NFTCollectionPublicFactory": { - "source": "./contracts/factories/NFTCollectionPublicFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "NFTProviderAndCollectionFactory": { - "source": "./contracts/factories/NFTProviderAndCollectionFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "mainnet": "d8a7e05a7ac670c0", - "previewnet": "28b81f5880d5554e" - } - }, - "NFTProviderFactory": { - "source": "./contracts/factories/NFTProviderFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "previewnet": "28b81f5880d5554e" - } - }, - "NFTCollectionFactory": { - "source": "./contracts/factories/NFTCollectionFactory.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007", - "testnet": "294e44e1ec6993c6", - "previewnet": "28b81f5880d5554e" - } - }, - "FungibleToken": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/FungibleToken.cdc", - "aliases": { - "emulator": "ee82856bf20e2aa6", - "testnet": "9a0766d93b6608b7", - "mainnet": "f233dcee88fe0abe", - "previewnet": "a0225e7000ac82a9" - } - }, - "FungibleTokenMetadataViews": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/FungibleTokenMetadataViews.cdc", - "aliases": { - "emulator": "ee82856bf20e2aa6", - "testnet": "9a0766d93b6608b7", - "mainnet": "f233dcee88fe0abe", - "previewnet": "a0225e7000ac82a9" - } - }, - "Burner": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/Burner.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "9a0766d93b6608b7", - "mainnet": "f233dcee88fe0abe", - "previewnet": "b6763b4399a888c8" - } - }, - "FlowToken": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/FlowToken.cdc", - "aliases": { - "emulator": "0ae53cb6e3f42a79", - "testnet": "7e60df042a9c0868", - "mainnet": "1654653399040a61", - "previewnet": "4445e7ad11568276" - } - }, - "NonFungibleToken": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/NonFungibleToken.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "631e88ae7f1d7c20", - "mainnet": "1d7e57aa55817448", - "previewnet": "b6763b4399a888c8" - } - }, - "StringUtils": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/StringUtils.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "31ad40c07a2a9788", - "mainnet": "a340dc0a4ec828ab" - } - }, - "ArrayUtils": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/ArrayUtils.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "31ad40c07a2a9788", - "mainnet": "a340dc0a4ec828ab" - } - }, - "AddressUtils": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/flow-utils/AddressUtils.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "31ad40c07a2a9788", - "mainnet": "a340dc0a4ec828ab" - } - }, - "MetadataViews": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/MetadataViews.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "631e88ae7f1d7c20", - "mainnet": "1d7e57aa55817448", - "previewnet": "b6763b4399a888c8" - } - }, - "ViewResolver": { - "source": "./node_modules/@flowtyio/flow-contracts/contracts/ViewResolver.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "631e88ae7f1d7c20", - "mainnet": "1d7e57aa55817448", - "previewnet": "b6763b4399a888c8" - } - } - }, - "networks": { - "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" - }, - "accounts": { - "allow-all-mainnet": { - "address": "78e93a79b05d0d7d", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" - } - }, - "allow-all-testnet": { - "address": "e2664be06bb0fe62", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" - } - }, - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" - }, - "emulator-ft": { - "address": "ee82856bf20e2aa6", - "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" - }, - "hc-mainnet": { - "address": "d8a7e05a7ac670c0", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "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": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" - } - }, - "ft-manager-mainnet": { - "address": "410aa603925923d9", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" - } - }, - "ft-manager-testnet": { - "address": "08bed9e8508ed20e", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" - } - }, - "nft-ft-manager-mainnet": { - "address": "071d382668250606", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" - } - }, - "nft-ft-manager-testnet": { - "address": "1b7fa5972fcb8af5", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" - } - }, - "nft-manager-mainnet": { - "address": "ee9ff4f07a2d6dad", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" - } - }, - "nft-manager-testnet": { - "address": "1055970ee34ef4dc", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" - } - }, - "emulator-flowtoken": { - "address": "0ae53cb6e3f42a79", - "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" - } - }, - "deployments": { - "emulator": { - "emulator-account": [ - "NonFungibleToken", - "MetadataViews", - "ViewResolver", - "AddressUtils", - "StringUtils", - "ArrayUtils", - "HybridCustody", - "CapabilityDelegator", - "CapabilityFilter", - "CapabilityFactory", - "FTProviderFactory", - "FTAllFactory", - "FTBalanceFactory", - "FTReceiverBalanceFactory", - "FTReceiverFactory", - "NFTProviderFactory", - "NFTProviderAndCollectionFactory", - "NFTCollectionPublicFactory", - "FTVaultFactory", - "NFTCollectionFactory", - "ExampleNFT", - "ExampleNFT2", - "ExampleToken", - "Burner" - ], - "emulator-ft": [ - "FungibleToken", - "FungibleTokenMetadataViews" - ], - "emulator-flowtoken": [ - "FlowToken" - ] - }, - "testnet": { - "hc-testnet": [ - "CapabilityDelegator", - "CapabilityFactory", - "CapabilityFilter", - "HybridCustody", - "NFTProviderFactory", - "NFTProviderAndCollectionFactory", - "NFTCollectionPublicFactory", - "FTProviderFactory", - "FTAllFactory", - "FTBalanceFactory", - "FTReceiverBalanceFactory", - "FTReceiverFactory", - "FTVaultFactory", - "NFTCollectionFactory" - ] - }, - "mainnet": { - "hc-mainnet": [ - "CapabilityDelegator", - "CapabilityFactory", - "CapabilityFilter", - "HybridCustody", - "NFTProviderFactory", - "NFTProviderAndCollectionFactory", - "NFTCollectionPublicFactory", - "FTProviderFactory", - "FTAllFactory", - "FTBalanceFactory", - "FTReceiverBalanceFactory", - "FTReceiverFactory", - "FTVaultFactory", - "NFTCollectionFactory" - ] - }, - "previewnet": { - "hc-previewnet": [ - "CapabilityDelegator", - "CapabilityFactory", - "CapabilityFilter", - "HybridCustody", - "NFTProviderFactory", - "NFTProviderAndCollectionFactory", - "NFTCollectionPublicFactory", - "FTProviderFactory", - "FTAllFactory", - "FTBalanceFactory", - "FTReceiverBalanceFactory", - "FTReceiverFactory", - "FTVaultFactory", - "NFTCollectionFactory" - ] - } - } + "contracts": { + "CapabilityDelegator": { + "source": "./contracts/CapabilityDelegator.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "CapabilityFactory": { + "source": "./contracts/CapabilityFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "CapabilityFilter": { + "source": "./contracts/CapabilityFilter.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "ExampleNFT": { + "source": "./contracts/standard/ExampleNFT.cdc", + "aliases": { + "testing": "0000000000000007" + } + }, + "ExampleNFT2": { + "source": "./contracts/standard/ExampleNFT2.cdc", + "aliases": { + "testing": "0000000000000007" + } + }, + "ExampleToken": { + "source": "./contracts/standard/ExampleToken.cdc", + "aliases": { + "testing": "0000000000000007" + } + }, + "FTAllFactory": { + "source": "./contracts/factories/FTAllFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FTBalanceFactory": { + "source": "./contracts/factories/FTBalanceFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FTProviderFactory": { + "source": "./contracts/factories/FTProviderFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FTReceiverBalanceFactory": { + "source": "./contracts/factories/FTReceiverBalanceFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FTReceiverFactory": { + "source": "./contracts/factories/FTReceiverFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FTVaultFactory": { + "source": "./contracts/factories/FTVaultFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "FlowToken": { + "source": "./node_modules/@flowtyio/flow-contracts/contracts/FlowToken.cdc", + "aliases": { + "emulator": "0ae53cb6e3f42a79", + "mainnet": "1654653399040a61", + "testnet": "7e60df042a9c0868" + } + }, + "HybridCustody": { + "source": "./contracts/HybridCustody.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "NFTCollectionFactory": { + "source": "./contracts/factories/NFTCollectionFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "NFTCollectionPublicFactory": { + "source": "./contracts/factories/NFTCollectionPublicFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "NFTProviderAndCollectionFactory": { + "source": "./contracts/factories/NFTProviderAndCollectionFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "d8a7e05a7ac670c0", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + }, + "NFTProviderFactory": { + "source": "./contracts/factories/NFTProviderFactory.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "testing": "0000000000000007", + "testnet": "294e44e1ec6993c6" + } + } + }, + "dependencies": { + "AddressUtils": { + "source": "mainnet://a340dc0a4ec828ab.AddressUtils", + "hash": "1723f0954ef25e083483b7c84f93fd159d5cc553746ea1532a79fbbbe4450487", + "aliases": { + "mainnet": "a340dc0a4ec828ab", + "testnet": "31ad40c07a2a9788" + } + }, + "ArrayUtils": { + "source": "mainnet://a340dc0a4ec828ab.ArrayUtils", + "hash": "9e8f2d3e35be82da42b685045af834e16d23bcef1f322603ff91cedd1c9bbad9", + "aliases": { + "mainnet": "a340dc0a4ec828ab", + "testnet": "31ad40c07a2a9788" + } + }, + "Burner": { + "source": "mainnet://f233dcee88fe0abe.Burner", + "hash": "71af18e227984cd434a3ad00bb2f3618b76482842bae920ee55662c37c8bf331", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "f233dcee88fe0abe", + "testnet": "9a0766d93b6608b7" + } + }, + "FungibleToken": { + "source": "mainnet://f233dcee88fe0abe.FungibleToken", + "hash": "1410889b47fef8b02f6867eef3d67a75288a56a651b67a7e815ce273ad301cff", + "aliases": { + "emulator": "ee82856bf20e2aa6", + "mainnet": "f233dcee88fe0abe", + "previewnet": "a0225e7000ac82a9", + "testnet": "9a0766d93b6608b7" + } + }, + "FungibleTokenMetadataViews": { + "source": "mainnet://f233dcee88fe0abe.FungibleTokenMetadataViews", + "hash": "294ada6a3df68757fcac4d794f62307c2ea4fe49c93f67e3771d3c6d8377dd47", + "aliases": { + "emulator": "ee82856bf20e2aa6", + "mainnet": "f233dcee88fe0abe", + "previewnet": "a0225e7000ac82a9", + "testnet": "9a0766d93b6608b7" + } + }, + "MetadataViews": { + "source": "mainnet://1d7e57aa55817448.MetadataViews", + "hash": "be26ea7959d7cbc06ac69fe00926b812c4da67984ea2d1bde1029141ae091378", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8", + "testnet": "631e88ae7f1d7c20" + } + }, + "NonFungibleToken": { + "source": "mainnet://1d7e57aa55817448.NonFungibleToken", + "hash": "49a58b950afdaf0728fdb7d4eb47cf4f2ec3077d655f274b7fdeb504c742f528", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8", + "testnet": "631e88ae7f1d7c20" + } + }, + "StringUtils": { + "source": "mainnet://a340dc0a4ec828ab.StringUtils", + "hash": "b401c4b0f711344ed9cd02ff77c91e026f5dfbca6045f140b9ca9d4966707e83", + "aliases": { + "mainnet": "a340dc0a4ec828ab", + "testnet": "31ad40c07a2a9788" + } + }, + "ViewResolver": { + "source": "mainnet://1d7e57aa55817448.ViewResolver", + "hash": "374a1994046bac9f6228b4843cb32393ef40554df9bd9907a702d098a2987bde", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "previewnet": "b6763b4399a888c8", + "testnet": "631e88ae7f1d7c20" + } + } + }, + "networks": { + "emulator": "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", + "testing": "127.0.0.1:3569", + "testnet": "access.devnet.nodes.onflow.org:9000" + }, + "accounts": { + "allow-all-mainnet": { + "address": "78e93a79b05d0d7d", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" + } + }, + "allow-all-testnet": { + "address": "e2664be06bb0fe62", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" + } + }, + "emulator-account": { + "address": "f8d6e0586b0a20c7", + "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" + }, + "emulator-flowtoken": { + "address": "0ae53cb6e3f42a79", + "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" + }, + "emulator-ft": { + "address": "ee82856bf20e2aa6", + "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" + }, + "ft-manager-mainnet": { + "address": "410aa603925923d9", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" + } + }, + "ft-manager-testnet": { + "address": "08bed9e8508ed20e", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" + } + }, + "hc-mainnet": { + "address": "d8a7e05a7ac670c0", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" + } + }, + "hc-testnet": { + "address": "294e44e1ec6993c6", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" + } + }, + "nft-ft-manager-mainnet": { + "address": "071d382668250606", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" + } + }, + "nft-ft-manager-testnet": { + "address": "1b7fa5972fcb8af5", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" + } + }, + "nft-manager-mainnet": { + "address": "ee9ff4f07a2d6dad", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-mainnet/cryptoKeys/hybrid-custody-mainnet-key/cryptoKeyVersions/1" + } + }, + "nft-manager-testnet": { + "address": "1055970ee34ef4dc", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/hybrid-custody-testnet/cryptoKeys/hybrid-custody-testnet-key/cryptoKeyVersions/1" + } + } + }, + "deployments": { + "emulator": { + "emulator-account": [ + "NonFungibleToken", + "MetadataViews", + "ViewResolver", + "AddressUtils", + "StringUtils", + "ArrayUtils", + "HybridCustody", + "CapabilityDelegator", + "CapabilityFilter", + "CapabilityFactory", + "FTProviderFactory", + "FTAllFactory", + "FTBalanceFactory", + "FTReceiverBalanceFactory", + "FTReceiverFactory", + "NFTProviderFactory", + "NFTProviderAndCollectionFactory", + "NFTCollectionPublicFactory", + "FTVaultFactory", + "NFTCollectionFactory", + "ExampleNFT", + "ExampleNFT2", + "ExampleToken", + "Burner", + "StringUtils", + "ArrayUtils", + "AddressUtils" + ], + "emulator-flowtoken": [ + "FlowToken" + ], + "emulator-ft": [ + "FungibleToken", + "FungibleTokenMetadataViews" + ] + }, + "mainnet": { + "hc-mainnet": [ + "CapabilityDelegator", + "CapabilityFactory", + "CapabilityFilter", + "HybridCustody", + "NFTProviderFactory", + "NFTProviderAndCollectionFactory", + "NFTCollectionPublicFactory", + "FTProviderFactory", + "FTAllFactory", + "FTBalanceFactory", + "FTReceiverBalanceFactory", + "FTReceiverFactory", + "FTVaultFactory", + "NFTCollectionFactory" + ] + }, + "testnet": { + "hc-testnet": [ + "CapabilityDelegator", + "CapabilityFactory", + "CapabilityFilter", + "HybridCustody", + "NFTProviderFactory", + "NFTProviderAndCollectionFactory", + "NFTCollectionPublicFactory", + "FTProviderFactory", + "FTAllFactory", + "FTBalanceFactory", + "FTReceiverBalanceFactory", + "FTReceiverFactory", + "FTVaultFactory", + "NFTCollectionFactory" + ] + } + } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index d8f1faa..0000000 --- a/package-lock.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "hybrid-custody", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "hybrid-custody", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@flowtyio/flow-contracts": "^0.1.0-beta.19" - } - }, - "node_modules/@flowtyio/flow-contracts": { - "version": "0.1.0-beta.19", - "resolved": "https://registry.npmjs.org/@flowtyio/flow-contracts/-/flow-contracts-0.1.0-beta.19.tgz", - "integrity": "sha512-s88ttcc+BYwgR+eXyIAtL8bXPaSj2lVQgbpD+7huadfst8N8gri3g4uaS8KxXkHZw4WQojJmaoc16Fkvlp93gQ==", - "dependencies": { - "commander": "^11.0.0" - }, - "bin": { - "flow-contracts": "index.js" - } - }, - "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "engines": { - "node": ">=16" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 350d7f7..0000000 --- a/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "hybrid-custody", - "version": "1.0.0", - "description": "![Tests](https://github.com/onflow/hybrid-custody/actions/workflows/integration-tests.yml/badge.svg) [![codecov](https://codecov.io/gh/onflow/hybrid-custody/branch/main/graph/badge.svg?token=5GWD5NHEKF)](https://codecov.io/gh/onflow/hybrid-custody)", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "./test.sh" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@flowtyio/flow-contracts": "^0.1.0-beta.19" - } -} From ae5a7870b0fa5fb600c2ba6d66ee3ccfb0cad8a0 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:54:28 -0600 Subject: [PATCH 3/5] update CI commands & remove normalization script --- .github/workflows/integration-tests.yml | 2 +- normalize_coverage_report.sh | 14 -------------- test.sh | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100755 normalize_coverage_report.sh diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 82f6783..4d9e197 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -19,7 +19,7 @@ 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)" -- v1.21.0-cadence-v1.0.0-preview.27 + run: bash -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" - name: Run tests run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" test/*_tests.cdc - name: Upload coverage reports to Codecov diff --git a/normalize_coverage_report.sh b/normalize_coverage_report.sh deleted file mode 100755 index 93ae949..0000000 --- a/normalize_coverage_report.sh +++ /dev/null @@ -1,14 +0,0 @@ -sed -i 's/A.0000000000000007.CapabilityDelegator/contracts\/CapabilityDelegator.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.CapabilityFactory/contracts\/CapabilityFactory.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.CapabilityFilter/contracts\/CapabilityFilter.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.ExampleNFT/contracts\/ExampleNFT.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.ExampleNFT2/contracts\/ExampleNFT2.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.ExampleToken/contracts\/ExampleToken.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.FTBalanceFactory/contracts\/FTBalanceFactory.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.FTProviderFactory/contracts\/FTProviderFactory.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.FTReceiverFactory/contracts\/FTReceiverFactory.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.HybridCustody/contracts\/HybridCustody.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.NFTCollectionPublicFactory/contracts\/NFTCollectionPublicFactory.cdc/' coverage.lcov -sed -i 's/A.0000000000000007.NFTProviderFactory/contracts\/NFTProviderFactory.cdc/' coverage.lcov -sed -i 's/A.f8d6e0586b0a20c7.MetadataViews/contracts\/MetadataViews.cdc/' coverage.lcov -sed -i 's/A.f8d6e0586b0a20c7.NonFungibleToken/contracts\/NonFungibleToken.cdc/' coverage.lcov \ No newline at end of file diff --git a/test.sh b/test.sh index 03faee0..acc7741 100755 --- a/test.sh +++ b/test.sh @@ -2,4 +2,4 @@ set -e -flow-c1 test --cover --covercode="contracts" --coverprofile="coverage.lcov" test/*_tests.cdc \ No newline at end of file +flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" test/*_tests.cdc \ No newline at end of file From 66749b3ecfec4c9317ffbc7d48fcdd7e7babea79 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:55:19 -0600 Subject: [PATCH 4/5] remove unused .gitmodules --- .gitmodules | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0f2df34..0000000 --- a/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "modules/flow-nft"] - path = modules/flow-nft - url = https://github.com/onflow/flow-nft.git -[submodule "modules/flow-utils"] - path = modules/flow-utils - url = https://github.com/green-goo-dao/flow-utils.git -[submodule "modules/flow-ft"] - path = modules/flow-ft - url = https://github.com/onflow/flow-ft.git From 683031535ccdd9646982d0d9d7e5bfc6196a8893 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:03:15 -0600 Subject: [PATCH 5/5] fix failing CI --- .github/workflows/integration-tests.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 4d9e197..2b13a22 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -6,22 +6,31 @@ on: push: branches: [main] + jobs: tests: name: Flow CLI Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - submodules: "true" - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: "1.20.x" + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Install Flow CLI - run: bash -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" + run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" + - name: Flow CLI Version + run: flow version + - name: Update PATH + run: echo "/root/.local/bin" >> $GITHUB_PATH - name: Run tests - run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" test/*_tests.cdc + run: sh test.sh - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: