You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/getting-started/fcl-quickstart.md
+62-53Lines changed: 62 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,34 +131,33 @@ This will start the [Dev Wallet] on `http://localhost:8701`, which you'll use fo
131
131
[**@onflow/kit**] provides a `FlowProvider` component that sets up the Flow Client Library configuration. In Next.js using the App Router, add or update your `src/app/layout.tsx` as follows:
### Integrating Authentication and Building the Complete UI
284
287
285
-
Finally, integrate the query, mutation, and transaction status hooks with authentication using `useCurrentFlowUser`. Combine all parts to build the complete page.
286
-
287
-
```jsx
288
-
// src/app/page.js
288
+
Finally, integrate the query, mutation, and transaction status hooks with authentication using `useFlowCurrentUser`. Combine all parts to build the complete page.
-**Step 2** sends a transaction to increment the counter and stores the transaction ID.
408
411
-**Step 3** subscribes to transaction status updates using the stored transaction ID and uses a `useEffect` hook to automatically refetch the updated count when the transaction is sealed (status code 4).
409
-
- **Step 4** integrates authentication via `useCurrentFlowUser` and combines all the pieces into a single user interface.
412
+
-**Step 4** integrates authentication via `useFlowCurrentUser` and combines all the pieces into a single user interface.
410
413
411
414
:::tip
412
415
@@ -430,6 +433,12 @@ Log out, and log back in selecting the Dev Wallet instead of the Flow Wallet.
430
433
431
434
:::
432
435
436
+
:::warning
437
+
438
+
For your app to connect with contracts deployed on the emulator, you need to have completed [Step 1: Contract Interaction] and [Step 2: Local Development].
439
+
440
+
:::
441
+
433
442
Then visit [http://localhost:3000](http://localhost:3000) in your browser. You should see:
434
443
435
444
- The current counter value displayed (formatted with commas using `NumberFormatter`).
@@ -442,7 +451,7 @@ Then visit [http://localhost:3000](http://localhost:3000) in your browser. You s
442
451
By following these steps, you've built a simple Next.js dApp that interacts with a Flow smart contract using [**@onflow/kit**]. In this guide you learned how to:
443
452
444
453
- Wrap your application in a `FlowProvider` to configure blockchain connectivity.
445
-
- Use kit hooks such as `useFlowQuery`, `useFlowMutate`, `useFlowTransactionStatus`, and `useCurrentFlowUser` to manage authentication, query on-chain data, submit transactions, and monitor their status.
454
+
- Use kit hooks such as `useFlowQuery`, `useFlowMutate`, `useFlowTransactionStatus`, and `useFlowCurrentUser` to manage authentication, query on-chain data, submit transactions, and monitor their status.
446
455
- Integrate with the local Flow emulator and Dev Wallet for a fully functional development setup.
447
456
448
457
For additional details and advanced usage, refer to the [@onflow/kit documentation] and other Flow developer resources.
Visit the [Flow Faucet] and follow the instructions to add testnet funds. Compared to other networks, the [Flow Faucet] grants a vast amount of tokens - enough gas for millions of transactions.
253
253
254
+
:::warning
255
+
256
+
EVM accounts created by the [Flow Wallet] are [Cadence-Owned Accounts], or COAs - **Not** EOAs. COAs have many advantages over EOAs, but they are generated differently, which means they don't have a key that's compatible with Hardhat.
257
+
258
+
Use your [MetaMask] or similar EOA account to deploy contracts on Flow EVM.
259
+
260
+
:::
261
+
254
262
### Deploy the Contract
255
263
256
264
Deploy the contract with:
@@ -354,3 +362,4 @@ Ready to unlock the full potential of Flow EVM? Start with our [Batched Transact
0 commit comments