Skip to content

Commit 89150b7

Browse files
authored
feat(docs): enhance Core Vault operational parameters how to retrieve from chain (#698)
1 parent e62351a commit 89150b7

File tree

7 files changed

+146
-1
lines changed

7 files changed

+146
-1
lines changed

docs/fassets/7-operational-parameters.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ To get the default agent settings, you need to call the `getAgentInfo` function
6666

6767
### Core Vault Manager
6868

69+
To get the Core Vault manager operational parameters you need to use the [`ICoreVaultManager`](/fassets/reference/ICoreVaultManager) interface. Specific functions added to each parameter.
70+
6971
<OperationalParameters sectionTitle="Core Vault Manager" hideBtc hideDoge />
7072

7173
### Core Vault Settings
7274

75+
To get the Core Vault settings you need to use the [`ICoreVaultSettings`](/fassets/reference/ICoreVaultSettings) interface. Specific functions added to each parameter.
76+
7377
<OperationalParameters sectionTitle="Core Vault Settings" hideBtc hideDoge />

docs/fassets/reference/IAssetManager.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: IAssetManager
33
description: FAssets IAssetManager interface reference.
44
keywords: [fassets, xrp, bitcoin, dogecoin, flare-network]
5+
sidebar_position: 1
56
---
67

78
Command line reference for managing and interacting with FAssets `IAssetManager`.

docs/fassets/reference/IAssetManagerEvents.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: IAssetManagerEvents
33
description: FAssets IAssetManager interface reference.
44
keywords: [fassets, xrp, bitcoin, dogecoin, flare-network]
5+
sidebar_position: 2
56
---
67

78
`IAssetManagerEvents` is an interface that defines the events emitted by the [`IAssetManager`](/fassets/reference/IAssetManager) contract.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: ICoreVaultManager
3+
description: FAssets ICoreVaultManager interface reference.
4+
keywords: [fassets, xrp, bitcoin, dogecoin, flare-network]
5+
sidebar_position: 3
6+
---
7+
8+
Command line reference for managing and interacting with FAssets `ICoreVaultSettings`.
9+
10+
Sourced from `ICoreVaultManager.sol` on [GitHub](https://github.com/flare-foundation/fassets/blob/main/contracts/userInterfaces/ICoreVaultManager.sol).
11+
12+
## Functions
13+
14+
### `getSettings`
15+
16+
Returns the current operational settings of the Core Vault Manager.
17+
18+
```solidity
19+
function getSettings()
20+
external view
21+
returns (
22+
uint128 _escrowEndTimeSeconds,
23+
uint128 _escrowAmount,
24+
uint128 _minimalAmount,
25+
uint128 _fee
26+
);
27+
```
28+
29+
#### Returns
30+
31+
- `_escrowEndTimeSeconds`: The end time for escrow in seconds.
32+
- `_escrowAmount`: The amount of assets to be held in escrow.
33+
- `_minimalAmount`: The minimum amount that must remain in the vault after operations.
34+
- `_fee`: The fee charged for operations.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: ICoreVaultSettings
3+
description: FAssets IAssetManager interface reference.
4+
keywords: [fassets, xrp, bitcoin, dogecoin, flare-network]
5+
sidebar_position: 4
6+
---
7+
8+
Command line reference for managing and interacting with FAssets `ICoreVaultSettings`.
9+
10+
Sourced from `ICoreVaultSettings.sol` on [GitHub](https://github.com/flare-foundation/fassets/blob/main/contracts/userInterfaces/ICoreVaultSettings.sol).
11+
12+
## Functions
13+
14+
### `getCoreVaultMinimumAmountLeftBIPS`
15+
16+
Returns the minimum amount of minting left on agent's address after transfer to core vault.
17+
18+
```solidity
19+
function getCoreVaultMinimumAmountLeftBIPS()
20+
external view
21+
returns (uint256);
22+
```
23+
24+
### `getCoreVaultTransferTimeExtensionSeconds`
25+
26+
Returns the extra time for an agent's transfer to the core vault.
27+
28+
```solidity
29+
function getCoreVaultTransferTimeExtensionSeconds()
30+
external view
31+
returns (uint256);
32+
```
33+
34+
### `getCoreVaultTransferFeeBIPS`
35+
36+
Returns the fee paid by agent for transfer to the core vault.
37+
38+
```solidity
39+
function getCoreVaultTransferFeeBIPS()
40+
external view
41+
returns (uint256);
42+
```
43+
44+
### `getCoreVaultMinimumRedeemLots`
45+
46+
Returns the minimum number of lots that a direct redemption from core vault can take.
47+
48+
```solidity
49+
function getCoreVaultMinimumRedeemLots()
50+
external view
51+
returns (uint256);
52+
```
53+
54+
### `getCoreVaultRedemptionFeeBIPS`
55+
56+
Returns the fee paid by the redeemer for direct redemptions from the core vault.
57+
58+
```solidity
59+
function getCoreVaultRedemptionFeeBIPS()
60+
external view
61+
returns (uint256);
62+
```

src/components/FAssets/OperationalParameters.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,23 @@ export default function OperationalParameters({
4848
) : (
4949
<b>{parameter.name}</b>
5050
)}
51-
&nbsp;{" "}
51+
&nbsp; <br />
52+
{parameter.settingName && parameter.interfaceLink && (
53+
<>
54+
<Link to={parameter.interfaceLink}>
55+
{parameter.settingName}
56+
</Link>
57+
&nbsp;
58+
</>
59+
)}
60+
{parameter.interfaceLink && parameter.functionName && (
61+
<>
62+
<Link to={parameter.interfaceLink}>
63+
{parameter.functionName}
64+
</Link>
65+
&nbsp;
66+
</>
67+
)}
5268
{parameter.settingName && <code>{parameter.settingName}</code>}
5369
<br />
5470
{parameter.description}

src/components/FAssets/operational-parameters.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,9 @@ export const operationalParameters = [
11931193
parameters: [
11941194
{
11951195
name: "Escrow amount",
1196+
settingName: "_escrowAmount",
1197+
functionName: "getSettings",
1198+
interfaceLink: "/fassets/reference/ICoreVaultManager#getsettings",
11961199
description:
11971200
"The amount of XRP to escrow (setting to 0 disables escrowing).",
11981201
values: {
@@ -1206,6 +1209,9 @@ export const operationalParameters = [
12061209
},
12071210
{
12081211
name: "Minimal left amount in the multisig",
1212+
settingName: "_minimalAmount",
1213+
functionName: "getSettings",
1214+
interfaceLink: "/fassets/reference/ICoreVaultManager#getsettings",
12091215
description:
12101216
"The minimal amount that will be left on the multisig after escrowing.",
12111217
values: {
@@ -1219,6 +1225,9 @@ export const operationalParameters = [
12191225
},
12201226
{
12211227
name: "Escrow expiration time",
1228+
settingName: "_escrowEndTimeSeconds",
1229+
functionName: "getSettings",
1230+
interfaceLink: "/fassets/reference/ICoreVaultManager#getsettings",
12221231
description:
12231232
"The time of day (UTC) when the escrows expire. Exactly one escrow per day will expire.",
12241233
values: {
@@ -1232,6 +1241,9 @@ export const operationalParameters = [
12321241
},
12331242
{
12341243
name: "Max expected fee",
1244+
settingName: "_fee",
1245+
functionName: "getSettings",
1246+
interfaceLink: "/fassets/reference/ICoreVaultManager#getsettings",
12351247
description: "Maximum expected fee charged by the chain for a payment",
12361248
values: {
12371249
songbird: {
@@ -1249,6 +1261,9 @@ export const operationalParameters = [
12491261
parameters: [
12501262
{
12511263
name: "Minting left on agent's address",
1264+
functionName: "getCoreVaultMinimumAmountLeftBIPS",
1265+
interfaceLink:
1266+
"/fassets/reference/ICoreVaultSettings#getcorevaultminimumamountleftbips",
12521267
description:
12531268
"Minimum amount of minting left on agent's address after transfer to core vault. Expressed as percentage of agent's minting capacity (calculated from agent's vault and pool collateral).",
12541269
values: {
@@ -1262,6 +1277,9 @@ export const operationalParameters = [
12621277
},
12631278
{
12641279
name: "Transfer to core vault time",
1280+
functionName: "getCoreVaultTransferTimeExtensionSeconds",
1281+
interfaceLink:
1282+
"/fassets/reference/ICoreVaultSettings#getcorevaulttransfertimeextensionseconds",
12651283
description:
12661284
"The extra time for an agent's transfer to the core vault, compared to ordinary redemption payment.",
12671285
values: {
@@ -1275,6 +1293,9 @@ export const operationalParameters = [
12751293
},
12761294
{
12771295
name: "Transfer fee to Core Vault",
1296+
functionName: "getCoreVaultTransferTimeExtensionSeconds",
1297+
interfaceLink:
1298+
"/fassets/reference/ICoreVaultSettings#getcorevaulttransferfeebips",
12781299
description:
12791300
"Fee (in percentage of transfer amount) paid by agent for transfer to the core vault.",
12801301
values: {
@@ -1288,6 +1309,9 @@ export const operationalParameters = [
12881309
},
12891310
{
12901311
name: "Minimum number of lots for direct redemption",
1312+
functionName: "getCoreVaultMinimumRedeemLots",
1313+
interfaceLink:
1314+
"/fassets/reference/ICoreVaultSettings#getcorevaultminimumredeemlots",
12911315
description:
12921316
"The minimum number of lots that a direct redemption from core vault can take",
12931317
values: {
@@ -1301,6 +1325,9 @@ export const operationalParameters = [
13011325
},
13021326
{
13031327
name: "Redemption fee",
1328+
functionName: "getCoreVaultRedemptionFeeBIPS",
1329+
interfaceLink:
1330+
"/fassets/reference/ICoreVaultSettings#getcorevaultredemptionfeebips",
13041331
description:
13051332
"Fee (in percentage of redemption amount) paid by the redeemer for direct redemptions from the core vault.",
13061333
values: {

0 commit comments

Comments
 (0)