File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ transaction {
9
9
var temporaryVault : @ExampleToken .Vault
10
10
11
11
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> (
14
14
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
+
17
17
// Withdraw 10 tokens into the temporary Vault
18
18
self .temporaryVault <- vaultRef.withdraw (amount : 10 .0 )
19
19
}
You can’t perform that action at this time.
0 commit comments