TransactionSEALED

^◆@&○?○●!~╱&╳░╱*▪□╳!◇◇██@░╲?░█■#○█□&░▫▓◆●%%▒#◆▒╱?#╲╳▒$%╲&◇╱?●█*$

Transaction ID

Timestamp

Sep 05, 2024, 12:47:02 PM UTC
1y ago

Block Height

86,041,824

Computation

0

Proposerseq:1573 key:0

Authorizers

1

Transaction Summary

Transaction

Script Arguments

0amountUFix64
20.00000000

Cadence Script

1import FungibleToken from 0xf233dcee88fe0abe
2import FazeUtilityCoin from 0x4eded0de73020ca5
3
4// This transaction is a template for a transaction that
5// could be used by anyone to send tokens to another account
6// that has been set up to receive tokens.
7//
8// The withdraw amount and the account from getAccount
9// would be the parameters to the transaction
10
11transaction(amount: UFix64, to: Address) {
12
13    // The Vault resource that holds the tokens that are being transferred
14    let sentVault: @{FungibleToken.Vault}
15
16    prepare(signer: auth(BorrowValue) &Account) {
17
18        // Get a reference to the signer's stored vault
19        let vaultRef = signer.storage.borrow<auth(FungibleToken.Withdraw) &FazeUtilityCoin.Vault>(from: FazeUtilityCoin.VaultStoragePath)
20			?? panic("Could not borrow reference to the owner's Vault!")
21
22        // Withdraw tokens from the signer's stored vault
23        self.sentVault <- vaultRef.withdraw(amount: amount)
24    }
25
26    execute {
27
28        // Get the recipient's public account object
29        let recipient = getAccount(to)
30
31        // Get a reference to the recipient's Receiver
32        let receiverRef = recipient.capabilities
33        .borrow<&{FungibleToken.Receiver}>(FazeUtilityCoin.ReceiverPublicPath)
34			?? panic("Could not borrow receiver reference to the recipient's Vault")
35
36        // Deposit the withdrawn tokens in the recipient's receiver
37        receiverRef.deposit(from: <-self.sentVault)
38    }
39}