Skip to content

Commit dc9d13f

Browse files
committed
refactor(docs): standardize list formatting in Firelight vault scripts
1 parent b01bf09 commit dc9d13f

File tree

5 files changed

+41
-42
lines changed

5 files changed

+41
-42
lines changed

docs/fassets/firelight/01-status.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ The following script retrieves and displays information about the Firelight vaul
3434

3535
The `main()` function executes the following steps:
3636

37-
1. **Get the account and vault instance**: Retrieves the signer account and connects to the Firelight vault contract.
38-
2. **Get vault information**: Fetches vault data, including asset address, total assets, total supply, and period configuration.
39-
3. **Get asset token information**: Retrieves the asset token's symbol and decimals for formatting.
40-
4. **Log asset information**: Displays the asset address, symbol, and decimals.
41-
5. **Log vault balances and exchange rate**: Shows total assets, total supply, and the current exchange rate.
42-
6. **Log period configuration**: Displays period timing and configuration.
43-
Firelight vaults operate on [period-based logic](https://docs.firelight.finance/technical-documents#period-based-logic).
44-
7. **Get and log user information**: Shows user balances and maximum limits for deposit, mint, withdraw, and redeem.
45-
8. **Log user withdrawals**: Displays pending withdrawals for current and previous periods.
37+
1. **Get the account and vault instance:** Retrieves the signer account and connects to the Firelight vault contract.
38+
2. **Get vault information:** Fetches vault data, including asset address, total assets, total supply, and period configuration.
39+
3. **Get asset token information:** Retrieves the asset token's symbol and decimals for formatting.
40+
4. **Log asset information:** Displays the asset address, symbol, and decimals.
41+
5. **Log vault balances and exchange rate:** Shows total assets, total supply, and the current exchange rate.
42+
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).
43+
7. **Get and log user information:** Shows user balances and maximum limits for deposit, mint, withdraw, and redeem.
44+
8. **Log user withdrawals:** Displays pending withdrawals for current and previous periods.
4645

4746
## Running the Script
4847

docs/fassets/firelight/02-deposit.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ The following script demonstrates how to deposit assets into the Firelight vault
3636

3737
The `main()` function executes the following steps:
3838

39-
1. **Get the account**: Retrieves the signer account from the Hardhat environment.
40-
2. **Get the vault and asset token**: Connects to the vault contract and retrieves the underlying asset token.
41-
3. **Get asset info**: Fetches the asset token's symbol and decimals.
42-
4. **Calculate the deposit amount**: Converts the desired amount into the correct units based on decimals.
43-
5. **Log deposit info**: Displays the deposit details, including sender, vault, and amount.
44-
6. **Validate the deposit**: Checks if the amount exceeds the maximum allowed.
45-
7. **Approve tokens for transfer**: Approves the vault to spend the deposit amount.
46-
8. **Execute the deposit**: Calls `deposit()` to transfer assets and mint shares.
39+
1. **Get the account:** Retrieves the signer account from the Hardhat environment.
40+
2. **Get the vault and asset token:** Connects to the vault contract and retrieves the underlying asset token.
41+
3. **Get asset info:** Fetches the asset token's symbol and decimals.
42+
4. **Calculate the deposit amount:** Converts the desired amount into the correct units based on decimals.
43+
5. **Log deposit info:** Displays the deposit details, including sender, vault, and amount.
44+
6. **Validate the deposit:** Checks if the amount exceeds the maximum allowed.
45+
7. **Approve tokens for transfer:** Approves the vault to spend the deposit amount.
46+
8. **Execute the deposit:** Calls `deposit()` to transfer assets and mint shares.
4747

4848
## Running the Script
4949

docs/fassets/firelight/03-mint.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ The following script demonstrates how to mint vault shares by depositing assets
3636

3737
The `main()` function executes the following steps:
3838

