Skip to content

Commit 5e44c67

Browse files
Aliseragpeterargue
andauthored
docs: flag pre-Cadence 1.0 syntax in fcl.mutate example (#2807)
The transaction snippet in the fcl.mutate example uses AuthAccount, account.borrow, and a private path — all replaced in Cadence 1.0 with auth(...) &Account, account.storage.borrow, and storage-only paths. This commit only adds a note calling out the discrepancy; rewriting the snippet requires knowing the current Profile demo contract's storage path, which is outside this README's scope. Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
1 parent 1810308 commit 5e44c67

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ const result = await fcl.query({
118118
console.log(result); // 13
119119
```
120120
- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.
121+
122+
> **Note:** The Cadence snippet below uses pre-1.0 syntax (`AuthAccount`, `account.borrow`, private paths). Cadence 1.0 replaced these with `auth(...) &Account`, `account.storage.borrow`, and storage-only paths. This example has not yet been updated — refer to the [Cadence migration guide](https://cadence-lang.org/docs/cadence-migration-guide) when writing new transactions.
123+
121124
```js
122125
import * as fcl from "@onflow/fcl";
123126
// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction

0 commit comments

Comments
 (0)