diff --git a/docs/user/fassets/depositing-collateral-cli.md b/docs/user/fassets/depositing-collateral-cli.md new file mode 100644 index 000000000..4921a9aed --- /dev/null +++ b/docs/user/fassets/depositing-collateral-cli.md @@ -0,0 +1,74 @@ +--- +title: Depositing Collateral (CLI) +--- + +# Using the Command Line to Deposit Collateral + +As a user of the [FAssets](../../tech//fassets/index.md) system, you can deposit collateral into an agent's [collateral pool](../../tech/fassets/collateral.md#pool-collateral) to provide additional financial backing for the agent. +In exchange for your collateral, you will earn shares of the agent's fees. +Additionally, you will receive [collateral pool tokens](../../tech/fassets/collateral.md#pool-collateral), which you will be able to redeem, transfer, or trade. + +While the functionality to deposit collateral via a dapp is being developed, this guide is for users who have some experience using a terminal. +It provides the following information: + +* How to set up the FAssets command-line tool +* How to get a list of available agents +* How to deposit collateral into a selected agent's collateral pool + +--8<-- "./include/fassets/open-beta.md" + +--8<-- "./include/fassets/setup-commandline.md" + +### Configure User's Access Keys + +The FAsset user operates with multiple keys for the Flare and underlying network chains. + +1. Generate the user's secrets using this command: + + ```console + yarn key-gen generateSecrets --user -o secrets.json + ``` + + --8<-- "./include/fassets/generate-keys-info.md" + +2. Fund the user's FLR wallet with some CFLR to pay the gas fees. + You can find the user wallet's address in the `secrets.json` file under the `user.native.address` key. + You can get the CFLR tokens from the [Flare faucet](https://faucet.flare.network/). + +3. Prevent other users from reading the `secrets.json` file: + + ```console + chmod 600 secrets.json + ``` + +4. Fill the `indexer` field in the `secrets.json` file with the following values: + + ```json + "indexer": "123456", + ``` + + !!! info + + These values apply only to the [Coston Testnet](../../dev/reference/network-config.md) and will be different for other networks. + +## Depositing Collateral into an Agent's Collateral Pool + +The collateral pool can contain only `$CFLR`, so ensure you funded your wallet with tokens from the faucet, as described in step 2 above. + +1. Use the command below to list all available agents: + + ```console + yarn user-bot --fasset FTestXRP agents + ``` + + A list of agents is displayed. + +2. Copy the address of an agent in the list. +3. Use the command below to send your collateral to the agent. + Replace `AGENT_ADDRESS` with the address you copied in the previous step, and replace `CFLR_AMOUNT` with a portion of the funds you received from the faucet. + + ```console + yarn agent-bot buyPoolCollateral AGENT_ADDRESS CFLR_AMOUNT --fasset FTestXRP + ``` + + A message indicates the amount of collateral you successfully provided to the selected agent's collateral pool. diff --git a/docs/user/fassets/index.md b/docs/user/fassets/index.md index 502889888..234c7c1ee 100644 --- a/docs/user/fassets/index.md +++ b/docs/user/fassets/index.md @@ -1,6 +1,7 @@ -# Minting and Redeeming FAssets +# FAssets -The following guide explains how to mint and redeem [FAssets](../../tech/fassets/index.md). +The following guides explains how to manage [FAssets](../../tech/fassets/index.md). -* [Using the Command Line](./minting-redeeming-cli.md) -* [Using the FAssets Demo Dapp](./minting-redeeming-dapp.md) +* [Using the Command Line to Deposit Collateral](./depositing-collateral-cli.md) +* [Using the Command Line to Mint and Redeem FAssets](./minting-redeeming-cli.md) +* [Using the FAssets Demo Dapp to Mint and Redeem FAssets](./minting-redeeming-dapp.md) diff --git a/docs/user/fassets/minting-redeeming-cli.md b/docs/user/fassets/minting-redeeming-cli.md index 445d6fdad..e33a1faf5 100644 --- a/docs/user/fassets/minting-redeeming-cli.md +++ b/docs/user/fassets/minting-redeeming-cli.md @@ -1,13 +1,20 @@ +--- +title: Minting and Redeeming (CLI) +--- + # Using the Command Line to Mint and Redeem FAssets Users of the [FAssets](../../tech//fassets/index.md) system can mint and redeem FAssets, allowing tokens on blockchains that do not support smart contracts to be used trustlessly with smart contracts on the Flare blockchain. -This guide provides the following information: +This guide is for advanced users who having some experiencing using a terminal. +It provides the following information: * How to set up the FAssets command-line tool. * How to convert testnet XRP to FAssets (FTestXRP) on the Flare test network (minting). * How to convert FAssets (FTestXRP) from Flare test network back to testnet XRP Ledger network (redemption). +Alternatively, you can [use the dapp to mint and redeem FAssets](./minting-redeeming-dapp.md). + --8<-- "./include/fassets/open-beta.md" --8<-- "./include/fassets/setup-commandline.md" diff --git a/docs/user/fassets/minting-redeeming-dapp.md b/docs/user/fassets/minting-redeeming-dapp.md index c77d58b24..c5fd0224e 100644 --- a/docs/user/fassets/minting-redeeming-dapp.md +++ b/docs/user/fassets/minting-redeeming-dapp.md @@ -1,6 +1,11 @@ +--- +title: Minting and Redeeming (Dapp) +--- + # Using the FAssets Demo Dapp to Mint and Redeem FAssets Users of the [FAssets](../../tech//fassets/index.md) system can use the FAssets Demo Dapp with their [Bifrost wallet](https://bifrostwallet.com/?utm_source=flare_network&utm_medium=blog&utm_campaign=fasset_open_beta) to mint and redeem FAssets, which allow tokens on blockchains that do not support smart contracts to be used trustlessly with smart contracts on the Flare blockchain. +Alternatively, you can [use the command line to mint and redeem FAssets](./minting-redeeming-cli.md). In this guide you will deposit some test XRP tokens into an XRP account and use the FAssets system to mint them into FTestXRP FAsset tokens on the Coston network. You will receive these tokens in a Coston account. diff --git a/include/fassets/setup-commandline.md b/include/fassets/setup-commandline.md index 7a11900a0..9602caa96 100644 --- a/include/fassets/setup-commandline.md +++ b/include/fassets/setup-commandline.md @@ -1,8 +1,8 @@ ## Prerequisites -To participate in the open beta, you need a server with at least a minimum of 2 CPUs and 4GB RAM, or 2GB if the database is on a separate server. +You need a server with at least a minimum of 2 CPUs and 4GB RAM, or 2GB if the database is on a separate server. -You will need knowledge of the following tools: +You need knowledge of the following tools: * [Git](https://git-scm.com/) version control system * [Yarn](https://yarnpkg.com/) package manager diff --git a/mkdocs.yml b/mkdocs.yml index 37f2a8378..31c8f42cd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -319,6 +319,7 @@ nav: - user/automatic-claiming.md - FAssets: - user/fassets/index.md + - user/fassets/depositing-collateral-cli.md - user/fassets/minting-redeeming-cli.md - user/fassets/minting-redeeming-dapp.md - Governance: