Skip to content

Commit cfdf636

Browse files
committed
Debug tx
1 parent 7ad0e08 commit cfdf636

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cadence/transactions/withdraw_token.cdc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ transaction {
99
var temporaryVault: @ExampleToken.Vault
1010

1111
prepare(acct: auth(Storage, Capabilities) &Account) {
12-
// Borrow a reference to the sender's Vault from storage
13-
let vaultRef = acct.storage.borrow<&ExampleToken.Vault>(
12+
// Borrow a reference to the sender's Vault with the Withdraw entitlement
13+
let vaultRef = acct.storage.borrow<auth(Withdraw) &ExampleToken.Vault>(
1414
from: /storage/MainVault
15-
) ?? panic("Could not borrow a reference to the sender's Vault")
16-
15+
) ?? panic("Could not borrow a reference to the sender's Vault with Withdraw entitlement")
16+
1717
// Withdraw 10 tokens into the temporary Vault
1818
self.temporaryVault <- vaultRef.withdraw(amount: 10.0)
1919
}

0 commit comments

Comments
 (0)