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/fxrp/firelight/01-status.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,8 @@ The `main()` function executes the following steps:
37
37
3.**Get asset token information:** Retrieves the asset token's symbol and decimals for formatting.
38
38
4.**Log asset information:** Displays the asset address, symbol, and decimals.
39
39
5.**Log vault balances and exchange rate:** Shows total assets, total supply, and the current exchange rate.
40
-
6.**Log period configuration:** Displays period timing and configuration. Firelight vaults operate on [period-based logic](https://docs.firelight.finance/technical-documents#period-based-logic).
40
+
6.**Log period configuration:** Displays period timing and configuration.
41
+
Firelight vaults operate on [period-based logic](https://docs.firelight.finance/technical-documents#period-based-logic).
41
42
7.**Get and log user information:** Shows user balances and maximum limits for deposit, mint, withdraw, and redeem.
42
43
8.**Log user withdrawals:** Displays pending withdrawals for current and previous periods.
43
44
@@ -50,7 +51,7 @@ To run the Firelight vault status script:
50
51
3. Run the script using Hardhat:
51
52
52
53
```bash
53
-
npx hardhat run scripts/firelight/status.ts --network coston2
54
+
yarn hardhat run scripts/firelight/status.ts --network coston2
Copy file name to clipboardExpand all lines: docs/fxrp/firelight/05-redeem.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ import FirelightRedeem from "!!raw-loader!/examples/developer-hub-javascript/fir
13
13
This guide demonstrates how to create a redemption request from a Firelight vault.
14
14
The Firelight vault implements the [ERC-4626](https://eips.ethereum.org/EIPS/eip-4626) standard and uses a [period-based logic](https://docs.firelight.finance/technical-documents#period-based-logic) for redemptions.
15
15
16
-
Redeeming shares burns vault shares and allows assets to be withdrawn. Redemptions create a withdrawal request that is processed after the current period ends.
16
+
Redeeming shares burns vault shares and allows assets to be withdrawn.
17
+
Redemptions create a withdrawal request that is processed after the current period ends.
17
18
The assets are not immediately transferred; they must be claimed once the period has ended.
18
19
19
20
## Prerequisites
@@ -60,12 +61,12 @@ To run the Firelight vault redeem script:
60
61
61
62
1. Ensure you have the [Flare Hardhat Starter Kit](/network/guides/hardhat-foundry-starter-kit) set up.
62
63
2. Update the `FIRELIGHT_VAULT_ADDRESS` constant with the correct vault address for your network.
63
-
3. Adjust the `SHARES_TO_REDEEM` constant to the desired number of shares.
64
+
3. Adjust the `sharesToRedeem` constant to the desired number of shares.
64
65
4. Ensure your account has sufficient vault shares to cover the redemption.
65
66
5. Run the script using Hardhat:
66
67
67
68
```bash
68
-
npx hardhat run scripts/firelight/redeem.ts --network coston2
69
+
yarn hardhat run scripts/firelight/redeem.ts --network coston2
Copy file name to clipboardExpand all lines: docs/fxrp/oft/fassets-autoredeem.mdx
+40-36Lines changed: 40 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,8 @@ This guide covers four key functionalities:
33
33
-[LayerZero Composer](https://docs.layerzero.network/v2/developers/evm/oft/composing) pattern for executing custom logic (like FAsset redemption) automatically when tokens arrive on the destination chain.
34
34
-[Hyperliquid spotSend API](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#spot-transfer) for transferring tokens between HyperCore and HyperEVM.
35
35
36
-
A shared [`FAssetRedeemComposer`](https://coston2-explorer.flare.network/address/0x80c5ebBD65b4857CA2f917EAB1e9F83bcC947c52?tab=contract) contract is pre-deployed on Coston2, so users do not need to deploy their own. This guide includes four TypeScript scripts (`bridgeToHyperEVM.ts`, `bridgeToHyperCore.ts`, `autoRedeemFromHyperEVM.ts`, and `autoRedeemFromHyperCore.ts`) that demonstrate the complete workflows.
36
+
A shared [`FAssetRedeemComposer`](https://coston2-explorer.flare.network/address/0xa10569DFb38FE7Be211aCe4E4A566Cea387023b0?tab=contract) contract is pre-deployed on Coston2, so users do not need to deploy their own.
37
+
This guide includes four TypeScript scripts (`bridgeToHyperEVM.ts`, `bridgeToHyperCore.ts`, `autoRedeemFromHyperEVM.ts`, and `autoRedeemFromHyperCore.ts`) that demonstrate the complete workflows.
37
38
38
39
Clone the [Flare Hardhat Starter](https://github.com/flare-foundation/flare-hardhat-starter) to follow along.
39
40
@@ -77,7 +78,7 @@ yarn hardhat run scripts/fassets/autoRedeemFromHyperEVM.ts --network hyperliquid
77
78
78
79
### What It Is
79
80
80
-
The [`FAssetRedeemComposer`](https://coston2-explorer.flare.network/address/0x80c5ebBD65b4857CA2f917EAB1e9F83bcC947c52?tab=contract) is a shared LayerZero Composer contract **pre-deployed on Coston2** that automatically redeems FAssets to their underlying assets when tokens arrive via LayerZero's compose message feature.
81
+
The [`FAssetRedeemComposer`](https://coston2-explorer.flare.network/address/0xa10569DFb38FE7Be211aCe4E4A566Cea387023b0?tab=contract) is a shared LayerZero Composer contract **pre-deployed on Coston2** that automatically redeems FAssets to their underlying assets when tokens arrive via LayerZero's compose message feature.
The current executor fee can be queried via `getExecutorData()` on the [composer contract](https://coston2-explorer.flare.network/address/0x80c5ebBD65b4857CA2f917EAB1e9F83bcC947c52?tab=contract).
127
+
The current executor fee can be queried via `getExecutorData()` on the [composer contract](https://coston2-explorer.flare.network/address/0xa10569DFb38FE7Be211aCe4E4A566Cea387023b0?tab=contract).
126
128
127
129
### Contract Source
128
130
@@ -133,7 +135,7 @@ The current executor fee can be queried via `getExecutorData()` on the [composer
133
135
{FassetRedeemComposer}
134
136
</CodeBlock>
135
137
136
-
The full verified source is available on the [Coston2 explorer](https://coston2-explorer.flare.network/address/0x80c5ebBD65b4857CA2f917EAB1e9F83bcC947c52?tab=contract).
138
+
The full verified source is available on the [Coston2 explorer](https://coston2-explorer.flare.network/address/0xa10569DFb38FE7Be211aCe4E4A566Cea387023b0?tab=contract).
137
139
138
140
</details>
139
141
@@ -168,7 +170,7 @@ You must successfully complete this step before running the `autoRedeemFromHyper
168
170
- Approves OFT Adapter to spend FTestXRP.
169
171
- Approves Composer (if needed for future operations).
170
172
4.**Build Send Parameters**:
171
-
- Destination: Hyperliquid EVM Testnet (EndpointID for Hyperliquid Testnet: `40294`).
173
+
- Destination: Hyperliquid EVM Testnet (EndpointID for Hyperliquid Testnet: `40362`).
172
174
- Recipient: Same address on destination chain.
173
175
- Amount: Calculated from configured lots (default 1 lot, with 10% buffer for safety).
174
176
- LayerZero options: Executor gas limit set to 200,000.
@@ -216,7 +218,7 @@ This gets your FXRP tokens onto Hyperliquid EVM.
@@ -928,16 +926,19 @@ XRP will be sent to: rpHuw4bKSjonKRrKKVYYVedg1jyPrmp
928
926
A: Typically 2-5 minutes for LayerZero message delivery + execution time.
929
927
930
928
**Q: What's the minimum amount I can bridge?**
931
-
A: Any amount for bridging to Hyperliquid. For auto-redeem, minimum is 1 [lot](https://dev.flare.network/fassets/minting#lots) (10 FXRP for XRP).
929
+
A: Any amount for bridging to Hyperliquid.
930
+
For auto-redeem, minimum is 1 [lot](https://dev.flare.network/fassets/minting#lots) (10 FXRP for XRP).
932
931
933
932
**Q: Can I bridge to a different address?**
934
933
A: Yes, edit the `recipientAddress` parameter in the scripts.
935
934
936
935
**Q: What happens if compose execution fails?**
937
-
A: Tokens will be stuck in the composer. Owner can recover using `recoverTokens()`.
936
+
A: Tokens will be stuck in the composer.
937
+
Owner can recover using `recoverTokens()`.
938
938
939
939
**Q: Can I use this on mainnet?**
940
-
A: This is designed for testnet. For mainnet, update contract addresses, thoroughly test, and audit all code.
940
+
A: This is designed for testnet.
941
+
For mainnet, update contract addresses, thoroughly test, and audit all code.
941
942
942
943
**Q: How do I get FTestXRP on Flare Testnet Coston2?**
943
944
A: Use Flare's FAsset minting process via the AssetManager contract.
@@ -946,10 +947,13 @@ A: Use Flare's FAsset minting process via the AssetManager contract.
946
947
A: Get them from Hyperliquid testnet [faucet](https://hyperliquid.gitbook.io/hyperliquid-docs/onboarding/testnet-faucet) or DEX.
947
948
948
949
**Q: What's the difference between HyperCore and HyperEVM?**
949
-
A: HyperCore is Hyperliquid's high-performance spot trading layer where tokens are held in spot wallets. HyperEVM is Hyperliquid's EVM-compatible execution environment where tokens exist as ERC-20s. You need to transfer tokens from HyperCore to HyperEVM before bridging via LayerZero.
950
+
A: HyperCore is Hyperliquid's high-performance spot trading layer where tokens are held in spot wallets.
951
+
HyperEVM is Hyperliquid's EVM-compatible execution environment where tokens exist as ERC-20s.
952
+
You need to transfer tokens from HyperCore to HyperEVM before bridging via LayerZero.
950
953
951
954
**Q: Why does the HyperCore transfer use Arbitrum's chainId?**
952
-
A: Hyperliquid's API requires Arbitrum's chainId (42161) for all EIP-712 signatures. This is a legacy requirement from when Hyperliquid settled on Arbitrum.
955
+
A: Hyperliquid's API requires Arbitrum's chainId (42161) for all EIP-712 signatures.
956
+
This is a legacy requirement from when Hyperliquid settled on Arbitrum.
953
957
954
958
## Discovering Available Bridge Routes
955
959
@@ -974,7 +978,7 @@ This script:
974
978
#### How to Run
975
979
976
980
```bash
977
-
yarn hardhat run scripts/layerzero/getOFTPeers.ts --network coston2
981
+
yarn hardhat run scripts/layerZero/getOFTPeers.ts --network coston2
978
982
```
979
983
980
984
#### Expected Output
@@ -1020,7 +1024,7 @@ Once you've identified available peers, you can:
0 commit comments