@flowtyio/flow-contracts 0.1.0-beta.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/contracts/FungibleTokenSwitchboard.cdc +360 -0
- package/contracts/MetadataViews.cdc +79 -6
- package/contracts/NonFungibleToken.cdc +17 -10
- package/contracts/capability-cache/CapabilityCache.cdc +97 -0
- package/contracts/dapper/TopShot.cdc +323 -259
- package/contracts/dapper/TopShotLocking.cdc +41 -15
- package/contracts/dapper/offers/DapperOffersV2.cdc +46 -43
- package/contracts/dapper/offers/OffersV2.cdc +40 -56
- package/contracts/dapper/offers/Resolver.cdc +20 -13
- package/contracts/emerald-city/FLOAT.cdc +259 -254
- package/contracts/evm/CrossVMNFT.cdc +50 -0
- package/contracts/evm/EVM.cdc +851 -0
- package/contracts/evm/FlowEVMBridgeConfig.cdc +454 -0
- package/contracts/evm/FlowEVMBridgeHandlerInterfaces.cdc +163 -0
- package/contracts/evm/FlowEVMBridgeHandlers.cdc +230 -0
- package/contracts/evm/FlowEVMBridgeUtils.cdc +1303 -0
- package/contracts/evm/IBridgePermissions.cdc +19 -0
- package/contracts/evm/ICrossVM.cdc +12 -0
- package/contracts/evm/ICrossVMAsset.cdc +19 -0
- package/contracts/evm/Serialize.cdc +141 -0
- package/contracts/evm/SerializeMetadata.cdc +221 -0
- package/contracts/example/ExampleNFT.cdc +2 -2
- package/contracts/find/FindViews.cdc +357 -353
- package/contracts/flow-utils/ScopedFTProviders.cdc +5 -2
- package/contracts/flow-utils/ScopedNFTProviders.cdc +6 -2
- package/contracts/flowty-drops/ContractManager.cdc +73 -0
- package/contracts/flowty-drops/DropFactory.cdc +75 -0
- package/contracts/flowty-drops/DropTypes.cdc +282 -0
- package/contracts/flowty-drops/FlowtyActiveCheckers.cdc +113 -0
- package/contracts/flowty-drops/FlowtyAddressVerifiers.cdc +64 -0
- package/contracts/flowty-drops/FlowtyDrops.cdc +461 -0
- package/contracts/flowty-drops/FlowtyPricers.cdc +48 -0
- package/contracts/flowty-drops/initializers/ContractBorrower.cdc +14 -0
- package/contracts/flowty-drops/initializers/ContractInitializer.cdc +7 -0
- package/contracts/flowty-drops/initializers/OpenEditionInitializer.cdc +57 -0
- package/contracts/flowty-drops/nft/BaseCollection.cdc +97 -0
- package/contracts/flowty-drops/nft/BaseNFT.cdc +107 -0
- package/contracts/flowty-drops/nft/ContractFactory.cdc +13 -0
- package/contracts/flowty-drops/nft/ContractFactoryTemplate.cdc +48 -0
- package/contracts/flowty-drops/nft/NFTMetadata.cdc +140 -0
- package/contracts/flowty-drops/nft/OpenEditionNFT.cdc +42 -0
- package/contracts/flowty-drops/nft/OpenEditionTemplate.cdc +54 -0
- package/contracts/flowty-drops/nft/UniversalCollection.cdc +29 -0
- package/contracts/fungible-token-router/FungibleTokenRouter.cdc +103 -0
- package/contracts/hybrid-custody/CapabilityDelegator.cdc +28 -26
- package/contracts/hybrid-custody/CapabilityFactory.cdc +20 -18
- package/contracts/hybrid-custody/CapabilityFilter.cdc +41 -24
- package/contracts/hybrid-custody/HybridCustody.cdc +303 -242
- package/contracts/hybrid-custody/factories/FTAllFactory.cdc +16 -4
- package/contracts/hybrid-custody/factories/FTBalanceFactory.cdc +16 -4
- package/contracts/hybrid-custody/factories/FTProviderFactory.cdc +17 -5
- package/contracts/hybrid-custody/factories/FTReceiverBalanceFactory.cdc +16 -4
- package/contracts/hybrid-custody/factories/FTReceiverFactory.cdc +16 -4
- package/contracts/hybrid-custody/factories/FTVaultFactory.cdc +46 -0
- package/contracts/hybrid-custody/factories/NFTCollectionFactory.cdc +45 -0
- package/contracts/hybrid-custody/factories/NFTCollectionPublicFactory.cdc +16 -4
- package/contracts/hybrid-custody/factories/NFTProviderAndCollectionFactory.cdc +22 -0
- package/contracts/hybrid-custody/factories/NFTProviderFactory.cdc +16 -4
- package/contracts/lost-and-found/LostAndFound.cdc +21 -17
- package/contracts/tokens/USDCFlow.cdc +232 -0
- package/flow.json +278 -7
- package/package.json +1 -1
- package/contracts/hybrid-custody/factories/NFTProviderAndCollectionPublicFactory.cdc +0 -10
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "NonFungibleToken"
|
|
2
|
+
import "FungibleToken"
|
|
3
|
+
import "MetadataViews"
|
|
4
|
+
|
|
5
|
+
import "EVM"
|
|
6
|
+
|
|
7
|
+
import "ICrossVMAsset"
|
|
8
|
+
|
|
9
|
+
/// Contract defining cross-VM NFT-related interfaces
|
|
10
|
+
///
|
|
11
|
+
access(all) contract CrossVMNFT {
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/// A simple interface for an NFT that is bridged to the EVM. This may be necessary in some cases as there is
|
|
15
|
+
/// discrepancy between Flow NFT standard IDs (UInt64) and EVM NFT standard IDs (UInt256). Discrepancies on IDs
|
|
16
|
+
/// gone unaccounted for have the potential to induce loss of ownership bridging between VMs, so it's critical to
|
|
17
|
+
/// retain identifying token information on bridging.
|
|
18
|
+
///
|
|
19
|
+
/// See discussion https://github.com/onflow/flow-nft/pull/126#discussion_r1462612559 where @austinkline raised
|
|
20
|
+
/// differentiating IDs in a minimal interface incorporated into the one below
|
|
21
|
+
///
|
|
22
|
+
access(all) resource interface EVMNFT : ICrossVMAsset.AssetInfo, NonFungibleToken.NFT {
|
|
23
|
+
access(all) let evmID: UInt256
|
|
24
|
+
|
|
25
|
+
access(all) view fun getName(): String
|
|
26
|
+
access(all) view fun getSymbol(): String
|
|
27
|
+
access(all) view fun getEVMContractAddress(): EVM.EVMAddress
|
|
28
|
+
access(all) fun tokenURI(): String
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// A simple interface for a collection of EVMNFTs
|
|
32
|
+
///
|
|
33
|
+
access(all) resource interface EVMNFTCollection : NonFungibleToken.Collection {
|
|
34
|
+
access(all) view fun getName(): String
|
|
35
|
+
access(all) view fun getSymbol(): String
|
|
36
|
+
access(all) view fun getEVMIDs(): [UInt256]
|
|
37
|
+
access(all) view fun getCadenceID(from evmID: UInt256): UInt64?
|
|
38
|
+
access(all) view fun getEVMID(from cadenceID: UInt64): UInt256?
|
|
39
|
+
access(all) fun contractURI(): String?
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// Retrieves the EVM ID of an NFT if it implements the EVMNFT interface, returning nil if not
|
|
43
|
+
///
|
|
44
|
+
access(all) view fun getEVMID(from token: &{NonFungibleToken.NFT}): UInt256? {
|
|
45
|
+
if let evmNFT = token as? &{EVMNFT} {
|
|
46
|
+
return evmNFT.evmID
|
|
47
|
+
}
|
|
48
|
+
return nil
|
|
49
|
+
}
|
|
50
|
+
}
|