Giovanni S | Flow (2023-09-21)
Reposting a question I ended up finding the answer to on my own so others can reference when updating to Cadence 1.0:
In Cadence 1.0, what's the equivalent ofRealized I had to statically type the entitled reference -getAuthAccount()
for use in scripts - is there one? I triedlet account: auth(Storage) &Account = getAccount(address)
, but looks likegetAccount(address)
returns non-auth&Account
let account = getAuthAccount<auth(Storage) &Account>(address)
3 Replies
I've created a thread for your message. Please continue any relevant discussion in this thread.
You can rename this thread using
/title <new title>
If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadenceNew docs are at: https://developers.flow.com/next/cadence/language/accounts#performing-write-operations
Accounts | Flow Developer Portal
The type Account provides access to accounts,
Basically, one has to specifically say what kind of auth reference one wants to have. Before there were only fully authorized account references, now the access is more granular (with entitlements)