Whoops! 😨 Something unexpected happened...
[Error Code: 1101] error caused by: 1 error occurred:
* transaction preprocess failed: [Error Code: 1101] cadence runtime error: Execution failed:
error: invalid use of interface as type
--> 04b01e081baa06af99f7e313891a704beb72442a89a2b725b80eda5e1e91f635:6:18
|
6 | let vaultRef: &FungibleToken.Vault
| ^^^^^^^^^^^^^^^^^^^^ got `&FungibleToken.Vault`; consider using `&{FungibleToken.Vault}`
error: cannot find type in this scope: `AuthAccount`
--> 04b01e081baa06af99f7e313891a704beb72442a89a2b725b80eda5e1e91f635:11:20
|
11 | prepare(signer: AuthAccount) {
| ^^^^^^^^^^^ not found in this scope
error: value of type `&Account` has no member `getCapability`
--> 04b01e081baa06af99f7e313891a704beb72442a89a2b725b80eda5e1e91f635:33:55
|
33 | let receiverRef = getAccount(addresses[i]).getCapability(/public/flowTokenReceiver)!.borrow<&{FungibleToken.Receiver}>()
| ^^^^^^^^^^^^^ unknown member
error: cannot access `withdraw`: function requires `Withdraw` authorization, but reference is unauthorized
--> 04b01e081baa06af99f7e313891a704beb72442a89a2b725b80eda5e1e91f635:37:29
|
37 | let sentVault <- self.vaultRef.withdraw(amount: amounts[i]!)
| ^^^^^^^^^^^^^^^^^^^^^^