@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,232 @@
|
|
|
1
|
+
import "FungibleToken"
|
|
2
|
+
import "FungibleTokenMetadataViews"
|
|
3
|
+
import "MetadataViews"
|
|
4
|
+
import "Burner"
|
|
5
|
+
import "ViewResolver"
|
|
6
|
+
import "FlowEVMBridgeHandlerInterfaces"
|
|
7
|
+
import "FlowEVMBridgeConfig"
|
|
8
|
+
|
|
9
|
+
/// After the Crescendo migration, the `USDCFlow` smart contract
|
|
10
|
+
/// will integrate directly with the Flow VM bridge to become
|
|
11
|
+
/// the bridged version of Flow EVM USDC. These tokens will be backed
|
|
12
|
+
/// by real USDC via Flow EVM.
|
|
13
|
+
|
|
14
|
+
/// This is not the official Circle USDC, only a bridged version
|
|
15
|
+
/// that is still backed by official USDC on the other side of the bridge
|
|
16
|
+
|
|
17
|
+
access(all) contract USDCFlow: FungibleToken, ViewResolver {
|
|
18
|
+
|
|
19
|
+
/// Total supply of USDCFlows in existence
|
|
20
|
+
access(all) var totalSupply: UFix64
|
|
21
|
+
|
|
22
|
+
/// Storage and Public Paths
|
|
23
|
+
access(all) let VaultStoragePath: StoragePath
|
|
24
|
+
access(all) let VaultPublicPath: PublicPath
|
|
25
|
+
access(all) let ReceiverPublicPath: PublicPath
|
|
26
|
+
|
|
27
|
+
/// The event that is emitted when new tokens are minted
|
|
28
|
+
access(all) event Minted(amount: UFix64, mintedUUID: UInt64)
|
|
29
|
+
access(all) event Burned(amount: UFix64, burntUUID: UInt64)
|
|
30
|
+
|
|
31
|
+
access(all) view fun getContractViews(resourceType: Type?): [Type] {
|
|
32
|
+
return [
|
|
33
|
+
Type<FungibleTokenMetadataViews.FTView>(),
|
|
34
|
+
Type<FungibleTokenMetadataViews.FTDisplay>(),
|
|
35
|
+
Type<FungibleTokenMetadataViews.FTVaultData>(),
|
|
36
|
+
Type<FungibleTokenMetadataViews.TotalSupply>()
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
access(all) fun resolveContractView(resourceType: Type?, viewType: Type): AnyStruct? {
|
|
41
|
+
switch viewType {
|
|
42
|
+
case Type<FungibleTokenMetadataViews.FTView>():
|
|
43
|
+
return FungibleTokenMetadataViews.FTView(
|
|
44
|
+
ftDisplay: self.resolveContractView(resourceType: nil, viewType: Type<FungibleTokenMetadataViews.FTDisplay>()) as! FungibleTokenMetadataViews.FTDisplay?,
|
|
45
|
+
ftVaultData: self.resolveContractView(resourceType: nil, viewType: Type<FungibleTokenMetadataViews.FTVaultData>()) as! FungibleTokenMetadataViews.FTVaultData?
|
|
46
|
+
)
|
|
47
|
+
case Type<FungibleTokenMetadataViews.FTDisplay>():
|
|
48
|
+
let media = MetadataViews.Media(
|
|
49
|
+
file: MetadataViews.HTTPFile(
|
|
50
|
+
url: "https://uploads-ssl.webflow.com/5f734f4dbd95382f4fdfa0ea/66bfae00953c3d7bd09e7ac4_USDC-and-FLOW.svg"
|
|
51
|
+
),
|
|
52
|
+
mediaType: "image/svg+xml"
|
|
53
|
+
)
|
|
54
|
+
let medias = MetadataViews.Medias([media])
|
|
55
|
+
return FungibleTokenMetadataViews.FTDisplay(
|
|
56
|
+
name: "USDC (Flow)",
|
|
57
|
+
symbol: "USDCf",
|
|
58
|
+
description: "This fungible token representation of Standard Bridged USDC is bridged from Flow EVM.",
|
|
59
|
+
externalURL: MetadataViews.ExternalURL("https://github.com/circlefin/stablecoin-evm/blob/master/doc/bridged_USDC_standard.md"),
|
|
60
|
+
logos: medias,
|
|
61
|
+
socials: {},
|
|
62
|
+
)
|
|
63
|
+
case Type<FungibleTokenMetadataViews.FTVaultData>():
|
|
64
|
+
return FungibleTokenMetadataViews.FTVaultData(
|
|
65
|
+
storagePath: USDCFlow.VaultStoragePath,
|
|
66
|
+
receiverPath: USDCFlow.ReceiverPublicPath,
|
|
67
|
+
metadataPath: USDCFlow.VaultPublicPath,
|
|
68
|
+
receiverLinkedType: Type<&USDCFlow.Vault>(),
|
|
69
|
+
metadataLinkedType: Type<&USDCFlow.Vault>(),
|
|
70
|
+
createEmptyVaultFunction: (fun(): @{FungibleToken.Vault} {
|
|
71
|
+
return <-USDCFlow.createEmptyVault(vaultType: Type<@USDCFlow.Vault>())
|
|
72
|
+
})
|
|
73
|
+
)
|
|
74
|
+
case Type<FungibleTokenMetadataViews.TotalSupply>():
|
|
75
|
+
return FungibleTokenMetadataViews.TotalSupply(
|
|
76
|
+
totalSupply: USDCFlow.totalSupply
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
return nil
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
access(all) resource Vault: FungibleToken.Vault {
|
|
83
|
+
|
|
84
|
+
/// The total balance of this vault
|
|
85
|
+
access(all) var balance: UFix64
|
|
86
|
+
|
|
87
|
+
/// Initialize the balance at resource creation time
|
|
88
|
+
init(balance: UFix64) {
|
|
89
|
+
self.balance = balance
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/// Called when a fungible token is burned via the `Burner.burn()` method
|
|
93
|
+
/// The total supply will only reflect the supply in the Cadence version
|
|
94
|
+
/// of the USDCFlow smart contract
|
|
95
|
+
access(contract) fun burnCallback() {
|
|
96
|
+
if self.balance > 0.0 {
|
|
97
|
+
assert(USDCFlow.totalSupply >= self.balance, message: "Cannot burn more than the total supply")
|
|
98
|
+
emit Burned(amount: self.balance, burntUUID: self.uuid)
|
|
99
|
+
USDCFlow.totalSupply = USDCFlow.totalSupply - self.balance
|
|
100
|
+
}
|
|
101
|
+
self.balance = 0.0
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// getSupportedVaultTypes optionally returns a list of vault types that this receiver accepts
|
|
105
|
+
access(all) view fun getSupportedVaultTypes(): {Type: Bool} {
|
|
106
|
+
let supportedTypes: {Type: Bool} = {}
|
|
107
|
+
supportedTypes[self.getType()] = true
|
|
108
|
+
return supportedTypes
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/// Returns whether the specified type can be deposited
|
|
112
|
+
access(all) view fun isSupportedVaultType(type: Type): Bool {
|
|
113
|
+
return self.getSupportedVaultTypes()[type] ?? false
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// Asks if the amount can be withdrawn from this vault
|
|
117
|
+
access(all) view fun isAvailableToWithdraw(amount: UFix64): Bool {
|
|
118
|
+
return amount <= self.balance
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
access(all) fun createEmptyVault(): @USDCFlow.Vault {
|
|
122
|
+
return <-create Vault(balance: 0.0)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/// withdraw
|
|
126
|
+
/// @param amount: The amount of tokens to be withdrawn from the vault
|
|
127
|
+
/// @return The Vault resource containing the withdrawn funds
|
|
128
|
+
///
|
|
129
|
+
access(FungibleToken.Withdraw) fun withdraw(amount: UFix64): @{FungibleToken.Vault} {
|
|
130
|
+
self.balance = self.balance - amount
|
|
131
|
+
return <-create Vault(balance: amount)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// deposit
|
|
135
|
+
/// @param from: The Vault resource containing the funds that will be deposited
|
|
136
|
+
///
|
|
137
|
+
access(all) fun deposit(from: @{FungibleToken.Vault}) {
|
|
138
|
+
let vault <- from as! @USDCFlow.Vault
|
|
139
|
+
self.balance = self.balance + vault.balance
|
|
140
|
+
destroy vault
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// Gets an array of all the Metadata Views implemented by USDCFlow
|
|
144
|
+
///
|
|
145
|
+
/// @return An array of Types defining the implemented views. This value will be used by
|
|
146
|
+
/// developers to know which parameter to pass to the resolveView() method.
|
|
147
|
+
///
|
|
148
|
+
access(all) view fun getViews(): [Type] {
|
|
149
|
+
return USDCFlow.getContractViews(resourceType: nil)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/// Resolves Metadata Views out of the USDCFlow
|
|
153
|
+
///
|
|
154
|
+
/// @param view: The Type of the desired view.
|
|
155
|
+
/// @return A structure representing the requested view.
|
|
156
|
+
///
|
|
157
|
+
access(all) fun resolveView(_ view: Type): AnyStruct? {
|
|
158
|
+
return USDCFlow.resolveContractView(resourceType: nil, viewType: view)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
access(all) resource Minter: FlowEVMBridgeHandlerInterfaces.TokenMinter {
|
|
163
|
+
|
|
164
|
+
/// Required function for the bridge to be able to work with the Minter
|
|
165
|
+
access(all) view fun getMintedType(): Type {
|
|
166
|
+
return Type<@USDCFlow.Vault>()
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/// Function for the bridge to mint tokens that are bridged from Flow EVM
|
|
170
|
+
access(FlowEVMBridgeHandlerInterfaces.Mint) fun mint(amount: UFix64): @{FungibleToken.Vault} {
|
|
171
|
+
let newTotalSupply = USDCFlow.totalSupply + amount
|
|
172
|
+
USDCFlow.totalSupply = newTotalSupply
|
|
173
|
+
|
|
174
|
+
let vault <-create Vault(balance: amount)
|
|
175
|
+
|
|
176
|
+
emit Minted(amount: amount, mintedUUID: vault.uuid)
|
|
177
|
+
return <-vault
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/// Function for the bridge to burn tokens that are bridged back to Flow EVM
|
|
181
|
+
access(all) fun burn(vault: @{FungibleToken.Vault}) {
|
|
182
|
+
let toBurn <- vault as! @USDCFlow.Vault
|
|
183
|
+
let amount = toBurn.balance
|
|
184
|
+
|
|
185
|
+
// This function updates USDCFlow.totalSupply
|
|
186
|
+
Burner.burn(<-toBurn)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/// Sends the USDCFlow Minter to the Flow/EVM bridge
|
|
191
|
+
/// without giving any account access to the minter
|
|
192
|
+
/// before it is safely in the decentralized bridge
|
|
193
|
+
access(all) fun sendMinterToBridge(_ bridgeAddress: Address) {
|
|
194
|
+
let minter <- create Minter()
|
|
195
|
+
// borrow a reference to the bridge's configuration admin resource from public Capability
|
|
196
|
+
let bridgeAdmin = getAccount(bridgeAddress).capabilities.borrow<&FlowEVMBridgeConfig.Admin>(
|
|
197
|
+
FlowEVMBridgeConfig.adminPublicPath
|
|
198
|
+
) ?? panic("FlowEVMBridgeConfig.Admin could not be referenced from ".concat(bridgeAddress.toString()))
|
|
199
|
+
|
|
200
|
+
// sets the USDCFlow as the minter resource for all USDCFlow bridge requests
|
|
201
|
+
// prior to transferring the Minter, a TokenHandler will be set for USDCFlow during the bridge's initial
|
|
202
|
+
// configuration, setting the stage for this minter to be sent.
|
|
203
|
+
bridgeAdmin.setTokenHandlerMinter(targetType: Type<@USDCFlow.Vault>(), minter: <-minter)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/// createEmptyVault
|
|
207
|
+
///
|
|
208
|
+
/// @return The new Vault resource with a balance of zero
|
|
209
|
+
///
|
|
210
|
+
access(all) fun createEmptyVault(vaultType: Type): @Vault {
|
|
211
|
+
let r <-create Vault(balance: 0.0)
|
|
212
|
+
return <-r
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
init() {
|
|
216
|
+
self.totalSupply = 0.0
|
|
217
|
+
self.VaultStoragePath = /storage/usdcFlowVault
|
|
218
|
+
self.VaultPublicPath = /public/usdcFlowMetadata
|
|
219
|
+
self.ReceiverPublicPath = /public/usdcFlowReceiver
|
|
220
|
+
|
|
221
|
+
let minter <- create Minter()
|
|
222
|
+
self.account.storage.save(<-minter, to: /storage/usdcFlowMinter)
|
|
223
|
+
|
|
224
|
+
// Create the Vault with the total supply of tokens and save it in storage.
|
|
225
|
+
let vault <- create Vault(balance: self.totalSupply)
|
|
226
|
+
self.account.storage.save(<-vault, to: self.VaultStoragePath)
|
|
227
|
+
|
|
228
|
+
let tokenCap = self.account.capabilities.storage.issue<&USDCFlow.Vault>(self.VaultStoragePath)
|
|
229
|
+
self.account.capabilities.publish(tokenCap, at: self.ReceiverPublicPath)
|
|
230
|
+
self.account.capabilities.publish(tokenCap, at: self.VaultPublicPath)
|
|
231
|
+
}
|
|
232
|
+
}
|
package/flow.json
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"source": "./contracts/Burner.cdc",
|
|
34
34
|
"aliases": {
|
|
35
35
|
"emulator": "0xf8d6e0586b0a20c7",
|
|
36
|
-
"testnet": "
|
|
37
|
-
"mainnet": "
|
|
36
|
+
"testnet": "0x9a0766d93b6608b7",
|
|
37
|
+
"mainnet": "0xf233dcee88fe0abe"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"MetadataViews": {
|
|
@@ -61,6 +61,14 @@
|
|
|
61
61
|
"mainnet": "0xf233dcee88fe0abe"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
"FungibleTokenSwitchboard": {
|
|
65
|
+
"source": "./contracts/FungibleTokenSwitchboard.cdc",
|
|
66
|
+
"aliases": {
|
|
67
|
+
"emulator": "0xee82856bf20e2aa6",
|
|
68
|
+
"testnet": "0x9a0766d93b6608b7",
|
|
69
|
+
"mainnet": "0xf233dcee88fe0abe"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
64
72
|
"ViewResolver": {
|
|
65
73
|
"source": "./contracts/ViewResolver.cdc",
|
|
66
74
|
"aliases": {
|
|
@@ -141,8 +149,8 @@
|
|
|
141
149
|
"mainnet": "0xd8a7e05a7ac670c0"
|
|
142
150
|
}
|
|
143
151
|
},
|
|
144
|
-
"
|
|
145
|
-
"source": "./contracts/hybrid-custody/factories/
|
|
152
|
+
"NFTProviderAndCollectionFactory": {
|
|
153
|
+
"source": "./contracts/hybrid-custody/factories/NFTProviderAndCollectionFactory.cdc",
|
|
146
154
|
"aliases": {
|
|
147
155
|
"emulator": "0xf8d6e0586b0a20c7",
|
|
148
156
|
"testnet": "0x294e44e1ec6993c6",
|
|
@@ -186,7 +194,7 @@
|
|
|
186
194
|
"aliases": {
|
|
187
195
|
"emulator": "0xf8d6e0586b0a20c7",
|
|
188
196
|
"testnet": "0x8c5303eaa26202d6",
|
|
189
|
-
"mainnet": "
|
|
197
|
+
"mainnet": "0xe467b9dd11fa00df"
|
|
190
198
|
}
|
|
191
199
|
},
|
|
192
200
|
"TokenForwarding": {
|
|
@@ -346,6 +354,256 @@
|
|
|
346
354
|
"emulator": "0xf8d6e0586b0a20c7",
|
|
347
355
|
"testing": "0x0000000000000007"
|
|
348
356
|
}
|
|
357
|
+
},
|
|
358
|
+
"ContractManager": {
|
|
359
|
+
"source": "./contracts/flowty-drops/ContractManager.cdc",
|
|
360
|
+
"aliases": {
|
|
361
|
+
"testing": "0x0000000000000006",
|
|
362
|
+
"testnet": "0x772a10c786851a1b",
|
|
363
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"ContractInitializer": {
|
|
367
|
+
"source": "./contracts/flowty-drops/initializers/ContractInitializer.cdc",
|
|
368
|
+
"aliases": {
|
|
369
|
+
"testing": "0x0000000000000006",
|
|
370
|
+
"testnet": "0x772a10c786851a1b",
|
|
371
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"ContractBorrower": {
|
|
375
|
+
"source": "./contracts/flowty-drops/initializers/ContractBorrower.cdc",
|
|
376
|
+
"aliases": {
|
|
377
|
+
"testing": "0x0000000000000006",
|
|
378
|
+
"testnet": "0x772a10c786851a1b",
|
|
379
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"OpenEditionInitializer": {
|
|
383
|
+
"source": "./contracts/flowty-drops/initializers/OpenEditionInitializer.cdc",
|
|
384
|
+
"aliases": {
|
|
385
|
+
"testing": "0x0000000000000006",
|
|
386
|
+
"testnet": "0x772a10c786851a1b",
|
|
387
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"BaseCollection": {
|
|
391
|
+
"source": "./contracts/flowty-drops/nft/BaseCollection.cdc",
|
|
392
|
+
"aliases": {
|
|
393
|
+
"testing": "0x0000000000000006",
|
|
394
|
+
"testnet": "0x772a10c786851a1b",
|
|
395
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"ContractFactoryTemplate": {
|
|
399
|
+
"source": "./contracts/flowty-drops/nft/ContractFactoryTemplate.cdc",
|
|
400
|
+
"aliases": {
|
|
401
|
+
"testing": "0x0000000000000006",
|
|
402
|
+
"testnet": "0x772a10c786851a1b",
|
|
403
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"ContractFactory": {
|
|
407
|
+
"source": "./contracts/flowty-drops/nft/ContractFactory.cdc",
|
|
408
|
+
"aliases": {
|
|
409
|
+
"testing": "0x0000000000000006",
|
|
410
|
+
"testnet": "0x772a10c786851a1b",
|
|
411
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"OpenEditionTemplate": {
|
|
415
|
+
"source": "./contracts/flowty-drops/nft/OpenEditionTemplate.cdc",
|
|
416
|
+
"aliases": {
|
|
417
|
+
"testing": "0x0000000000000006",
|
|
418
|
+
"testnet": "0x772a10c786851a1b",
|
|
419
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"UniversalCollection": {
|
|
423
|
+
"source": "./contracts/flowty-drops/nft/UniversalCollection.cdc",
|
|
424
|
+
"aliases": {
|
|
425
|
+
"testing": "0x0000000000000006",
|
|
426
|
+
"testnet": "0x772a10c786851a1b",
|
|
427
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"BaseNFT": {
|
|
431
|
+
"source": "./contracts/flowty-drops/nft/BaseNFT.cdc",
|
|
432
|
+
"aliases": {
|
|
433
|
+
"testing": "0x0000000000000006",
|
|
434
|
+
"testnet": "0x772a10c786851a1b",
|
|
435
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"NFTMetadata": {
|
|
439
|
+
"source": "./contracts/flowty-drops/nft/NFTMetadata.cdc",
|
|
440
|
+
"aliases": {
|
|
441
|
+
"testing": "0x0000000000000006",
|
|
442
|
+
"testnet": "0x772a10c786851a1b",
|
|
443
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"FlowtyDrops": {
|
|
447
|
+
"source": "./contracts/flowty-drops/FlowtyDrops.cdc",
|
|
448
|
+
"aliases": {
|
|
449
|
+
"testing": "0x0000000000000006",
|
|
450
|
+
"testnet": "0x772a10c786851a1b",
|
|
451
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"DropFactory": {
|
|
455
|
+
"source": "./contracts/flowty-drops/DropFactory.cdc",
|
|
456
|
+
"aliases": {
|
|
457
|
+
"testing": "0x0000000000000006",
|
|
458
|
+
"testnet": "0x772a10c786851a1b",
|
|
459
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"FlowtyActiveCheckers": {
|
|
463
|
+
"source": "./contracts/flowty-drops/FlowtyActiveCheckers.cdc",
|
|
464
|
+
"aliases": {
|
|
465
|
+
"testing": "0x0000000000000006",
|
|
466
|
+
"testnet": "0x772a10c786851a1b",
|
|
467
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"FlowtyPricers": {
|
|
471
|
+
"source": "./contracts/flowty-drops/FlowtyPricers.cdc",
|
|
472
|
+
"aliases": {
|
|
473
|
+
"testing": "0x0000000000000006",
|
|
474
|
+
"testnet": "0x772a10c786851a1b",
|
|
475
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"FlowtyAddressVerifiers": {
|
|
479
|
+
"source": "./contracts/flowty-drops/FlowtyAddressVerifiers.cdc",
|
|
480
|
+
"aliases": {
|
|
481
|
+
"testing": "0x0000000000000006",
|
|
482
|
+
"testnet": "0x772a10c786851a1b",
|
|
483
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"DropTypes": {
|
|
487
|
+
"source": "./contracts/flowty-drops/DropTypes.cdc",
|
|
488
|
+
"aliases": {
|
|
489
|
+
"testing": "0x0000000000000006",
|
|
490
|
+
"testnet": "0x934da91a977f1ac4",
|
|
491
|
+
"emulator": "0xf8d6e0586b0a20c7"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"CapabilityCache": {
|
|
495
|
+
"source": "./contracts/capability-cache/CapabilityCache.cdc",
|
|
496
|
+
"aliases": {
|
|
497
|
+
"testing": "0x0000000000000007",
|
|
498
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
499
|
+
"testnet": "0x83d75469f66d2ee6",
|
|
500
|
+
"mainnet": "0xacc5081c003e24cf"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"FungibleTokenRouter": {
|
|
504
|
+
"source": "./contracts/fungible-token-router/FungibleTokenRouter.cdc",
|
|
505
|
+
"aliases": {
|
|
506
|
+
"testing": "0x0000000000000007",
|
|
507
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
508
|
+
"testnet": "0x83231f90a288bc35",
|
|
509
|
+
"mainnet": "0x707c0b39a8d689cb"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"EVM": {
|
|
513
|
+
"source": "./contracts/evm/EVM.cdc",
|
|
514
|
+
"aliases": {
|
|
515
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
516
|
+
"testnet": "0x8c5303eaa26202d6",
|
|
517
|
+
"mainnet": "0xe467b9dd11fa00df"
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"FlowEVMBridgeConfig": {
|
|
521
|
+
"source": "./contracts/evm/FlowEVMBridgeConfig.cdc",
|
|
522
|
+
"aliases": {
|
|
523
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
524
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
525
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"FlowEVMBridgeHandlerInterfaces": {
|
|
529
|
+
"source": "./contracts/evm/FlowEVMBridgeHandlerInterfaces.cdc",
|
|
530
|
+
"aliases": {
|
|
531
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
532
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
533
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"FlowEVMBridgeHandlers": {
|
|
537
|
+
"source": "./contracts/evm/FlowEVMBridgeHandlers.cdc",
|
|
538
|
+
"aliases": {
|
|
539
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
540
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
541
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"IBridgePermissions": {
|
|
545
|
+
"source": "./contracts/evm/IBridgePermissions.cdc",
|
|
546
|
+
"aliases": {
|
|
547
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
548
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
549
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"Serialize": {
|
|
553
|
+
"source": "./contracts/evm/Serialize.cdc",
|
|
554
|
+
"aliases": {
|
|
555
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
556
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
557
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"SerializeMetadata": {
|
|
561
|
+
"source": "./contracts/evm/SerializeMetadata.cdc",
|
|
562
|
+
"aliases": {
|
|
563
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
564
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
565
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"ICrossVM": {
|
|
569
|
+
"source": "./contracts/evm/ICrossVM.cdc",
|
|
570
|
+
"aliases": {
|
|
571
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
572
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
573
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"ICrossVMAsset": {
|
|
577
|
+
"source": "./contracts/evm/ICrossVMAsset.cdc",
|
|
578
|
+
"aliases": {
|
|
579
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
580
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
581
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"CrossVMNFT": {
|
|
585
|
+
"source": "./contracts/evm/CrossVMNFT.cdc",
|
|
586
|
+
"aliases": {
|
|
587
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
588
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
589
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"FlowEVMBridgeUtils": {
|
|
593
|
+
"source": "./contracts/evm/FlowEVMBridgeUtils.cdc",
|
|
594
|
+
"aliases": {
|
|
595
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
596
|
+
"mainnet": "0x1e4aa0b87d10b141",
|
|
597
|
+
"testnet": "0xdfc20aee650fcbdf"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"USDCFlow": {
|
|
601
|
+
"source": "./contracts/tokens/USDCFlow.cdc",
|
|
602
|
+
"aliases": {
|
|
603
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
604
|
+
"testnet": "0x64adf39cbc354fcb",
|
|
605
|
+
"mainnet": "0xf1ab99c82dee3526"
|
|
606
|
+
}
|
|
349
607
|
}
|
|
350
608
|
},
|
|
351
609
|
"deployments": {
|
|
@@ -377,11 +635,24 @@
|
|
|
377
635
|
"FindViews",
|
|
378
636
|
"FLOAT",
|
|
379
637
|
"ExampleNFT",
|
|
380
|
-
"ExampleToken"
|
|
638
|
+
"ExampleToken",
|
|
639
|
+
"HybridCustody",
|
|
640
|
+
"CapabilityFactory",
|
|
641
|
+
"CapabilityDelegator",
|
|
642
|
+
"CapabilityFilter",
|
|
643
|
+
"FTAllFactory",
|
|
644
|
+
"FTBalanceFactory",
|
|
645
|
+
"FTProviderFactory",
|
|
646
|
+
"FTReceiverFactory",
|
|
647
|
+
"NFTCollectionPublicFactory",
|
|
648
|
+
"NFTProviderAndCollectionFactory",
|
|
649
|
+
"NFTProviderFactory",
|
|
650
|
+
"USDCFlow"
|
|
381
651
|
],
|
|
382
652
|
"emulator-ft": [
|
|
383
653
|
"FungibleToken",
|
|
384
|
-
"FungibleTokenMetadataViews"
|
|
654
|
+
"FungibleTokenMetadataViews",
|
|
655
|
+
"FungibleTokenSwitchboard"
|
|
385
656
|
],
|
|
386
657
|
"emulator-flowtoken": [
|
|
387
658
|
"FlowToken"
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "CapabilityFactory"
|
|
2
|
-
import "NonFungibleToken"
|
|
3
|
-
|
|
4
|
-
pub contract NFTProviderAndCollectionFactory {
|
|
5
|
-
pub struct Factory: CapabilityFactory.Factory {
|
|
6
|
-
pub fun getCapability(acct: &AuthAccount, path: CapabilityPath): Capability {
|
|
7
|
-
return acct.getCapability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(path)
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|