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
4.**Recipient address:** The address that will receive the rewards (`recipient`).
37
40
5.**Reward distribution data access:** You must be able to fetch per-epoch `reward-distribution-data-tuples.json` from the official distribution locations on GitHub or GitLab.
38
41
6.**Wrap option:**`wrapRewards` is `true` unless explicitly set to `false`, i.e. on Flare Mainnet you will receive `WFLR`.
@@ -332,6 +335,60 @@ await tx.wait();
332
335
console.log("Confirmed:", tx.hash);
333
336
```
334
337
338
+
### 7. Claim staking rewards
339
+
340
+
:::tip
341
+
342
+
You can also claim staking rewards via the [Flare Portal](https://portal.flare.network/) or using the [flare-tx-sdk](/network/flare-tx-sdk).
Copy file name to clipboardExpand all lines: docs/network/guides/flare-for-react-developers.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This guide is for React developers who want to interact with Flare using [Wagmi]
22
22
23
23
The package provides two ways to read and write Flare contracts:
24
24
25
-
-**Generic hooks:** use Wagmi's [`useReadContract`](https://wagmi.sh/react/hooks/useReadContract) with typed ABIs imported from the Flare Wagmi Periphery package.
25
+
-**Generic hooks:** use Wagmi's [`useReadContract`](https://wagmi.sh/react/api/hooks/useReadContract) with typed ABIs imported from the Flare Wagmi Periphery package.
26
26
-**Contract-specific hooks:** use auto-generated hooks like `useReadIFlareContractRegistry` that already know the ABI.
27
27
28
28
In this guide, you will set up a React project, configure Wagmi for Flare, and query the [`WNat`](/network/solidity-reference/IWNat) contract address from the [`FlareContractRegistry`](/network/solidity-reference/IFlareContractRegistry) using both approaches.
@@ -95,7 +95,7 @@ The example below queries the [`FlareContractRegistry`](/network/solidity-refere
95
95
96
96
It demonstrates both approaches to query the contract data:
97
97
98
-
-**Generic hooks:** use Wagmi's [`useReadContract`](https://wagmi.sh/react/hooks/useReadContract) with typed ABIs imported from the Flare Wagmi Periphery package.
98
+
-**Generic hooks:** use Wagmi's [`useReadContract`](https://wagmi.sh/react/api/hooks/useReadContract) with typed ABIs imported from the Flare Wagmi Periphery package.
99
99
-**Contract-specific hooks:** use auto-generated hooks like `useReadIFlareContractRegistry` that already know the ABI.
100
100
101
101
```typescript title="src/WNatQuery.tsx"
@@ -190,7 +190,7 @@ The app will query the [`FlareContractRegistry`](/network/solidity-reference/IFl
190
190
191
191
### Generic hooks
192
192
193
-
The generic approach uses the [`useReadContract`](https://wagmi.sh/react/hooks/useReadContract) hook from Wagmi.
193
+
The generic approach uses the [`useReadContract`](https://wagmi.sh/react/api/hooks/useReadContract) hook from Wagmi.
194
194
You import the typed ABI (`iFlareContractRegistryAbi`) from the package and pass it as the `abi` prop.
195
195
This gives you complete type safety for `functionName` and `args`.
0 commit comments