39-
1. **Get the account**: Retrieves the signer account from the Hardhat environment.
40-
2. **Get the vault and asset token**: Connects to the vault contract and retrieves the underlying asset token.
41-
3. **Get asset info**: Fetches the asset token's symbol and decimals.
42-
4. **Calculate the shares amount to mint**: Converts the desired shares into the correct units based on decimals.
43-
5. **Log mint info**: Displays the mint details, including sender, vault, and shares.
44-
6. **Validate the mint**: Checks if the amount exceeds the maximum allowed.
45-
7. **Calculate assets needed**: Uses `previewMint()` to determine the required assets.
46-
8. **Approve tokens for transfer**: Approves the vault to spend the required assets.
47-
9. **Execute the mint**: Calls `mint()` to transfer assets and mint shares.
39+
1. **Get the account:** Retrieves the signer account from the Hardhat environment.
40+
2. **Get the vault and asset token:** Connects to the vault contract and retrieves the underlying asset token.
41+
3. **Get asset info:** Fetches the asset token's symbol and decimals.
42+
4. **Calculate the shares amount to mint:** Converts the desired shares into the correct units based on decimals.
43+
5. **Log mint info:** Displays the mint details, including sender, vault, and shares.
44+
6. **Validate the mint:** Checks if the amount exceeds the maximum allowed.
45+
7. **Calculate assets needed:** Uses `previewMint()` to determine the required assets.
46+
8. **Approve tokens for transfer:** Approves the vault to spend the required assets.
47+
9. **Execute the mint:** Calls `mint()` to transfer assets and mint shares.
4848

4949
## Running the Script
5050

docs/fassets/firelight/04-withdraw.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ The following script demonstrates how to create a withdrawal request from the Fi
3737

3838
The `main()` function executes the following steps:
3939

40-
1. **Get the account**: Retrieves the signer account from the Hardhat environment.
41-
2. **Get the vault and asset token**: Connects to the vault contract and retrieves the underlying asset token.
42-
3. **Get asset info**: Fetches the asset token's symbol and decimals.
43-
4. **Calculate the withdrawal amount**: Converts the desired amount into the correct units based on decimals.
44-
5. **Log withdraw info**: Displays the withdrawal details, including sender, vault, and amount.
45-
6. **Validate the withdrawal**: Checks if the amount exceeds the maximum allowed.
46-
7. **Check user balance and shares needed**: Verifies the user has sufficient shares for the withdrawal.
47-
8. **Execute the withdrawal**: Calls `withdraw()` to create a withdrawal request for the current period.
40+
1. **Get the account:** Retrieves the signer account from the Hardhat environment.
41+
2. **Get the vault and asset token:** Connects to the vault contract and retrieves the underlying asset token.
42+
3. **Get asset info:** Fetches the asset token's symbol and decimals.
43+
4. **Calculate the withdrawal amount:** Converts the desired amount into the correct units based on decimals.
44+
5. **Log withdraw info:** Displays the withdrawal details, including sender, vault, and amount.
45+
6. **Validate the withdrawal:** Checks if the amount exceeds the maximum allowed.
46+
7. **Check user balance and shares needed:** Verifies the user has sufficient shares for the withdrawal.
47+
8. **Execute the withdrawal:** Calls `withdraw()` to create a withdrawal request for the current period.
4848

4949
## Understanding Withdrawal Process
5050

docs/fassets/firelight/05-redeem.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ The following script demonstrates how to create a redemption request from the Fi
3737

3838
The `main()` function executes the following steps:
3939

40-
1. **Get the account**: Retrieves the signer account from the Hardhat environment.
41-
2. **Get the vault and asset token**: Connects to the vault contract and retrieves the underlying asset token.
42-
3. **Get asset info**: Fetches the asset token's symbol and decimals.
43-
4. **Calculate the shares amount to redeem**: Converts the desired shares into the correct units based on decimals.
44-
5. **Log redeem info**: Displays the redemption details, including sender, vault, and shares.
45-
6. **Validate the redeem**: Checks if the amount exceeds the maximum allowed.
46-
7. **Check user balance**: Verifies the user has sufficient shares.
47-
8. **Execute the redemption**: Calls `redeem()` to create a redemption request for the current period.
40+
1. **Get the account:** Retrieves the signer account from the Hardhat environment.
41+
2. **Get the vault and asset token:** Connects to the vault contract and retrieves the underlying asset token.
42+
3. **Get asset info:** Fetches the asset token's symbol and decimals.
43+
4. **Calculate the shares amount to redeem:** Converts the desired shares into the correct units based on decimals.
44+
5. **Log redeem info:** Displays the redemption details, including sender, vault, and shares.
45+
6. **Validate the redeem:** Checks if the amount exceeds the maximum allowed.
46+
7. **Check user balance:** Verifies the user has sufficient shares.
47+
8. **Execute the redemption:** Calls `redeem()` to create a redemption request for the current period.
4848

4949
## Understanding Redemption Process
5050

0 commit comments

Comments
 (0)