@flowtyio/flow-contracts 0.1.0-beta.1 → 0.1.0-beta.3
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/contracts/example/ExampleNFT.cdc +422 -0
- package/contracts/example/ExampleToken.cdc +235 -0
- package/contracts/lost-and-found/FeeEstimator.cdc +14 -22
- package/contracts/lost-and-found/LostAndFound.cdc +185 -177
- package/contracts/lost-and-found/LostAndFoundHelper.cdc +12 -12
- package/flow.json +17 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "LostAndFound"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
access(all) contract LostAndFoundHelper {
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
access(all) struct Ticket {
|
|
6
6
|
|
|
7
7
|
// An optional message to attach to this item.
|
|
8
|
-
|
|
8
|
+
access(all) let memo: String?
|
|
9
9
|
// The address that it allowed to withdraw the item fromt this ticket
|
|
10
|
-
|
|
10
|
+
access(all) let redeemer: Address
|
|
11
11
|
//The type of the resource (non-optional) so that bins can represent the true type of an item
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
access(all) let type: Type
|
|
13
|
+
access(all) let typeIdentifier: String
|
|
14
14
|
// State maintained by LostAndFound
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
access(all) let redeemed: Bool
|
|
16
|
+
access(all) let name : String?
|
|
17
|
+
access(all) let description : String?
|
|
18
|
+
access(all) let thumbnail : String?
|
|
19
|
+
access(all) let ticketID : UInt64?
|
|
20
20
|
|
|
21
21
|
init(_ ticket: &LostAndFound.Ticket, id: UInt64?) {
|
|
22
22
|
self.memo = ticket.memo
|
|
@@ -32,7 +32,7 @@ pub contract LostAndFoundHelper {
|
|
|
32
32
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
access(all) fun constructResult(_ ticket: &LostAndFound.Ticket?, id:UInt64?) : LostAndFoundHelper.Ticket? {
|
|
36
36
|
if ticket != nil {
|
|
37
37
|
return LostAndFoundHelper.Ticket(ticket!, id: id)
|
|
38
38
|
}
|
package/flow.json
CHANGED
|
@@ -323,6 +323,20 @@
|
|
|
323
323
|
"mainnet": "0x2d4c3caffbeab845",
|
|
324
324
|
"testnet": "0x4d47bf3ce5e4393f"
|
|
325
325
|
}
|
|
326
|
+
},
|
|
327
|
+
"ExampleNFT": {
|
|
328
|
+
"source": "./contracts/example/ExampleNFT.cdc",
|
|
329
|
+
"aliases": {
|
|
330
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
331
|
+
"testing": "0x0000000000000007"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"ExampleToken": {
|
|
335
|
+
"source": "./contracts/example/ExampleToken.cdc",
|
|
336
|
+
"aliases": {
|
|
337
|
+
"emulator": "0xf8d6e0586b0a20c7",
|
|
338
|
+
"testing": "0x0000000000000007"
|
|
339
|
+
}
|
|
326
340
|
}
|
|
327
341
|
},
|
|
328
342
|
"deployments": {
|
|
@@ -351,7 +365,9 @@
|
|
|
351
365
|
"ScopedNFTProviders",
|
|
352
366
|
"ScopedFTProviders",
|
|
353
367
|
"FindViews",
|
|
354
|
-
"FLOAT"
|
|
368
|
+
"FLOAT",
|
|
369
|
+
"ExampleNFT",
|
|
370
|
+
"ExampleToken"
|
|
355
371
|
],
|
|
356
372
|
"emulator-ft": [
|
|
357
373
|
"FungibleToken",
|