FT TransferSEALED
*░○●~▓■%╱%█■@*▓?■@░▒▪●~◇@▓▫░*█▪?○▓▓■◇╲!╳▪*░&$!▫◆#%?%○╲■$■&╱▒*█▫▓
Transaction ID
Execution Fee
0.0015 FLOWTransaction Summary
FT TransferCalled aiSportsEscrow, FungibleToken, FastBreakEscrow
Script Arguments
0escrowAddressAddress
1escrowIDUInt64
539
Cadence Script
1import aiSportsEscrow from 0x4fdb077419808080
2import FungibleToken from 0xf233dcee88fe0abe
3
4import FastBreakEscrow from 0x254b32edc33e5bc3
5
6transaction (escrowAddress: Address, escrowID: UInt64) { //Remove winners - do this in close TX
7
8 let closerCollectionRef: auth(aiSportsEscrow.LeagueOwner) &aiSportsEscrow.EscrowCloserCollection
9 let overflowAccount: Address
10 let escrowAdmin: &FastBreakEscrow.FBEscrowAdmin
11
12 prepare(acct: auth(BorrowValue) &Account) {
13 self.escrowAdmin = acct.storage.borrow<&FastBreakEscrow.FBEscrowAdmin>(from: FastBreakEscrow.EscrowAdminStoragePath) ?? panic("Could not borrow a reference to the EscrowAdmin")
14 self.overflowAccount = acct.address
15 self.closerCollectionRef = acct.storage.borrow<auth(aiSportsEscrow.LeagueOwner) &aiSportsEscrow.EscrowCloserCollection>(from: StoragePath(identifier: "aiSportsEscrowCloserCollection")!) ?? panic("couldn't find EscrowCloser Resource")
16 }
17
18 execute {
19
20 log("Escrow Closed")
21 let winners = self.escrowAdmin.closeFBEscrow(escrowAddress: escrowAddress, escrowID: escrowID)
22 self.closerCollectionRef.closeEscrowGeneric(escrowID: escrowID, winners: winners, path: nil, overflow: self.overflowAccount) //nil path means the escrow contains Flow Tokens
23
24 }
25}