Skip to content

Commit ce2f4ea

Browse files
authored
feat(docs): add Direct Minting and Redeem With Tag sections to operational parameters guide (#1329)
1 parent 251b503 commit ce2f4ea

3 files changed

Lines changed: 284 additions & 37 deletions

File tree

docs/fassets/09-operational-parameters.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ Specific functions added to each parameter.
6262

6363
<OperationalParameters sectionTitle="Core Vault Settings" hideBtc hideDoge />
6464

65+
## Direct Minting
66+
67+
<OperationalParameters sectionTitle="Direct Minting" networks={["coston2"]} />
68+
69+
## Redeem With Tag
70+
71+
<OperationalParameters sectionTitle="Redeem With Tag" networks={["coston2"]} />
72+
6573
:::tip[What's next]
6674

6775
Learn more about the different components and processes involved in FAssets - [collateral](/fassets/collateral), [minting](/fassets/minting), [redemptions](/fassets/redemption), [liquidations](/fassets/liquidation) and [Core Vault](/fassets/core-vault).

src/features/FAssets/OperationalParameters/index.tsx

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import { operationalParameters } from "./operational-parameters";
88
export default function OperationalParameters({
99
sectionTitle,
1010
filterParameters,
11+
networks,
1112
}: {
1213
sectionTitle: string;
1314
filterParameters?: string[];
15+
networks?: ("songbird" | "coston" | "coston2" | "flare")[];
1416
}) {
1517
const operationalParametersSection = operationalParameters.find(
1618
(section) => section.title === sectionTitle,
@@ -29,6 +31,7 @@ export default function OperationalParameters({
2931

3032
type OperationalParameter =
3133
(typeof operationalParameters)[number]["parameters"][number];
34+
type Network = "songbird" | "coston" | "coston2" | "flare";
3235

3336
function ParameterTable({
3437
network,
@@ -43,6 +46,14 @@ export default function OperationalParameters({
4346
hideBtc?: boolean;
4447
hideDoge?: boolean;
4548
}) {
49+
const getNetworkValue = (
50+
parameter: OperationalParameter,
51+
asset: "xrp" | "btc" | "doge",
52+
) => {
53+
const value = parameter.values?.[network]?.[asset];
54+
return typeof value === "string" && value.trim().length > 0 ? value : "-";
55+
};
56+
4657
return (
4758
<table>
4859
<thead>
@@ -104,21 +115,21 @@ export default function OperationalParameters({
104115
{!hideXrp && (
105116
<td
106117
dangerouslySetInnerHTML={{
107-
__html: parameter.values[network].xrp,
118+
__html: getNetworkValue(parameter, "xrp"),
108119
}}
109120
/>
110121
)}
111122
{!hideBtc && (
112123
<td
113124
dangerouslySetInnerHTML={{
114-
__html: parameter.values[network].btc,
125+
__html: getNetworkValue(parameter, "btc"),
115126
}}
116127
/>
117128
)}
118129
{!hideDoge && (
119130
<td
120131
dangerouslySetInnerHTML={{
121-
__html: parameter.values[network].doge,
132+
__html: getNetworkValue(parameter, "doge"),
122133
}}
123134
/>
124135
)}
@@ -129,43 +140,60 @@ export default function OperationalParameters({
129140
);
130141
}
131142

143+
const networkTabs: {
144+
label: string;
145+
value: Network;
146+
hideBtc: boolean;
147+
hideDoge: boolean;
148+
}[] = [
149+
{
150+
label: "Flare Mainnet",
151+
value: "flare",
152+
hideBtc: true,
153+
hideDoge: true,
154+
},
155+
{
156+
label: "Flare Testnet Coston2",
157+
value: "coston2",
158+
hideBtc: true,
159+
hideDoge: true,
160+
},
161+
{
162+
label: "Songbird Canary-Network",
163+
value: "songbird",
164+
hideBtc: true,
165+
hideDoge: true,
166+
},
167+
{
168+
label: "Songbird Testnet Coston",
169+
value: "coston",
170+
hideBtc: false,
171+
hideDoge: false,
172+
},
173+
];
174+
175+
const visibleTabs = networks?.length
176+
? networkTabs.filter((tab) => networks.includes(tab.value))
177+
: networkTabs;
178+
132179
return (
133180
<Tabs
134-
defaultValue="flare"
135-
values={[
136-
{ label: "Flare Mainnet", value: "flare" },
137-
{ label: "Flare Testnet Coston2", value: "coston2" },
138-
{ label: "Songbird Canary-Network", value: "songbird" },
139-
{ label: "Songbird Testnet Coston", value: "coston" },
140-
]}
181+
defaultValue={visibleTabs[0]?.value ?? "flare"}
182+
values={visibleTabs.map((tab) => ({
183+
label: tab.label,
184+
value: tab.value,
185+
}))}
141186
>
142-
<TabItem value="flare">
143-
<ParameterTable
144-
network="flare"
145-
parameters={parameters}
146-
hideBtc
147-
hideDoge
148-
/>
149-
</TabItem>
150-
<TabItem value="coston2">
151-
<ParameterTable
152-
network="coston2"
153-
parameters={parameters}
154-
hideBtc
155-
hideDoge
156-
/>
157-
</TabItem>
158-
<TabItem value="songbird">
159-
<ParameterTable
160-
network="songbird"
161-
parameters={parameters}
162-
hideBtc
163-
hideDoge
164-
/>
165-
</TabItem>
166-
<TabItem value="coston">
167-
<ParameterTable network="coston" parameters={parameters} />
168-
</TabItem>
187+
{visibleTabs.map((tab) => (
188+
<TabItem key={tab.value} value={tab.value}>
189+
<ParameterTable
190+
network={tab.value}
191+
parameters={parameters}
192+
hideBtc={tab.hideBtc}
193+
hideDoge={tab.hideDoge}
194+
/>
195+
</TabItem>
196+
))}
169197
</Tabs>
170198
);
171199
}

src/features/FAssets/OperationalParameters/operational-parameters.ts

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,217 @@ export const operationalParameters = [
12351235
},
12361236
},
12371237
},
1238+
{
1239+
name: "Core Vault Donation Tag",
1240+
settingName: "coreVaultDonationTag",
1241+
description:
1242+
"Destination tag that must be added to core vault donation transactions.",
1243+
values: {
1244+
coston2: {
1245+
xrp: "14",
1246+
},
1247+
},
1248+
},
1249+
],
1250+
},
1251+
{
1252+
title: "Direct Minting",
1253+
parameters: [
1254+
{
1255+
name: "Direct Minting Minimum Fee",
1256+
settingName: "directMintingMinimumFee",
1257+
description:
1258+
"Minimum fee charged for direct minting, in base unit of the underlying asset (UBA).",
1259+
values: {
1260+
flare: {
1261+
xrp: "-",
1262+
},
1263+
coston2: {
1264+
xrp: "0.1 TestXRP",
1265+
},
1266+
songbird: {
1267+
xrp: "-",
1268+
},
1269+
coston: {
1270+
xrp: "-",
1271+
},
1272+
},
1273+
},
1274+
{
1275+
name: "Direct Minting Fee",
1276+
settingName: "directMintingFeeBIPS",
1277+
description:
1278+
"Direct minting fee as a percentage of the minting amount, in BIPS.",
1279+
values: {
1280+
flare: {
1281+
xrp: "-",
1282+
},
1283+
coston2: {
1284+
xrp: "0.25%",
1285+
},
1286+
songbird: {
1287+
xrp: "-",
1288+
},
1289+
coston: {
1290+
xrp: "-",
1291+
},
1292+
},
1293+
},
1294+
{
1295+
name: "Direct Minting Executor Fee",
1296+
settingName: "directMintingExecutorFeeUBA",
1297+
description:
1298+
"Fee paid to the executor of a direct minting request, in base unit of the underlying asset (UBA). This only applies to direct mintings to address, for direct minting to smart account the executor fee is calculated and paid by the smart account manager.",
1299+
values: {
1300+
flare: {
1301+
xrp: "-",
1302+
},
1303+
coston2: {
1304+
xrp: "0.1 TestXRP",
1305+
},
1306+
songbird: {
1307+
xrp: "-",
1308+
},
1309+
coston: {
1310+
xrp: "-",
1311+
},
1312+
},
1313+
},
1314+
{
1315+
name: "Direct Minting Others Can Execute After",
1316+
settingName: "directMintingOthersCanExecuteAfterSeconds",
1317+
description:
1318+
"Time in seconds after which anyone can execute a direct minting request (not just the executor set by the minter).",
1319+
values: {
1320+
flare: {
1321+
xrp: "-",
1322+
},
1323+
coston2: {
1324+
xrp: "2 hours",
1325+
},
1326+
songbird: {
1327+
xrp: "-",
1328+
},
1329+
coston: {
1330+
xrp: "-",
1331+
},
1332+
},
1333+
},
1334+
{
1335+
name: "Direct Minting Hourly Limit",
1336+
settingName: "directMintingHourlyLimitUBA",
1337+
description:
1338+
"Maximum amount that can be directly minted per hour, in base unit of the underlying asset (UBA). After that the mintings are delayed.",
1339+
values: {
1340+
flare: {
1341+
xrp: "-",
1342+
},
1343+
coston2: {
1344+
xrp: "100k TestXRP",
1345+
},
1346+
songbird: {
1347+
xrp: "-",
1348+
},
1349+
coston: {
1350+
xrp: "-",
1351+
},
1352+
},
1353+
},
1354+
{
1355+
name: "Direct Minting Daily Limit",
1356+
settingName: "directMintingDailyLimitUBA",
1357+
description:
1358+
"Maximum amount that can be directly minted per day, in base unit of the underlying asset (UBA). After that the mintings are delayed.",
1359+
values: {
1360+
flare: {
1361+
xrp: "-",
1362+
},
1363+
coston2: {
1364+
xrp: "500k TestXRP",
1365+
},
1366+
songbird: {
1367+
xrp: "-",
1368+
},
1369+
coston: {
1370+
xrp: "-",
1371+
},
1372+
},
1373+
},
1374+
{
1375+
name: "Direct Minting Large Minting Threshold",
1376+
settingName: "directMintingLargeMintingThresholdUBA",
1377+
description:
1378+
"Threshold above which a direct minting is considered large, in base unit of the underlying asset (UBA). Large mintings are always delayed.",
1379+
values: {
1380+
flare: {
1381+
xrp: "-",
1382+
},
1383+
coston2: {
1384+
xrp: "100k TestXRP",
1385+
},
1386+
songbird: {
1387+
xrp: "-",
1388+
},
1389+
coston: {
1390+
xrp: "-",
1391+
},
1392+
},
1393+
},
1394+
{
1395+
name: "Direct Minting Large Minting Delay",
1396+
settingName: "directMintingLargeMintingDelaySeconds",
1397+
description:
1398+
"Delay in seconds imposed on large direct mintings before they can be executed.",
1399+
values: {
1400+
flare: {
1401+
xrp: "-",
1402+
},
1403+
coston2: {
1404+
xrp: "1 hour",
1405+
},
1406+
songbird: {
1407+
xrp: "-",
1408+
},
1409+
coston: {
1410+
xrp: "-",
1411+
},
1412+
},
1413+
},
1414+
{
1415+
name: "Direct Minting Fee Receiver",
1416+
settingName: "directMintingFeeReceiver",
1417+
description: "Address that receives the direct minting fee.",
1418+
values: {
1419+
flare: {
1420+
xrp: "0x0000000000000000000000000000000000000000",
1421+
},
1422+
coston2: {
1423+
xrp: "0xDcDD7547EdA881b675B58c11922aF4A726cCb01B",
1424+
},
1425+
songbird: {
1426+
xrp: "0xDcDD7547EdA881b675B58c11922aF4A726cCb01B",
1427+
},
1428+
coston: {
1429+
xrp: "0xDcDD7547EdA881b675B58c11922aF4A726cCb01B",
1430+
},
1431+
},
1432+
},
1433+
],
1434+
},
1435+
{
1436+
title: "Redeem With Tag",
1437+
parameters: [
1438+
{
1439+
name: "Minimum Redeem Amount",
1440+
settingName: "minimumRedeemAmount",
1441+
description:
1442+
"Minimum amount that can be redeemed, in base unit of the underlying asset (UBA).",
1443+
values: {
1444+
coston2: {
1445+
xrp: "5 TestXRP",
1446+
},
1447+
},
1448+
},
12381449
],
12391450
},
12401451
];

0 commit comments

Comments
 (0)