TransactionSEALED
█%^○◆╱$~&◆▓╳◆○■╲^█▪○$^&▫◇&◇#○▒╳&░░#▒▓▪█$▪■╲#●□▒╳╳#$?█□?○▒◆□■▒@●$
Transaction ID
Execution Fee
0.000001 FLOWTransaction Summary
Contract Call
Called TopShot, FlowToken, FungibleToken +5 more
Script Arguments
0publicKeys[[UInt8]]
[
[
"248",
"71",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"130",
"3",
"232"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
],
[
"248",
"69",
"184",
"64",
"191",
"59",
"145",
"186",
"185",
"48",
"231",
"35",
"72",
"101",
"150",
"66",
"120",
"31",
"228",
"119",
"71",
"236",
"3",
"6",
"228",
"88",
"74",
"53",
"164",
"224",
"56",
"237",
"89",
"139",
"150",
"164",
"245",
"229",
"123",
"144",
"129",
"5",
"108",
"7",
"110",
"104",
"164",
"96",
"222",
"93",
"71",
"202",
"195",
"213",
"125",
"224",
"75",
"240",
"91",
"228",
"191",
"72",
"133",
"221",
"18",
"164",
"30",
"48",
"2",
"1",
"128"
]
]Cadence Script
1import TopShot from 0x0b2a3299cc857e29
2import FlowToken from 0x1654653399040a61
3import FungibleToken from 0xf233dcee88fe0abe
4import TokenForwarding from 0xe544175ee0461c4b
5import DapperUtilityCoin from 0xead892083b3e2c6c
6import FlowUtilityToken from 0xead892083b3e2c6c
7import PrivateReceiverForwarder from 0x18eb4ee6b3c026d2
8import NonFungibleToken from 0x1d7e57aa55817448
9import PackNFT, AllDay from 0xe4cf4bdc1751c65d
10
11// This transaction is used to create a user's Flow account, initializing it with a key that we control,
12// a TopShot moment collection and receiver, and a FlowToken receiver that forwards tokens to Dapper.
13transaction(publicKeys: [[UInt8]]) {
14 prepare(dapperPayer: AuthAccount) {
15 // Pay for the account creation with the Dapper payer
16 let acct = AuthAccount(payer: dapperPayer)
17
18 for key in publicKeys {
19 acct.addPublicKey(key)
20 }
21
22 let collection <- TopShot.createEmptyCollection()
23 // Put a new Collection in storage
24 acct.save(<-collection, to: /storage/MomentCollection)
25
26 // create a public capability for the collection
27 acct.link<&{NonFungibleToken.CollectionPublic,
28 NonFungibleToken.Receiver,
29 MetadataViews.ResolverCollection,
30 TopShot.MomentCollectionPublic}>(
31 /public/MomentCollection, target: /storage/MomentCollection
32 )
33
34 acct.save(<-AllDay.createEmptyCollection(), to: AllDay.CollectionStoragePath)
35
36 // create a public capability for the collection
37 acct.link<&AllDay.Collection{NonFungibleToken.CollectionPublic,
38 NonFungibleToken.Receiver,
39 MetadataViews.ResolverCollection,
40 AllDay.MomentNFTCollectionPublic}>(
41 AllDay.CollectionPublicPath,
42 target: AllDay.CollectionStoragePath
43 )
44
45 acct.save(<-PackNFT.createEmptyCollection(), to: PackNFT.CollectionStoragePath);
46
47 // create a public capability for the NFLAD PackNFT collection
48 acct.link<&{NonFungibleToken.CollectionPublic}>(PackNFT.CollectionPublicPath, target: PackNFT.CollectionStoragePath)
49
50
51 // Destroy Dapper user's FLOW token receiver
52 acct.unlink(/public/flowTokenReceiver)
53
54 // Create a private receiver
55 acct.link<&{FungibleToken.Receiver}>(
56 /private/flowTokenReceiver,
57 target: /storage/flowTokenVault
58 )
59 let receiverCapability = acct.getCapability<&{FungibleToken.Receiver}>(/private/flowTokenReceiver)
60
61 // Use the private receiver to create a private forwarder
62 let forwarder <- PrivateReceiverForwarder.createNewForwarder(recipient: receiverCapability)
63
64 acct.save(<-forwarder, to: PrivateReceiverForwarder.PrivateReceiverStoragePath)
65
66 acct.link<&PrivateReceiverForwarder.Forwarder>(
67 PrivateReceiverForwarder.PrivateReceiverPublicPath,
68 target: PrivateReceiverForwarder.PrivateReceiverStoragePath
69 )
70
71 // Get a Receiver reference for the Dapper account that will be the recipient of the forwarded DUC
72 let dapper = getAccount(0xead892083b3e2c6c)
73 let dapperDUCReceiver = dapper.getCapability(/public/dapperUtilityCoinReceiver)!
74
75 // Create a new Forwarder resource for DUC and store it in the new account's storage
76 let ducForwarder <- TokenForwarding.createNewForwarder(recipient: dapperDUCReceiver)
77 acct.save(<-ducForwarder, to: /storage/dapperUtilityCoinReceiver)
78
79 // Publish a Receiver capability for the new account, which is linked to the DUC Forwarder
80 acct.link<&DapperUtilityCoin.Vault{FungibleToken.Receiver}>(
81 /public/dapperUtilityCoinReceiver,
82 target: /storage/dapperUtilityCoinReceiver
83 )
84
85 // FUT Setup
86 let dapperFUTReceiver = dapper.getCapability(/public/flowUtilityTokenReceiver)!
87
88 let futForwarder <- TokenForwarding.createNewForwarder(recipient: dapperFUTReceiver)
89 acct.save(<-futForwarder, to: /storage/flowUtilityTokenReceiver)
90
91 acct.link<&FlowUtilityToken.Vault{FungibleToken.Receiver}>(
92 /public/flowUtilityTokenReceiver,
93 target: /storage/flowUtilityTokenReceiver
94 )
95 }
96}