Skip to content

Commit de32610

Browse files
chore(docs): wholesale refresh (#1384)
2 parents a2d24ab + daf72a9 commit de32610

152 files changed

Lines changed: 2690 additions & 2165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/2-run-node.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ You can track validator status, uptime, and software versions on the [Flare Vali
6868

6969
Runs alongside a Validator to provide crucial data for Flare's FTSO and FDC protocols.
7070
Required for full reward eligibility.
71-
Requires a running [Validator Node](#validator-node). To set up a Flare Entity:
71+
Requires a running [Validator Node](#validator-node).
72+
To set up a Flare Entity:
7273

7374
<DocCardList
7475
items={[

docs/fassets/developer-guides/1-fassets-asset-manager-address-contracts-registry.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ sidebar_position: 1
88
---
99

1010
import ExploringAdditionalParameters from "./_exploring-additional-parameters.mdx";
11+
import MainnetNote from "./_mainnet-note.mdx";
12+
13+
<MainnetNote />
1114

1215
## Overview
1316

docs/fassets/developer-guides/11-fassets-redeem.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ main().catch((error) => {
252252
To run the script, use the [Flare Hardhat Starter Kit](/network/guides/hardhat-foundry-starter-kit) with the following command:
253253

254254
```bash
255-
npx hardhat run scripts/fassets/getLotSize.ts --network coston2
255+
yarn hardhat run scripts/fassets/redeem.ts --network coston2
256256
```
257257

258258
Once the script is executed, two events hold the important information:
@@ -293,9 +293,9 @@ RedemptionRequested Result {
293293

294294
When decoding an event, the most important data from the event is:
295295

296-
- The agent vault address that will redeem the FAssets is `0x3c831Fe4417bEFFAc721d24996985eE2dd627053`;
296+
- The agent vault address that will redeem the FAssets is `0xaADbF766Fd9131996C7B270A0cCB2b5c88Fc810D`;
297297
- The redeemer address is `0xCA7C9fBbA56E44C508bcb4872775c5fEd169cDb3`;
298-
- The redemption ticket id is `1898730`;
298+
- The redemption ticket id is `1628`;
299299
- The underlying chain address is `rSHYuiEvsYsKR8uUHhBTuGP5zjRcGt4nm`;
300300
- The amount of FAssets to redeem is `20000000`;
301301
- The redemption fee is `20000`;
@@ -322,9 +322,9 @@ RedemptionTicketUpdated Result {
322322

323323
Once decoding the most important data from the event is:
324324

325-
- The agent vault address that will redeem the FAssets is `0x3c831Fe4417bEFFAc721d24996985eE2dd627053`;
326-
- The redemption ticket id is `870`;
327-
- The value of the redemption ticket in underlying chain currency is `3440000000` (partially redeemed).
325+
- The agent vault address that will redeem the FAssets is `0xaADbF766Fd9131996C7B270A0cCB2b5c88Fc810D`;
326+
- The redemption ticket id is `1628`;
327+
- The value of the redemption ticket in underlying chain currency is `5360000000` (partially redeemed).
328328

329329
You can read the full event description [here](/fassets/reference/IAssetManagerEvents#redemptionticketupdated).
330330

docs/fassets/developer-guides/12-fassets-swap-redeem.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ To execute the swap and redeem process, you need to deploy the smart contract in
117117

118118
- **4. Approve Tokens**
119119
- Uses the ERC-20 `approve` method to allow the contract to spend WCFLR.
120+
The approved allowance must cover `amountIn` (the WCFLR being spent), not `amountOut` (the FXRP received).
121+
The current starter script over-approves on `amountOut`; a follow-up starter PR will switch it to `amountIn`.
120122
:::warning
121123
In a production environment, you should use a secure method to approve spending the tokens.
122124
:::
@@ -129,7 +131,7 @@ To execute the swap and redeem process, you need to deploy the smart contract in
129131
To run the script, use the [Flare Hardhat Starter Kit](/network/guides/hardhat-foundry-starter-kit) with the following command:
130132

131133
```bash
132-
npx hardhat run scripts/fassets/swapAndRedeem.ts --network coston
134+
yarn hardhat run scripts/fassets/swapAndRedeem.ts --network coston2
133135
```
134136

135137
The script outputs transaction details, including swap amounts and redemption results.

docs/fassets/developer-guides/15-fassets-redemption-queue.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The [`redemptionQueue`](/fassets/reference/IAssetManager#redemptionqueue) functi
4646
Each `RedemptionTicketInfo` includes:
4747

4848
- `agentVault`: address of the backing agent.
49-
- `valueUBA`: value in underlying base amount.
49+
- `ticketValueUBA`: value of the ticket in underlying base amount (UBA).
5050
- `lots`: number of lots.
5151
- `createdAt`: creation timestamp.
5252

@@ -78,8 +78,8 @@ The script:
7878
4. Get the `maxRedeemedTickets` value from the system settings (maximum number of tickets that can be redeemed in a single request).
7979
The actual number of tickets returned may be less than `maxRedeemedTickets` if the queue is shorter.
8080
5. Get the lot size value from the settings (minimum quantity required for minting FAssets).
81-
6. Get the redemption queue by calling the contract method `redemptionQueue` starting from `0` and up to `maxRedeemedTickets`.
82-
You can paginate over the queue.
81+
6. Get the redemption queue by calling the contract method `redemptionQueue(_firstRedemptionTicketId, _pageSize)` — passing `0` as the first id starts at the **beginning of the queue** (it does not refer to ticket index `0`).
82+
The method returns `(_queue, _nextRedemptionTicketId)`; use `_nextRedemptionTicketId` to paginate.
8383
7. Sum all ticket values in the redemption queue to calculate the total value in UBA (Underlying Asset Base Amount)
8484
8. Calculate the total lots in the redemption queue by dividing the total value by the lot size.
8585

docs/fassets/developer-guides/3-fassets-settings-solidity.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ main().catch((error) => {
9797
Now you can run the script using the Hardhat tool with the following command:
9898
9999
```bash
100-
npx hardhat run scripts/fassets/getLotSize.ts --network coston2
100+
yarn hardhat run scripts/fassets/getLotSize.ts --network coston2
101101
```
102102

103103
You should see the following output:
@@ -121,7 +121,8 @@ This script is included in the [Flare Hardhat Starter Kit](https://github.com/fl
121121

122122
## Summary
123123

124-
Congratulations! You have now deployed a Solidity helper contract and used a TypeScript script to:
124+
Congratulations!
125+
You have now deployed a Solidity helper contract and used a TypeScript script to:
125126

126127
- Fetch FAsset FXRP lot size and decimals
127128
- Convert the value to a user-friendly format using decimal precision.

docs/fassets/developer-guides/4-fassets-settings-node.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ Timestamp: 1756977702
284284

285285
## Summary
286286

287-
Congratulations! You have built a TypeScript script that connects to the Coston2 network and retrieves the FAsset configuration settings and the price of XRP in USD.
287+
Congratulations!
288+
You have built a TypeScript script that connects to the Coston2 network and retrieves the FAsset configuration settings and the price of XRP in USD.
288289

289290
:::tip[What's next]
290291

docs/fassets/developer-guides/8-fassets-mint-executor.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ This script demonstrates how to retrieve the FDC proof and execute minting.
130130
### Execute Minting Script Breakdown
131131

132132
1. Get environment variables.
133-
2. Declare the constant `ASSET_MANAGER_ADDRESS` pointing to the FXRP AssetManager on the Songbird Testnet (Coston network).
133+
2. Resolve the FXRP AssetManager address dynamically on Coston2 by calling `getAssetManagerFXRP()` from the registry helper rather than hard-coding it.
134134

135135
3. Set the collateral reservation ID to the previously reserved minting request.
136136
4. Set the FDC round ID to retrieve the proof.
@@ -139,7 +139,7 @@ This script demonstrates how to retrieve the FDC proof and execute minting.
139139
It sends a POST request to the [Flare Data Availability Layer](/fdc/overview#data-availability-layer) and returns a Merkle proof and attestation response from FDC.
140140
7. Retrieve the FDC proof from the Data Availability Layer.
141141
8. Call the [`executeMinting`](/fassets/reference/IAssetManager#executeminting) function on the AssetManager contract and send a transaction to the Flare network to convert the attested XRP payment into FXRP (minting).
142-
9. On a successful transaction call `parseExecutemintingEvents` to extract and log events [`RedemptionTicketCreated`](/fassets/reference/IAssetManagerEvents#redemptionticketcreated) and [`MintingExecuted`](/fassets/reference/IAssetManagerEvents#mintingexecuted).
142+
9. On a successful transaction call `parseEvents` to extract and log events [`RedemptionTicketCreated`](/fassets/reference/IAssetManagerEvents#redemptionticketcreated) and [`MintingExecuted`](/fassets/reference/IAssetManagerEvents#mintingexecuted).
143143

144144
## Video Tutorial
145145

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:::note Network coverage
2+
3+
Examples in this guide target the **Coston2** testnet for safety.
4+
For Songbird or Flare mainnet, swap the `coston2/` segment of every `@flarenetwork/flare-periphery-contracts/coston2/...` import for `songbird/` or `flare/` respectively, and resolve the AssetManager via the corresponding network's `IFlareContractRegistry`.
5+
RPC endpoints, faucet links, and the FAssets agents available on each network are listed on the [FAssets overview](/fassets/overview).
6+
7+
:::
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: IAgentPing
3+
sidebar_position: 9
4+
description: On-chain liveness ping/response between users and FAssets agent bots.
5+
---
6+
7+
`IAgentPing` exposes a simple ping/response protocol for verifying that an FAssets agent's off-chain bot is alive.
8+
Users (or anyone) call `agentPing(agentVault, query)` to emit a `AgentPing` event; the bot listens for these events and replies with `agentPingResponse(agentVault, query, response)`, which emits an `AgentPingResponse` event identifying the owner address.
9+
10+
Sourced from `IAgentPing.sol` on [GitHub](https://github.com/flare-foundation/fassets/blob/main/contracts/userInterfaces/IAgentPing.sol).
11+
12+
## Functions
13+
14+
### agentPing
15+
16+
```solidity
17+
function agentPing(address _agentVault, uint256 _query) external;
18+
```
19+
20+
Emits an `AgentPing` event addressed at `_agentVault`.
21+
`_query` is an off-chain-defined identifier that helps the bot decide which kind of response is required (and whether the request is worth responding to at all).
22+
23+
### agentPingResponse
24+
25+
```solidity
26+
function agentPingResponse(
27+
address _agentVault,
28+
uint256 _query,
29+
string calldata _response
30+
) external;
31+
```
32+
33+
Called by the agent owner address in response to an `AgentPing`.
34+
Emits `AgentPingResponse(agentVault, owner, query, response)`.
35+
36+
## Events
37+
38+
### AgentPing
39+
40+
```solidity
41+
event AgentPing(address indexed agentVault, address indexed sender, uint256 query);
42+
```
43+
44+
### AgentPingResponse
45+
46+
```solidity
47+
event AgentPingResponse(address indexed agentVault, address indexed owner, uint256 query, string response);
48+
```

0 commit comments

Comments
 (0)