├── .gitattributes ├── .github ├── CODEOWNERS └── workflows │ └── deploy-docs.yml ├── .gitignore ├── .gitlab-ci.yml ├── .mailmap ├── .vscode ├── extensions.json └── settings.json ├── CODEOWNERS ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE.md ├── README.md ├── compose.yaml ├── docgen ├── .gitignore ├── README.md ├── build-docs.sh ├── build-openapi-spec.sh ├── flare-smart-contracts-v2.list ├── flare-smart-contracts.list ├── hardhat.config.ts.patch ├── repos.list ├── state-connector-protocol.list └── template │ ├── common.hbs │ ├── contract.hbs │ ├── enum.hbs │ ├── error.hbs │ ├── event.hbs │ ├── function.hbs │ ├── helpers.ts │ ├── modifier.hbs │ ├── node-type.hbs │ ├── page.hbs │ ├── struct.hbs │ ├── user-defined-value-type.hbs │ └── variable.hbs ├── docs ├── CNAME ├── assets │ ├── images │ │ ├── dev │ │ │ ├── reference │ │ │ │ ├── ftso-delegation.png │ │ │ │ ├── ftso-system.png │ │ │ │ ├── logo-C2FLR.png │ │ │ │ ├── logo-CFLR.png │ │ │ │ ├── logo-FLR.png │ │ │ │ └── logo-SGB.png │ │ │ ├── setup │ │ │ │ ├── foundry1.png │ │ │ │ ├── foundry2.png │ │ │ │ ├── foundry3.png │ │ │ │ ├── hardhat1.png │ │ │ │ ├── hardhat2.png │ │ │ │ ├── remix1.png │ │ │ │ ├── remix2.png │ │ │ │ ├── remix3.png │ │ │ │ ├── remix4.png │ │ │ │ ├── remix5.png │ │ │ │ ├── truffle1.png │ │ │ │ ├── truffle2.png │ │ │ │ ├── truffle3.png │ │ │ │ └── truffle4.png │ │ │ └── tutorials │ │ │ │ └── SC-basic-tutorial.png │ │ ├── exchange │ │ │ ├── exchanges-deposits.png │ │ │ ├── exchanges-general.png │ │ │ └── exchanges-withdrawals.png │ │ ├── home │ │ │ ├── api-reference-card-bkg.png │ │ │ ├── developer-guides-card-bkg.png │ │ │ ├── flare-concepts-card-bkg.png │ │ │ ├── flare-products-card-bkg.png │ │ │ ├── get-started-card-bkg.png │ │ │ ├── infrastructure-card-bkg.png │ │ │ └── user-guide-card-bkg.png │ │ ├── infra │ │ │ ├── data │ │ │ │ ├── collusion-tool-dashboard.png │ │ │ │ ├── collusion-tool-weighted.png │ │ │ │ ├── price-history-dashboard.png │ │ │ │ ├── price-history-providers.png │ │ │ │ ├── price-history-sgb-providers.png │ │ │ │ └── price-history.png │ │ │ └── fassets │ │ │ │ ├── fassets-admin-dashboard.png │ │ │ │ ├── fassets-admin-vaults-menu.png │ │ │ │ ├── fassets-admin-vaults-view.png │ │ │ │ └── fassets-admin-vaults.png │ │ ├── tech │ │ │ ├── SC-CCCR-overlapped.png │ │ │ ├── SC-CCCR.png │ │ │ ├── SC-architecture.png │ │ │ ├── SC-attestation-provider.png │ │ │ ├── SC-branching-resolution-1.png │ │ │ ├── SC-branching-resolution-2.png │ │ │ ├── SC-branching.png │ │ │ ├── SC-intro.png │ │ │ ├── SC-local-AP-1.png │ │ │ ├── SC-local-AP-2.png │ │ │ ├── SC-proof-unpacking.png │ │ │ ├── archive │ │ │ │ └── launch-process.png │ │ │ ├── executor-process-with.png │ │ │ ├── executor-process-without.png │ │ │ ├── fassets-collateral.png │ │ │ ├── fassets-cr.png │ │ │ ├── fassets-fees.png │ │ │ ├── fassets-minting.png │ │ │ ├── fassets-redeeming.png │ │ │ ├── fassets-system-overview.png │ │ │ ├── fassets-tokens.png │ │ │ ├── flare-network-types.png │ │ │ ├── flare-systems-protocol-architecture.png │ │ │ ├── flaredrop-average-of-3-weeks.png │ │ │ ├── ftso-fu-values-incentivized.png │ │ │ ├── ftso-fu-values.png │ │ │ ├── ftso-fu-workflow.png │ │ │ ├── ftso-price.png │ │ │ ├── ftso-summary.png │ │ │ ├── ftso-v2-weight.png │ │ │ ├── ftso-weight.png │ │ │ ├── ftso-workflow.png │ │ │ ├── gov-changes-in-number-of-votes.png │ │ │ ├── gov-voting-process.png │ │ │ ├── tokenomics-distribution.png │ │ │ ├── tokenomics-macro.png │ │ │ ├── tokenomics-schedule.png │ │ │ └── validator-network.png │ │ └── user │ │ │ ├── block-explorer │ │ │ ├── block-explorer-balance.png │ │ │ ├── block-explorer-blocks.png │ │ │ ├── block-explorer-current-epoch.png │ │ │ ├── block-explorer-dashboard.png │ │ │ ├── block-explorer-history.png │ │ │ ├── block-explorer-internal-tx.png │ │ │ ├── block-explorer-internal.png │ │ │ ├── block-explorer-logs.png │ │ │ ├── block-explorer-raw-trace.png │ │ │ ├── block-explorer-read-wallet.png │ │ │ ├── block-explorer-tokens.png │ │ │ ├── block-explorer-transaction-types.png │ │ │ ├── block-explorer-transactions.png │ │ │ ├── block-explorer-transfers.png │ │ │ ├── block-explorer-tx-details.png │ │ │ ├── block-explorer-tx-hash.png │ │ │ ├── block-explorer-vp-snapshot.png │ │ │ └── block-explorer-write-wallet.png │ │ │ ├── delegation │ │ │ ├── delegation-portal-connect.png │ │ │ ├── delegation-portal-main.png │ │ │ ├── delegation-portal-providers.png │ │ │ └── rewards-portal-claim.png │ │ │ ├── executor │ │ │ ├── executor-portal-confirmed.png │ │ │ ├── executor-portal-main.png │ │ │ └── executor-portal-preset.png │ │ │ ├── fassets │ │ │ ├── dapp-bifrost-confirm.png │ │ │ ├── dapp-bifrost-connect.png │ │ │ ├── dapp-faucet-cflr.png │ │ │ ├── dapp-faucet-xrp.png │ │ │ ├── dapp-ftestxrp-balance.png │ │ │ ├── dapp-ftestxrp-confirm.png │ │ │ ├── dapp-ftestxrp-lots.png │ │ │ ├── dapp-ftestxrp-mint.png │ │ │ ├── dapp-ftestxrp-progress.png │ │ │ ├── dapp-ftestxrp-reserve.png │ │ │ ├── dapp-receive-address-cflr.png │ │ │ ├── dapp-receive-address.png │ │ │ ├── dapp-receive-result-cflr.png │ │ │ ├── dapp-receive-result.png │ │ │ ├── dapp-receive.png │ │ │ ├── dapp-settings.png │ │ │ └── dapp-tokens-balances.png │ │ │ ├── flaredrop │ │ │ ├── flaredrop-claim-confirmation.png │ │ │ ├── flaredrop-claim-distribution.png │ │ │ └── flaredrop-distribution-dates.png │ │ │ ├── pda │ │ │ ├── pda-enabled.png │ │ │ ├── pda-faqs-enable.png │ │ │ ├── pda-main-account-opens.png │ │ │ └── pda-user-delegation-account.png │ │ │ ├── staking │ │ │ ├── flarestake-add-delegation.png │ │ │ ├── flarestake-bind-addresses.png │ │ │ ├── flarestake-manage-rewards.png │ │ │ ├── flarestake-menu-cross-chain.png │ │ │ ├── flarestake-menu-staking.png │ │ │ └── flarestake-select-address.png │ │ │ ├── wallets │ │ │ └── safepal-songbird-logo.png │ │ │ ├── wrapping-portal-faq-add-wrapped.png │ │ │ └── wrapping-portal-help.png │ ├── javascripts │ │ ├── connect_wallet.js │ │ ├── dev-hub-notice.js │ │ ├── ethers-6.3.esm.min.js │ │ ├── images.js │ │ ├── links.js │ │ ├── mathjax.js │ │ └── scroll.js │ ├── overrides │ │ ├── 404.html │ │ ├── logo.svg │ │ ├── main.html │ │ └── partials │ │ │ ├── copyright.html │ │ │ ├── footer.html │ │ │ ├── header.html │ │ │ ├── integrations │ │ │ └── analytics │ │ │ │ └── gtm.html │ │ │ └── logo.html │ ├── stylesheets │ │ └── extra.css │ └── thumbnails │ │ ├── fassets-concept.png │ │ ├── launch-process-thumb.png │ │ └── tutorial-ftso-1.png ├── developer-hub.md ├── favicon.png ├── google3bfa582f85e44cb8.html ├── index.md ├── samples │ ├── ftso │ │ ├── GetRandomNumber.js │ │ ├── GetRandomNumber.sol │ │ ├── GetRandomNumber.t.sol │ │ ├── GettingDataFeeds.js │ │ ├── GettingDataFeeds.sol │ │ ├── GettingDataFeeds.t.sol │ │ ├── TestGetRandomNumber.js │ │ └── TestGettingDataFeeds.js │ ├── sc │ │ ├── AddressValidity.js │ │ └── EVMTransaction.js │ └── tests │ │ └── wrap.js ├── tech │ ├── api-portal.md │ ├── archive │ │ ├── flare-launch-process.md │ │ ├── ftso-v1.md │ │ └── index.md │ ├── automatic-claiming.md │ ├── data-connector.md │ ├── flare-beta.md │ ├── flare-systems-protocol.md │ ├── flare.md │ ├── ftso │ │ └── index.md │ ├── glossary.md │ ├── governance.md │ ├── index.md │ ├── personal-delegation-account.md │ ├── the-flaredrop.md │ ├── tokenomics.md │ └── validators.md └── user │ ├── automatic-claiming.md │ ├── claiming-the-flaredrop.md │ ├── delegation │ ├── index.md │ ├── managing-delegations.md │ └── managing-rewards.md │ ├── governance │ ├── index.md │ └── voting.md │ ├── index.md │ ├── personal-delegation-account.md │ ├── staking │ ├── index.md │ ├── staking-cli.md │ ├── staking-flarestake.md │ └── staking-portal.md │ ├── wallets │ ├── bifrost-wallet.md │ ├── brave-wallet.md │ ├── dcent-wallet.md │ ├── enkrypt-wallet.md │ ├── how-to-access-flare-network-with-a-ledger-device.md │ ├── how-to-access-flare-network-with-a-trezor-device.md │ ├── how-to-access-flare-network-with-metamask.md │ ├── index.md │ └── safepal-s1-wallet.md │ └── wrapping-tokens.md ├── include ├── openapi.md ├── runner.md └── wallet-warning.md ├── mkdocs.yml ├── readme ├── add-to-github.jpeg ├── add-to-gitlab.jpeg ├── click-add-key.jpeg ├── click-preference.jpeg ├── click-ssh.jpg ├── docker-desktop-container-details.png ├── docker-desktop-open-container.png ├── docker-desktop-start.png └── docker-desktop-stop.png ├── requirements.txt └── runtime.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # So GitHub and GitLab correctly show Markdown as a language 2 | *.md linguist-detectable 3 | * linguist-documentation=false linguist-vendored=false 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This and ../CODEOWNERS files must match 2 | 3 | * @segfaultxavi 4 | .github/workflows @aljazs-flare 5 | .gitlab-ci.yml @aljazs-flare 6 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docs.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: actions/setup-python@v2 14 | with: 15 | python-version: 3.x 16 | - run: pip install -r requirements.txt 17 | - run: mkdocs build --verbose --strict 18 | - uses: actions/upload-pages-artifact@v3.0.1 19 | with: 20 | path: ./public 21 | 22 | deploy: 23 | needs: build 24 | permissions: 25 | pages: write # to deploy to Pages 26 | id-token: write # to verify the deployment originates from an appropriate source 27 | environment: 28 | name: github-pages 29 | url: ${{ steps.deployment.outputs.page_url }} 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Deploy to GitHub Pages 33 | id: deployment 34 | uses: actions/deploy-pages@v4 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public 2 | .cache/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - template: Jobs/SAST.latest.gitlab-ci.yml 3 | - template: Jobs/Secret-Detection.latest.gitlab-ci.yml 4 | 5 | 6 | ## 7 | ## TESTS 8 | ## 9 | 10 | sast: 11 | needs: [] 12 | 13 | secret_detection: 14 | needs: [] 15 | 16 | 17 | 18 | 19 | ## 20 | ## GITLAB PAGES SETUP 21 | ## 22 | 23 | pages: 24 | needs: [] 25 | image: python:3.10-buster 26 | stage: deploy 27 | environment: 28 | name: production 29 | url: https://${CI_PROJECT_ROOT_NAMESPACE}.gitlab.io/docs-team/docs/ 30 | action: start 31 | variables: 32 | GIT_DEPTH: 0 33 | REPO_NAME: ${CI_PROJECT_PATH} 34 | REPO_URL: ${CI_PROJECT_URL} 35 | EDIT_URL: https://gitlab.com/-/ide/project/${CI_PROJECT_PATH}/tree/${CI_COMMIT_REF_NAME}/-/docs/ 36 | cache: 37 | key: 38 | files: 39 | - requirements.txt 40 | paths: 41 | - .cache 42 | before_script: 43 | - if [ -d "public" ]; then echo "Directory ./public exists while it should not as it is used for docs artifacts" && exit 1; fi 44 | - pip install -q -r requirements.txt 1> /dev/null 45 | - | 46 | # install for sponge 47 | apt-get update 1> /dev/null 48 | apt-get install moreutils -qqy curl 1> /dev/null 49 | # like jq, but for yml - https://github.com/mikefarah/yq 50 | wget --quiet https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq 51 | - | 52 | # modify link in navbar according to current git branch (ref) 53 | cat mkdocs.yml | /usr/bin/yq '.repo_url = strenv(REPO_URL)' | sponge mkdocs.yml 54 | cat mkdocs.yml | /usr/bin/yq '.edit_uri = strenv(EDIT_URL)' | sponge mkdocs.yml 55 | cat mkdocs.yml | /usr/bin/yq '.repo_name = strenv(REPO_NAME)' | sponge mkdocs.yml 56 | cat mkdocs.yml | /usr/bin/yq '.site_url = strenv(CI_ENVIRONMENT_URL)' | sponge mkdocs.yml 57 | script: 58 | - | 59 | set -o pipefail 60 | mkdocs build --verbose --strict 2>&1 | tee -a /tmp/mkdocs.build.log || { cat /tmp/mkdocs.build.log | grep "WARNING"; exit 1; } 61 | test -f public/index.html && echo "View the generated docs at $CI_ENVIRONMENT_URL" 62 | artifacts: 63 | expire_in: 3 days 64 | paths: 65 | - public 66 | rules: 67 | - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH 68 | 69 | mkdocs-preview: 70 | extends: pages 71 | stage: build 72 | environment: 73 | name: review/$CI_COMMIT_REF_SLUG 74 | url: https://${CI_PROJECT_ROOT_NAMESPACE}.gitlab.io/-/docs-team/docs/-/jobs/$CI_JOB_ID/artifacts/public/index.html 75 | before_script: 76 | - !reference [pages, before_script] 77 | - cat mkdocs.yml | /usr/bin/yq '.use_directory_urls = false' | sponge mkdocs.yml 78 | rules: 79 | - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH 80 | when: never 81 | - if: $CI_MERGE_REQUEST_IID == null 82 | variables: 83 | REPO_URL: ${CI_PROJECT_URL}/-/tree/${CI_COMMIT_REF_NAME} 84 | REPO_NAME: ${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME} 85 | - if: $CI_MERGE_REQUEST_IID != null 86 | variables: 87 | REPO_NAME: ${CI_PROJECT_PATH}!${CI_MERGE_REQUEST_IID} 88 | REPO_URL: ${CI_PROJECT_URL}/-/merge_requests/${CI_MERGE_REQUEST_IID} 89 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Steven Gregg <117661781+stevenflare@users.noreply.github.com> 2 | Swarnabha Sinha 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "davidanson.vscode-markdownlint", 4 | "gitlab.gitlab-workflow", 5 | "redhat.vscode-yaml" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdownlint.config": { 3 | "MD004": { // All lists should use asterisks 4 | "style": "asterisk" 5 | }, 6 | "MD007": { 7 | "indent": 4 // Unordered lists indented by 4, as per the standard 8 | }, 9 | "MD013": false, // We allow long lines 10 | "MD033": false, // We allow inline HTML 11 | "MD026": { // We do not allow this specific trailing punctuation in headers 12 | "punctuation": ".,;:" 13 | }, 14 | "MD024": { 15 | "siblings_only": true // Allow headers with same name if they are not siblings 16 | }, 17 | "MD025": false, // We allow both H1 and front matter titles, to have shorter TOCs but full page titles 18 | "MD042": false, // We sometimes use empty links to create buttons 19 | "MD046": false, // Because Admonition indentation looks like an indented code block 20 | }, 21 | "yaml.customTags": [ 22 | "!reference sequence" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This and .github/CODEOWNERS files must match 2 | 3 | * @segfaultxavi 4 | .github/workflows @aljazs-flare 5 | .gitlab-ci.yml @aljazs-flare 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM squidfunk/mkdocs-material 2 | 3 | COPY requirements.txt requirements.txt 4 | 5 | RUN pip install -r requirements.txt 6 | 7 | COPY . ./ -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2023 Flare Networks. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flare Documentation 2 | 3 | [![pipeline status](https://gitlab.com/flarenetwork/docs-team/docs/badges/main/pipeline.svg)](https://gitlab.com/flarenetwork/docs-team/docs/-/commits/main) 4 | 5 | # ⚠️ REPOSITORY DEPRECATED ⚠️ 6 | # 🚨 PLEASE GO TO THE FLARE DEVELOPER HUB INSTEAD: https://github.com/flare-foundation/developer-hub 🚨 7 | 8 | This is the source repository for the [Flare docs](https://docs.flare.network/) site. 9 | 10 | ## Run locally 11 | 12 | To get started, you have two main options for setting up your development environment: utilizing a Docker container or a manual setup. While both methods are effective, we recommend using a Docker container to avoid version discrepancies with the rest of the team. 13 | 14 | ### Using Docker Container 15 | 16 | 1. [Download](https://www.docker.com/products/docker-desktop/) and install Docker Desktop 17 | 18 | 2. In the command line navigate to the repository folder and build the docker container with the command: 19 | 20 | ```bash 21 | docker compose up --no-start 22 | ``` 23 | 24 | 3. After this step, You can run it from the Docker Desktop app. Open Docker Desktop, navigate to the Containers section, and run the `docs-private` container. 25 | 26 | ![Start Flare Docs in Docker Desktop](/readme/docker-desktop-start.png) 27 | 28 | 4. To see the console logs or errors, open the Docker Desktop app and go to the `docs-private` container details under the containers section. 29 | 30 | ![Open Container details in Docker Desktop](/readme/docker-desktop-open-container.png) 31 | 32 | Check all the warnings because the automatic build process will not accept them when creating a pull request. 33 | 34 | ![Container details in Docker Desktop](/readme/docker-desktop-container-details.png) 35 | 36 | 5. From your browser, go to URL [localhost:8000](http://localhost:8000/) to see the documentation page. 37 | 38 | 6. Press the stop button in the Docker Desktop app to stop it. 39 | 40 | ![STOP Flare Docs in Docker Desktop](/readme/docker-desktop-stop.png) 41 | 42 | ### Manual Setup 43 | 44 | 1. [Download](https://www.python.org/downloads/) and install Python. 45 | 46 | 2. [Install](https://pip.pypa.io/en/stable/installation/) PIP, the Python package manager. 47 | 48 | 3. Install required packages. 49 | 50 | ```bash 51 | pip install -r requirements.txt 52 | ``` 53 | 54 | 4. To run locally, execute this command. When you want to stop the server, press Ctrl + C. 55 | 56 | ```bash 57 | mkdocs serve 58 | ``` 59 | 60 | 5. From your browser, go to URL [localhost:8000](http://localhost:8000/) to see the documentation page. -------------------------------------------------------------------------------- /compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | mkdocs: 3 | volumes: 4 | - .:/docs 5 | restart: unless-stopped 6 | build: . 7 | develop: 8 | watch: 9 | - action: sync 10 | path: docs 11 | target: /docs 12 | - action: rebuild 13 | path: requirements.txt 14 | ports: 15 | - "8000:8000" 16 | environment: 17 | LIVE_RELOAD_SUPPORT: 'true' -------------------------------------------------------------------------------- /docgen/.gitignore: -------------------------------------------------------------------------------- 1 | flare-smart-contracts 2 | state-connector-protocol 3 | flare-smart-contracts-v2 4 | attestation-client 5 | evm-verifier 6 | -------------------------------------------------------------------------------- /docgen/README.md: -------------------------------------------------------------------------------- 1 | # Automatically Generate Documentation for Smart Contracts with Docgen 2 | 3 | ## 1. Set Up SSH for GitLab/GitHub Account 4 | 5 | To run the script you will need to have access to a GitLab/GitHub (or other Git hosting service) account with SSH set up. If you already have one, proceed to the next step. 6 | 7 | If not, follow these steps to set up SSH: 8 | 9 | ### 1.1 Generate a new SSH key 10 | 11 | Open a terminal window and run the following command to generate a new SSH key if you do not already have one on your machine. 12 | 13 | You will need to replace `your_email@example.com` with your email address: 14 | 15 | ```bash 16 | ssh-keygen -t ed25519 -C "your_email@example.com" 17 | ``` 18 | 19 | If you want to use RSA instead of ED25519, you can run: 20 | 21 | ```bash 22 | ssh-keygen -t rsa -b 4096 -C "your_email@example.com" 23 | ``` 24 | 25 | ### 1.2 Copy your SSH public key 26 | 27 | You can copy your public SSH key to your clipboard with the command `pbcopy < ~/.ssh/id_ed25519.pub`, replacing `id_ed25519.pub` with the name of your SSH key file. 28 | 29 | If you are on a Windows machine use `clip < ~/.ssh/id_ed25519.pub` instead. 30 | 31 | Alternatively, locate your SSH key file manually (ends in `.pub`) and copy its contents. 32 | 33 | ### 1.3 Add your SSH key to your GitLab/GitHub account 34 | 35 | #### GitLab 36 | 37 | To [add a new SSH key](https://gitlab.com/-/profile/keys) to your GitLab account: 38 | 39 | Log in to your GitLab account and click on your avatar in the top left corner. 40 | 41 | Click on “Preferences” from the dropdown menu. 42 | 43 | ![Click on Preferences](/readme/click-preference.jpeg) 44 | 45 | In the left sidebar, click on “SSH Keys”. 46 | 47 | ![Click on SSH keys](/readme/click-ssh.jpg) 48 | 49 | Click on "Add new key" 50 | 51 | ![Click Add key](/readme/click-add-key.jpeg) 52 | 53 | Paste your public SSH key into the “Key” field. 54 | 55 | Enter the key title, select a usage type, and enter an optional expiry date. 56 | 57 | Click the “Add key” button. 58 | 59 | ![Add key to Gitlab](/readme/add-to-gitlab.jpeg) 60 | 61 | #### GitHub 62 | 63 | To [add a new SSH key](https://github.com/settings/ssh/new) to your GitHub account: 64 | 65 | Log in to your GitLab account and click on your avatar in the top right corner. 66 | 67 | Click on “Settings” from the dropdown menu. 68 | 69 | Click on "SSH and GPG keys" in the left sidebar. 70 | 71 | Click "New SSH key". 72 | 73 | Enter a title and paste in your public SSH key, then click "Add SSH key". 74 | 75 | ![Add key to Github](/readme/add-to-github.jpeg) 76 | 77 | **Note**: Ensure that your GitHub/GitLab account is set up to use the specific SSH key you are currently using to avoid a `Permission denied (publickey)` error. 78 | 79 | ## 2. Add Desired Repos to `repos.list` 80 | 81 | The `repos.list` file contains the links to the code repos you wish to generate documentation for. 82 | 83 | To add a new repo to `repos.list`, enter the following on one line, separated by whitespace: 84 | 85 | * The git URL of the repo. 86 | * Branch where the documentation resides. 87 | * URL where the public source code resides. 88 | * The hardhat config file, typically `hardhat.config.ts` or `hardhatSetup.config.ts`. 89 | * The command required to build the repo. It can contain spaces since this is the last item in the line. 90 | 91 | ### Example 92 | 93 | ```bash 94 | git@gitlab.com:flarenetwork/state-connector-protocol.git STAT-28 https://github.com/flare-foundation/songbird-state-connector-protocol/tree/main hardhat.config.ts yarn hardhat compile 95 | ``` 96 | 97 | This generates docs from the `STAT-28` branch in the gitlab repo. 98 | But the gitlab repo is private, so a different URL is used to provide links to the source code. 99 | The Hardhat config file is `hardhat.config.ts` and the command to build the repo is `yarn hardhat compile`. 100 | 101 | ## 3. Run `build-docs.sh` 102 | 103 | In your terminal, navigate to the `docgen` folder. 104 | 105 | Run the following command: 106 | 107 | ```bash 108 | sh build-docs.sh 109 | ``` 110 | 111 | Enter your SSH key passphrase if prompted. 112 | 113 | Each repo in your `repos.list` file will be cloned and documentation (in Markdown) will be automatically generated for it. This process can take quite some time. 114 | 115 | The generated docs will be saved in a `/docs/apis/smart-contracts` directory and an `index.md` file, which contains a grouped list of docs, is also saved in the same directory. 116 | 117 | After the script has generated the documentation and updated the `index.md` file, you can preview the documentation locally using this command: 118 | 119 | ```bash 120 | mkdocs serve 121 | ``` 122 | 123 | If any changes are made to the documentation (i.e., if any smart contract comments have been updated), the script stages these changes and creates a new commit in your local Git repository. 124 | 125 | After the commit is created, you can review the changes. If everything looks good, you can manually push the commit to the remote repository. 126 | 127 | # Automatically Generate REST API Docs from Source Code Comments 128 | 129 | Generate REST API documentation automatically from source code comments in JSON format. 130 | 131 | ## Install jq 132 | 133 | Install jq to run the script. It is a lightweight and flexible command-line JSON processor. 134 | 135 | ```bash 136 | sudo apt install jq 137 | ``` 138 | 139 | ## Usage 140 | 141 | To generate the REST API documentation, run the `build-openapi-spec.sh` script followed by a type argument. Available types are: `btc`, `doge`, `xrp`, `proof`, `evm`. 142 | 143 | ```bash 144 | sh build-openapi-spec.sh 145 | ``` -------------------------------------------------------------------------------- /docgen/build-docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # See README.md for usage instructions. 4 | 5 | set -e 6 | 7 | YELLOW="\e[93m" 8 | NORMAL="\e[0m" 9 | 10 | contracts="" 11 | interfaces="" 12 | internal_interfaces="" 13 | commits="" 14 | 15 | while IFS=' ' read -r repo_url repo_branch repo_source_path hardhat_config_file build_command || [ -n "$build_command" ]; 16 | do 17 | repo_name=$(basename $repo_url .git) 18 | echo -e "\n${YELLOW}Clonning $repo_name:${NORMAL}" 19 | rm -rf $repo_name 20 | git clone $repo_url 21 | cd $repo_name 22 | git checkout $repo_branch 23 | 24 | echo -e "\n${YELLOW}Adding docgen to $repo_name:${NORMAL}" 25 | yarn add solidity-docgen 26 | sed -i='' -E "1s/^/import 'solidity-docgen';\n/" $hardhat_config_file 27 | sed -i='' -E "/HardhatUserConfig = / r ../hardhat.config.ts.patch" $hardhat_config_file 28 | cp -r ../template . 29 | sed -i='' "s#^const flareRepoURL =.*#const flareRepoURL = '${repo_source_path}';#g" template/helpers.ts 30 | 31 | echo -e "\n${YELLOW}Compiling $repo_name:${NORMAL}" 32 | eval ${build_command} 33 | 34 | echo -e "\n${YELLOW}Building docs for $repo_name:${NORMAL}" 35 | yarn hardhat docgen 36 | 37 | commits=$(printf "${commits} ${repo_name} $(git rev-parse --short HEAD)") 38 | 39 | cd .. 40 | while IFS='' read -r contract_path || [ -n "$contract_path" ]; 41 | do 42 | name=$(basename $contract_path) 43 | path="${repo_name}/docs/api/${contract_path}" 44 | case $name in 45 | II[A-Z]*) 46 | internal_interfaces="${internal_interfaces} ${path}" 47 | ;; 48 | I[A-Z]*) 49 | interfaces="${interfaces} ${path}" 50 | ;; 51 | [A-Z]*) 52 | contracts="${contracts} ${path}" 53 | ;; 54 | esac 55 | done < "${repo_name}.list" 56 | 57 | done < "repos.list" 58 | 59 | docs=../docs/apis/smart-contracts 60 | 61 | # $1 Title 62 | # $2 Subtitle 63 | # $3... List of filenames 64 | print_index () { 65 | echo >> $docs/index.md 66 | echo "## $1" >> $docs/index.md 67 | [[ $2 ]] && echo -e "\n$2" >> $docs/index.md 68 | shift 2 69 | echo >> $docs/index.md 70 | echo "| Name | Description |" >> $docs/index.md 71 | echo "| ---- | ----------- |" >> $docs/index.md 72 | 73 | rm -f build-docs.tmp 74 | for f in $@; 75 | do 76 | name=$(sed -n '2 s/title: //p' $f) 77 | # Get the 15th line of the contract md file, where the description lies. 78 | description=$(sed '15q;d' $f) 79 | # If the description starts with <, the contract has no description. 80 | [[ $description = "" ]] && description="" 81 | echo "| [\`$name\`](./$name.md) | $description |" >> build-docs.tmp 82 | done 83 | sort -k2,2 -t'`' build-docs.tmp >> $docs/index.md 84 | rm build-docs.tmp 85 | } 86 | 87 | # $1... List of filenames 88 | print_yml () { 89 | rm -f build-docs.tmp 90 | for f in $@; 91 | do 92 | echo " - apis/smart-contracts/$(basename $f)" >> build-docs.tmp 93 | done 94 | sort -k1,1 -t. build-docs.tmp >> ../mkdocs.yml.tmp 95 | rm build-docs.tmp 96 | } 97 | 98 | echo -e "\n${YELLOW}Building index pages:${NORMAL}" 99 | 100 | # Generate index.md 101 | echo "# Smart Contracts API" > $docs/index.md 102 | echo >> $docs/index.md 103 | echo "" >> $docs/index.md 104 | echo >> $docs/index.md 105 | echo "List of Flare smart contracts." >> $docs/index.md 106 | print_index "Contracts" "" "$contracts" 107 | print_index "Interfaces" "" "$interfaces" 108 | print_index "Internal Interfaces" "For platform development, not application." "$internal_interfaces" 109 | echo >> $docs/index.md 110 | echo "" >> $docs/index.md 111 | 112 | # Generate mkdocs.yml entries 113 | # Keep lines after OpenAPI REST 114 | sed -n '/OpenAPI REST API/,$p' ../mkdocs.yml > ../mkdocs-bottom.yml.tmp 115 | # Remove all lines below "Smart Contracts API" 116 | sed '/- Smart Contracts API:/,$d' ../mkdocs.yml > ../mkdocs.yml.tmp 117 | # Now list all files 118 | echo " - Smart Contracts API:" >> ../mkdocs.yml.tmp 119 | echo " - apis/smart-contracts/index.md" >> ../mkdocs.yml.tmp 120 | print_yml $contracts 121 | print_yml $interfaces 122 | print_yml $internal_interfaces 123 | cat ../mkdocs.yml.tmp ../mkdocs-bottom.yml.tmp > ../mkdocs.yml 124 | rm ../mkdocs.yml.tmp 125 | rm ../mkdocs-bottom.yml.tmp 126 | 127 | # Copy all pages to the docs repo 128 | attestation_types=$(ls ../docs/apis/attestation-types) 129 | attestation_types=$(echo $attestation_types | sed "s/ /|/g") 130 | for f in $contracts $interfaces $internal_interfaces; 131 | do 132 | # In the process, special-case links to files that exist in the "attestation-types" folder, 133 | # and replace them with the correct link. 134 | cat $f | sed -E "s%(\[[^]]*\]\()\./(($attestation_types)\))%\1../attestation-types/\2%g" > $docs/$(basename $f) 135 | # And insert a search de-boost, since these pages should not typically be the first result returned by search. 136 | sed -i='' '2 a \ 137 | search:\ 138 | boost: 0.5' $docs/$(basename $f) 139 | done 140 | sed -i='' -E "s%(\[[^]]*\]\()\./(($attestation_types)\))%\1../attestation-types/\2%g" $docs/index.md 141 | 142 | # Commit and push changes 143 | # If there are no changes, nothing will be committed nor pushed. 144 | git add ../docs/apis/smart-contracts 145 | git add ../mkdocs.yml 146 | git commit -m "Sync API ref docs with smart contracts" -m "$commits" 147 | #git push 148 | 149 | echo -e "\n${YELLOW}Done!${NORMAL}" 150 | -------------------------------------------------------------------------------- /docgen/flare-smart-contracts-v2.list: -------------------------------------------------------------------------------- 1 | ftso/implementation/FtsoFeedDecimals.md 2 | ftso/implementation/FtsoFeedPublisher.md 3 | ftso/implementation/FtsoInflationConfigurations.md 4 | ftso/implementation/FtsoRewardOffersManager.md 5 | ftso/interface/IIFtsoFeedPublisher.md 6 | governance/implementation/Governor.md 7 | governance/implementation/GovernorProposals.md 8 | governance/implementation/GovernorVotes.md 9 | governance/implementation/PollingFoundation.md 10 | governance/implementation/PollingFtso.md 11 | governance/interface/IIGovernorProposer.md 12 | governance/interface/IIPollingFoundation.md 13 | inflation/implementation/InflationReceiver.md 14 | protocol/implementation/EntityManager.md 15 | protocol/implementation/FlareSystemsCalculator.md 16 | protocol/implementation/FlareSystemsManager.md 17 | protocol/implementation/Relay.md 18 | protocol/implementation/RewardManager.md 19 | protocol/implementation/RewardOffersManagerBase.md 20 | protocol/implementation/Submission.md 21 | protocol/implementation/VoterRegistry.md 22 | protocol/implementation/WNatDelegationFee.md 23 | protocol/interface/IICleanupBlockNumberManager.md 24 | protocol/interface/IIEntityManager.md 25 | protocol/interface/IIFlareSystemsCalculator.md 26 | protocol/interface/IIFlareSystemsManager.md 27 | protocol/interface/IIRelay.md 28 | protocol/interface/IIRewardEpochSwitchoverTrigger.md 29 | protocol/interface/IIRewardManager.md 30 | protocol/interface/IISubmission.md 31 | protocol/interface/IIVoterRegistrationTrigger.md 32 | protocol/interface/IIVoterRegistry.md 33 | userInterfaces/ICChainStake.md 34 | userInterfaces/ICChainVotePower.md 35 | userInterfaces/IEntityManager.md 36 | userInterfaces/IFlareSystemsCalculator.md 37 | userInterfaces/IFlareSystemsManager.md 38 | userInterfaces/IFtsoFeedDecimals.md 39 | userInterfaces/IFtsoFeedPublisher.md 40 | userInterfaces/IFtsoInflationConfigurations.md 41 | userInterfaces/IFtsoRewardOffersManager.md 42 | userInterfaces/IGovernor.md 43 | userInterfaces/IPollingFtso.md 44 | userInterfaces/IRandomProvider.md 45 | userInterfaces/IRelay.md 46 | userInterfaces/IRewardManager.md 47 | userInterfaces/ISubmission.md 48 | userInterfaces/IValidatorRewardOffersManager.md 49 | userInterfaces/IVoterRegistry.md 50 | userInterfaces/IWNatDelegationFee.md 51 | utils/implementation/TokenPoolBase.md 52 | utils/lib/SafePct.md 53 | staking/implementation/ValidatorRewardOffersManager.md -------------------------------------------------------------------------------- /docgen/flare-smart-contracts.list: -------------------------------------------------------------------------------- 1 | addressUpdater/implementation/AddressUpdatable.md 2 | addressUpdater/implementation/AddressUpdater.md 3 | token/implementation/CheckPointable.md 4 | claiming/implementation/ClaimSetupManager.md 5 | token/implementation/CleanupBlockNumberManager.md 6 | claiming/implementation/CloneFactory.md 7 | token/implementation/Delegatable.md 8 | utils/implementation/FlareContractRegistry.md 9 | genesis/implementation/FlareDaemon.md 10 | ftso/implementation/Ftso.md 11 | ftso/implementation/FtsoManager.md 12 | utils/implementation/FtsoRegistry.md 13 | tokenPools/implementation/FtsoRewardManager.md 14 | genesis/implementation/GovernanceSettings.md 15 | token/implementation/GovernanceVotePower.md 16 | governance/implementation/Governed.md 17 | utils/implementation/GovernedAndFlareDaemonized.md 18 | governance/implementation/GovernedAtGenesis.md 19 | governance/implementation/GovernedBase.md 20 | governance/implementation/GovernorVotePower.md 21 | inflation/implementation/Inflation.md 22 | staking/implementation/PChainStake.md 23 | staking/implementation/PChainStakeMirror.md 24 | genesis/implementation/PriceSubmitter.md 25 | utils/implementation/RevertErrorTracking.md 26 | utils/implementation/VoterWhitelister.md 27 | token/implementation/VPContract.md 28 | token/implementation/VPToken.md 29 | token/implementation/WNat.md 30 | userInterfaces/IClaimSetupManager.md 31 | userInterfaces/IFlareContractRegistry.md 32 | genesis/interface/IFlareDaemonize.md 33 | userInterfaces/IFtso.md 34 | genesis/interface/IFtsoGenesis.md 35 | userInterfaces/IFtsoManager.md 36 | genesis/interface/IFtsoManagerGenesis.md 37 | userInterfaces/IFtsoRegistry.md 38 | genesis/interface/IFtsoRegistryGenesis.md 39 | userInterfaces/IFtsoRewardManager.md 40 | userInterfaces/IGovernanceSettings.md 41 | userInterfaces/IGovernanceVotePower.md 42 | genesis/interface/IInflationGenesis.md 43 | userInterfaces/IPChainStakeMirror.md 44 | userInterfaces/IPChainVotePower.md 45 | userInterfaces/IPriceSubmitter.md 46 | userInterfaces/IVoterWhitelister.md 47 | userInterfaces/IVPContractEvents.md 48 | userInterfaces/IVPToken.md 49 | userInterfaces/IWNat.md 50 | addressUpdater/interface/IIAddressUpdatable.md 51 | addressUpdater/interface/IIAddressUpdater.md 52 | claiming/interface/IIClaimSetupManager.md 53 | token/interface/IICleanable.md 54 | ftso/interface/IIFtso.md 55 | ftso/interface/IIFtsoManager.md 56 | utils/interface/IIFtsoRegistry.md 57 | tokenPools/interface/IIFtsoRewardManager.md 58 | token/interface/IIGovernanceVotePower.md 59 | inflation/interface/IIInflationReceiver.md 60 | genesis/interface/IIPriceSubmitter.md 61 | tokenPools/interface/IITokenPool.md 62 | utils/interface/IIVoterWhitelister.md 63 | token/interface/IIVPContract.md 64 | token/interface/IIVPToken.md 65 | governance/implementation/GovernorProposer.md -------------------------------------------------------------------------------- /docgen/hardhat.config.ts.patch: -------------------------------------------------------------------------------- 1 | docgen: { 2 | outputDir: 'docs/api', 3 | pages: 'files', 4 | exclude: [], 5 | templates: './template', 6 | theme: 'markdown', 7 | collapseNewlines: true, 8 | pageExtension: '.md', 9 | }, 10 | -------------------------------------------------------------------------------- /docgen/repos.list: -------------------------------------------------------------------------------- 1 | git@gitlab.com:flarenetwork/flare-smart-contracts.git master https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/master hardhatSetup.config.ts yarn compile 2 | git@gitlab.com:flarenetwork/state-connector-protocol.git main https://github.com/flare-foundation/songbird-state-connector-protocol/tree/main hardhat.config.ts yarn hardhat compile 3 | git@gitlab.com:flarenetwork/flare-smart-contracts-v2.git main https://github.com/flare-foundation/flare-smart-contracts-v2/tree/main hardhat.config.ts yarn compile 4 | -------------------------------------------------------------------------------- /docgen/state-connector-protocol.list: -------------------------------------------------------------------------------- 1 | interface/external/IStateConnector.md 2 | interface/external/IMerkleRootStorage.md 3 | generated/verification/BalanceDecreasingTransactionVerification.md 4 | generated/verification/ReferencedPaymentNonexistenceVerification.md 5 | generated/verification/AddressValidityVerification.md 6 | generated/verification/ConfirmedBlockHeightExistsVerification.md 7 | generated/verification/EVMTransactionVerification.md 8 | generated/verification/PaymentVerification.md 9 | generated/verification/interface/IEVMTransactionVerification.md 10 | generated/verification/interface/IPaymentVerification.md 11 | generated/verification/interface/IConfirmedBlockHeightExistsVerification.md 12 | generated/verification/interface/IAddressValidityVerification.md 13 | generated/verification/interface/IBalanceDecreasingTransactionVerification.md 14 | generated/verification/interface/IReferencedPaymentNonexistenceVerification.md 15 | -------------------------------------------------------------------------------- /docgen/template/common.hbs: -------------------------------------------------------------------------------- 1 | {{h}} `{{name}}` { #{{anchor}} } 2 | 3 |
4 | {{#ifIsNodeType "ContractDefinition"}} 5 | [Source]({{sourceFile}}) 6 | {{~#ifHasParents}} | Inherits from {{parents}}{{/ifHasParents}} 7 | {{else}} 8 | Defined in `{{parentContractName}}` ({{parentContractLinks}}). 9 | {{/ifIsNodeType}} 10 |
11 | 12 |
13 | 14 | {{#if signature}} 15 | ```solidity 16 | {{{pretty_signature}}} 17 | ``` 18 | {{/if}} 19 | 20 | {{{linkify natspec.notice false}}} 21 | 22 | {{#if natspec.dev}} 23 | {{{linkify natspec.dev false}}} 24 | {{/if}} 25 | 26 | {{#if natspec.params}} 27 | | Parameters | Type | Description | 28 | | ---------- | ---- | ----------- | 29 | {{#each params}} 30 | | `{{name}}` | `{{type}}` | {{{linkify natspec true}}} | 31 | {{/each}} 32 | {{/if}} 33 | 34 | {{#if natspec.returns}} 35 | | Returns | Type | Description | 36 | | ------- | ---- | ----------- | 37 | {{#each returns}} 38 | | {{#if name}}`{{name}}`{{else}}[{{@index}}]{{/if}} | `{{type}}` | {{{linkify natspec true}}} | 39 | {{/each}} 40 | {{/if}} 41 |
42 | -------------------------------------------------------------------------------- /docgen/template/contract.hbs: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{name}} 3 | --- 4 | 5 | 6 | 7 | {{>common}} 8 | 9 | {{#hsection}} 10 | 11 | {{>node-type typeTitle="Enums" typeName="EnumDefinition"}} 12 | {{>node-type typeTitle="Errors" typeName="ErrorDefinition"}} 13 | {{>node-type typeTitle="Events" typeName="EventDefinition"}} 14 | {{>node-type typeTitle="Functions" typeName="FunctionDefinition"}} 15 | {{>node-type typeTitle="Modifiers" typeName="ModifierDefinition"}} 16 | {{>node-type typeTitle="Structures" typeName="StructDefinition"}} 17 | {{>node-type typeTitle="Types" typeName="UserDefinedValueTypeDefinition"}} 18 | {{>node-type typeTitle="Variables" typeName="VariableDeclaration"}} 19 | 20 | {{/hsection}} -------------------------------------------------------------------------------- /docgen/template/enum.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | ```solidity 3 | enum {{name}} { 4 | {{#each members}} 5 | {{name}}{{#unless @last}},{{/unless}} 6 | {{/each}} 7 | } 8 | ``` 9 | 10 | {{{enumDocs}}} 11 | 12 | -------------------------------------------------------------------------------- /docgen/template/error.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docgen/template/event.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docgen/template/function.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docgen/template/modifier.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docgen/template/node-type.hbs: -------------------------------------------------------------------------------- 1 | {{#ifHasContent typeName}} 2 | 3 |
4 | 5 | {{h}} {{typeTitle}} 6 | 7 | {{#each (allItems typeName)}} 8 | {{#hsection}} 9 | 10 |
11 | 12 | {{>item}} 13 |
14 | 15 | {{/hsection}} 16 | {{/each}} 17 |
18 | 19 | {{/ifHasContent}} 20 | -------------------------------------------------------------------------------- /docgen/template/page.hbs: -------------------------------------------------------------------------------- 1 | {{#each items}} 2 | {{>item}} 3 | {{/each}} -------------------------------------------------------------------------------- /docgen/template/struct.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | ```solidity 3 | struct {{name}} { 4 | {{#each members}} 5 | {{{typeName.typeDescriptions.typeString}}} {{name}}; 6 | {{/each}} 7 | } 8 | ``` 9 | 10 | -------------------------------------------------------------------------------- /docgen/template/user-defined-value-type.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docgen/template/variable.hbs: -------------------------------------------------------------------------------- 1 | {{>common}} 2 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | docs.flare.network -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/ftso-delegation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/ftso-delegation.png -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/ftso-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/ftso-system.png -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/logo-C2FLR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/logo-C2FLR.png -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/logo-CFLR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/logo-CFLR.png -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/logo-FLR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/logo-FLR.png -------------------------------------------------------------------------------- /docs/assets/images/dev/reference/logo-SGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/reference/logo-SGB.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/foundry1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/foundry1.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/foundry2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/foundry2.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/foundry3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/foundry3.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/hardhat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/hardhat1.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/hardhat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/hardhat2.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/remix1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/remix1.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/remix2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/remix2.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/remix3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/remix3.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/remix4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/remix4.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/remix5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/remix5.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/truffle1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/truffle1.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/truffle2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/truffle2.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/truffle3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/truffle3.png -------------------------------------------------------------------------------- /docs/assets/images/dev/setup/truffle4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/setup/truffle4.png -------------------------------------------------------------------------------- /docs/assets/images/dev/tutorials/SC-basic-tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/dev/tutorials/SC-basic-tutorial.png -------------------------------------------------------------------------------- /docs/assets/images/exchange/exchanges-deposits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/exchange/exchanges-deposits.png -------------------------------------------------------------------------------- /docs/assets/images/exchange/exchanges-general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/exchange/exchanges-general.png -------------------------------------------------------------------------------- /docs/assets/images/exchange/exchanges-withdrawals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/exchange/exchanges-withdrawals.png -------------------------------------------------------------------------------- /docs/assets/images/home/api-reference-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/api-reference-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/developer-guides-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/developer-guides-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/flare-concepts-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/flare-concepts-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/flare-products-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/flare-products-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/get-started-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/get-started-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/infrastructure-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/infrastructure-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/home/user-guide-card-bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/home/user-guide-card-bkg.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/collusion-tool-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/collusion-tool-dashboard.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/collusion-tool-weighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/collusion-tool-weighted.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/price-history-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/price-history-dashboard.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/price-history-providers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/price-history-providers.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/price-history-sgb-providers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/price-history-sgb-providers.png -------------------------------------------------------------------------------- /docs/assets/images/infra/data/price-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/data/price-history.png -------------------------------------------------------------------------------- /docs/assets/images/infra/fassets/fassets-admin-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/fassets/fassets-admin-dashboard.png -------------------------------------------------------------------------------- /docs/assets/images/infra/fassets/fassets-admin-vaults-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/fassets/fassets-admin-vaults-menu.png -------------------------------------------------------------------------------- /docs/assets/images/infra/fassets/fassets-admin-vaults-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/fassets/fassets-admin-vaults-view.png -------------------------------------------------------------------------------- /docs/assets/images/infra/fassets/fassets-admin-vaults.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/infra/fassets/fassets-admin-vaults.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-CCCR-overlapped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-CCCR-overlapped.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-CCCR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-CCCR.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-architecture.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-attestation-provider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-attestation-provider.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-branching-resolution-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-branching-resolution-1.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-branching-resolution-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-branching-resolution-2.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-branching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-branching.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-intro.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-local-AP-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-local-AP-1.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-local-AP-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-local-AP-2.png -------------------------------------------------------------------------------- /docs/assets/images/tech/SC-proof-unpacking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/SC-proof-unpacking.png -------------------------------------------------------------------------------- /docs/assets/images/tech/archive/launch-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/archive/launch-process.png -------------------------------------------------------------------------------- /docs/assets/images/tech/executor-process-with.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/executor-process-with.png -------------------------------------------------------------------------------- /docs/assets/images/tech/executor-process-without.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/executor-process-without.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-collateral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-collateral.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-cr.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-fees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-fees.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-minting.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-redeeming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-redeeming.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-system-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-system-overview.png -------------------------------------------------------------------------------- /docs/assets/images/tech/fassets-tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/fassets-tokens.png -------------------------------------------------------------------------------- /docs/assets/images/tech/flare-network-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/flare-network-types.png -------------------------------------------------------------------------------- /docs/assets/images/tech/flare-systems-protocol-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/flare-systems-protocol-architecture.png -------------------------------------------------------------------------------- /docs/assets/images/tech/flaredrop-average-of-3-weeks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/flaredrop-average-of-3-weeks.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-fu-values-incentivized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-fu-values-incentivized.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-fu-values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-fu-values.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-fu-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-fu-workflow.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-price.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-price.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-summary.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-v2-weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-v2-weight.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-weight.png -------------------------------------------------------------------------------- /docs/assets/images/tech/ftso-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/ftso-workflow.png -------------------------------------------------------------------------------- /docs/assets/images/tech/gov-changes-in-number-of-votes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/gov-changes-in-number-of-votes.png -------------------------------------------------------------------------------- /docs/assets/images/tech/gov-voting-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/gov-voting-process.png -------------------------------------------------------------------------------- /docs/assets/images/tech/tokenomics-distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/tokenomics-distribution.png -------------------------------------------------------------------------------- /docs/assets/images/tech/tokenomics-macro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/tokenomics-macro.png -------------------------------------------------------------------------------- /docs/assets/images/tech/tokenomics-schedule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/tokenomics-schedule.png -------------------------------------------------------------------------------- /docs/assets/images/tech/validator-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/tech/validator-network.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-balance.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-blocks.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-current-epoch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-current-epoch.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-dashboard.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-history.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-internal-tx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-internal-tx.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-internal.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-logs.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-raw-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-raw-trace.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-read-wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-read-wallet.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-tokens.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-transaction-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-transaction-types.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-transactions.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-transfers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-transfers.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-tx-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-tx-details.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-tx-hash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-tx-hash.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-vp-snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-vp-snapshot.png -------------------------------------------------------------------------------- /docs/assets/images/user/block-explorer/block-explorer-write-wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/block-explorer/block-explorer-write-wallet.png -------------------------------------------------------------------------------- /docs/assets/images/user/delegation/delegation-portal-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/delegation/delegation-portal-connect.png -------------------------------------------------------------------------------- /docs/assets/images/user/delegation/delegation-portal-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/delegation/delegation-portal-main.png -------------------------------------------------------------------------------- /docs/assets/images/user/delegation/delegation-portal-providers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/delegation/delegation-portal-providers.png -------------------------------------------------------------------------------- /docs/assets/images/user/delegation/rewards-portal-claim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/delegation/rewards-portal-claim.png -------------------------------------------------------------------------------- /docs/assets/images/user/executor/executor-portal-confirmed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/executor/executor-portal-confirmed.png -------------------------------------------------------------------------------- /docs/assets/images/user/executor/executor-portal-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/executor/executor-portal-main.png -------------------------------------------------------------------------------- /docs/assets/images/user/executor/executor-portal-preset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/executor/executor-portal-preset.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-bifrost-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-bifrost-confirm.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-bifrost-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-bifrost-connect.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-faucet-cflr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-faucet-cflr.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-faucet-xrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-faucet-xrp.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-balance.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-confirm.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-lots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-lots.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-mint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-mint.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-progress.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-ftestxrp-reserve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-ftestxrp-reserve.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-receive-address-cflr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-receive-address-cflr.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-receive-address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-receive-address.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-receive-result-cflr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-receive-result-cflr.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-receive-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-receive-result.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-receive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-receive.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-settings.png -------------------------------------------------------------------------------- /docs/assets/images/user/fassets/dapp-tokens-balances.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/fassets/dapp-tokens-balances.png -------------------------------------------------------------------------------- /docs/assets/images/user/flaredrop/flaredrop-claim-confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/flaredrop/flaredrop-claim-confirmation.png -------------------------------------------------------------------------------- /docs/assets/images/user/flaredrop/flaredrop-claim-distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/flaredrop/flaredrop-claim-distribution.png -------------------------------------------------------------------------------- /docs/assets/images/user/flaredrop/flaredrop-distribution-dates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/flaredrop/flaredrop-distribution-dates.png -------------------------------------------------------------------------------- /docs/assets/images/user/pda/pda-enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/pda/pda-enabled.png -------------------------------------------------------------------------------- /docs/assets/images/user/pda/pda-faqs-enable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/pda/pda-faqs-enable.png -------------------------------------------------------------------------------- /docs/assets/images/user/pda/pda-main-account-opens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/pda/pda-main-account-opens.png -------------------------------------------------------------------------------- /docs/assets/images/user/pda/pda-user-delegation-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/pda/pda-user-delegation-account.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-add-delegation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-add-delegation.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-bind-addresses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-bind-addresses.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-manage-rewards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-manage-rewards.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-menu-cross-chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-menu-cross-chain.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-menu-staking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-menu-staking.png -------------------------------------------------------------------------------- /docs/assets/images/user/staking/flarestake-select-address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/staking/flarestake-select-address.png -------------------------------------------------------------------------------- /docs/assets/images/user/wallets/safepal-songbird-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/wallets/safepal-songbird-logo.png -------------------------------------------------------------------------------- /docs/assets/images/user/wrapping-portal-faq-add-wrapped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/wrapping-portal-faq-add-wrapped.png -------------------------------------------------------------------------------- /docs/assets/images/user/wrapping-portal-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/images/user/wrapping-portal-help.png -------------------------------------------------------------------------------- /docs/assets/javascripts/connect_wallet.js: -------------------------------------------------------------------------------- 1 | async function connect_wallet(tutorial_name) { 2 | const button = document.getElementById(tutorial_name + '-connect'); 3 | const output = document.getElementById(tutorial_name + '-output').getElementsByTagName('code')[0]; 4 | button.textContent = 'Connect Wallet'; 5 | button.classList.remove('wallet-connected'); 6 | if (!window.ethereum) { 7 | output.textContent = 'No wallet browser extension detected.'; 8 | return; 9 | } 10 | try { 11 | const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); 12 | if (window.ethereum.chainId !== "0x72") { 13 | output.textContent = 'Please connect wallet to the Coston2 network (chain ID 114 or 0x72)\n' + 14 | 'and click this button again.'; 15 | return; 16 | } 17 | output.textContent = `Connected to account ${accounts[0]}`; 18 | button.textContent = 'Wallet Connected'; 19 | button.classList.add('wallet-connected'); 20 | window.tutorialData = { 21 | account: accounts[0], 22 | provider: window.ethereum 23 | }; 24 | } catch (error) { 25 | output.textContent = error.message; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/assets/javascripts/dev-hub-notice.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | // Create the developer hub notice 3 | const notice = document.createElement('div'); 4 | notice.className = 'dev-hub-notice'; 5 | notice.innerHTML = ` 6 |

🚨 Developer Documentation has moved! Visit the Flare Dev Hub for all developer resources.

7 | 8 | `; 9 | 10 | // Insert it as the first element after the header 11 | const header = document.querySelector('.md-header'); 12 | if (header && header.nextElementSibling) { 13 | header.parentNode.insertBefore(notice, header.nextElementSibling); 14 | } 15 | 16 | // Add event listener to close button 17 | const closeButton = notice.querySelector('.dev-hub-notice-close'); 18 | if (closeButton) { 19 | closeButton.addEventListener('click', function() { 20 | notice.style.display = 'none'; 21 | // Set a cookie to remember that the notice was closed 22 | document.cookie = "devHubNoticeClosed=true; path=/; max-age=86400"; // 24 hours 23 | }); 24 | } 25 | 26 | // Check if the notice was previously closed 27 | if (document.cookie.indexOf('devHubNoticeClosed=true') !== -1) { 28 | notice.style.display = 'none'; 29 | } 30 | }); -------------------------------------------------------------------------------- /docs/assets/javascripts/images.js: -------------------------------------------------------------------------------- 1 | var images = document.getElementsByTagName('img'); 2 | for (var i = 0, l = images.length; i < l; ++i) { 3 | const im = images[i]; 4 | if (im.classList.contains("allow-zoom")) { 5 | im.title = 'Click to enlarge'; 6 | im.outerHTML = '' + im.outerHTML + ''; 7 | } 8 | }; -------------------------------------------------------------------------------- /docs/assets/javascripts/links.js: -------------------------------------------------------------------------------- 1 | // External links 2 | const links = document.getElementsByTagName("a"); 3 | const content = document.getElementsByClassName("md-content")[0]; 4 | for (var i = 0, l = links.length; i < l; ++i) { 5 | const lk = links[i]; 6 | if (lk.hostname != undefined && lk.hostname !== location.hostname) { 7 | lk.setAttribute("target", "_blank"); 8 | lk.setAttribute("rel", "noopener noreferrer"); 9 | if (content.contains(lk) && !lk.classList.contains("md-icon")) { 10 | lk.classList.add("external-link"); 11 | } 12 | } 13 | } 14 | 15 | // Tutorial comments in source code 16 | var comments = document.getElementsByClassName("c1"); 17 | var h3s = document.getElementsByTagName("h3"); 18 | const re = /^\/\/ ([0-9]+)\./; 19 | for (var i = 0, l = comments.length; i < l; ++i) { 20 | const c = comments[i]; 21 | // Find all code comments starting with a number and a dot 22 | const r = c.innerText.match(re); 23 | if (r) { 24 | // Locate target header 25 | const target = [...h3s].find((e) => e.id.startsWith(`${r[1]}-`)); 26 | // Add link 27 | if (target) c.outerHTML = `` + c.outerHTML + ""; 28 | } 29 | } -------------------------------------------------------------------------------- /docs/assets/javascripts/mathjax.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [["\\(", "\\)"]], 4 | displayMath: [["\\[", "\\]"]], 5 | processEscapes: true, 6 | processEnvironments: true 7 | }, 8 | options: { 9 | ignoreHtmlClass: ".*|", 10 | processHtmlClass: "arithmatex" 11 | } 12 | }; -------------------------------------------------------------------------------- /docs/assets/javascripts/scroll.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // Trigger when the page is fully loaded 3 | window.onload = function() { 4 | const queryString = window.location.search; 5 | const urlParams = new URLSearchParams(queryString); 6 | 7 | // Check if URL parameters exist 8 | if (urlParams.has("tag") && urlParams.has("ctrl") && urlParams.has("op")) { 9 | const iframeSelector = urlParams.get("iframeSelector") || ".swagger-ui-iframe"; 10 | const tag = urlParams.get("tag"); 11 | const controller = urlParams.get("ctrl"); 12 | const operationId = urlParams.get("op"); 13 | const elementSelector = `operations-${tag}-${controller}_${operationId}`; 14 | 15 | scrollToIframeIdAndHighlight(iframeSelector, elementSelector); 16 | } 17 | }; 18 | 19 | // Scrolls to and highlights an element within an iframe 20 | async function scrollToIframeIdAndHighlight(iframeSelector, elementSelector) { 21 | try { 22 | const iframe = await waitFor(() => document.querySelector(iframeSelector)); 23 | 24 | if (iframe && iframe.contentWindow) { 25 | if (iframe.contentWindow.document.readyState === "complete") { 26 | const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; 27 | const element = await waitFor(() => iframeDoc.querySelector(`[id='${elementSelector}']`)); 28 | 29 | if (element) { 30 | // Ensure the operation detail is expanded before scrolling 31 | const control = element.querySelector(".opblock-summary-control"); 32 | if (control) { 33 | control.click(); 34 | // Animation is applied directly via CSS to '.opblock.is-open' 35 | } 36 | 37 | element.scrollIntoView({ 38 | behavior: "smooth", 39 | block: "center", 40 | inline: "nearest", 41 | }); 42 | } 43 | } 44 | } 45 | } catch (error) { 46 | console.log(error.message); 47 | } 48 | } 49 | 50 | // Utility to wait for a condition to be true 51 | function waitFor(condition, timeout = 30000) { 52 | return new Promise((resolve, reject) => { 53 | const startTime = Date.now(); 54 | 55 | function checkCondition() { 56 | const result = condition(); 57 | if (result) { 58 | resolve(result); 59 | } else { 60 | if (Date.now() - startTime >= timeout) { 61 | reject(new Error("Timeout exceeded while waiting for condition.")); 62 | } else { 63 | setTimeout(checkCondition, 100); 64 | } 65 | } 66 | } 67 | 68 | checkCondition(); 69 | }); 70 | } 71 | })(); -------------------------------------------------------------------------------- /docs/assets/overrides/404.html: -------------------------------------------------------------------------------- 1 | 4 | Redirecting... -------------------------------------------------------------------------------- /docs/assets/overrides/logo.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 8 | 11 | 13 | 14 | 17 | 20 | 23 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/assets/overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block extrahead %} 4 | {{ super() }} 5 | {% if page and page.meta and page.meta.og_image %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | {% endif %} 13 | {% if page.meta.mathjax %} 14 | 15 | 16 | {% endif %} 17 | 18 | {% endblock %} 19 | 20 | {% block header %} 21 | 22 | 24 | 25 | {{ super() }} 26 | {% endblock %} -------------------------------------------------------------------------------- /docs/assets/overrides/partials/copyright.html: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /docs/assets/overrides/partials/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 14 |
-------------------------------------------------------------------------------- /docs/assets/overrides/partials/header.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | {% set class = "md-header" %} 25 | {% if "navigation.tabs.sticky" in features %} 26 | {% set class = class ~ " md-header--shadow md-header--lifted" %} 27 | {% elif "navigation.tabs" not in features %} 28 | {% set class = class ~ " md-header--shadow" %} 29 | {% endif %} 30 | 31 | 32 |
33 | 111 | 112 | 113 | {% if "navigation.tabs.sticky" in features %} 114 | {% if "navigation.tabs" in features %} 115 | {% include "partials/tabs.html" %} 116 | {% endif %} 117 | {% endif %} 118 |
-------------------------------------------------------------------------------- /docs/assets/overrides/partials/integrations/analytics/gtm.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /docs/assets/overrides/partials/logo.html: -------------------------------------------------------------------------------- 1 | {% if config.theme.logo %} 2 | {% include config.theme.logo %} 3 | {% else %} 4 | {% set icon = config.theme.icon.logo or "material/library" %} 5 | {% include ".icons/" ~ icon ~ ".svg" %} 6 | {% endif %} 7 | -------------------------------------------------------------------------------- /docs/assets/thumbnails/fassets-concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/thumbnails/fassets-concept.png -------------------------------------------------------------------------------- /docs/assets/thumbnails/launch-process-thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/thumbnails/launch-process-thumb.png -------------------------------------------------------------------------------- /docs/assets/thumbnails/tutorial-ftso-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/assets/thumbnails/tutorial-ftso-1.png -------------------------------------------------------------------------------- /docs/developer-hub.md: -------------------------------------------------------------------------------- 1 | # Developer Hub 2 | 3 | Flare’s developer documentation has been moved to the [Flare Developer Hub](https://dev.flare.network/). 4 | -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/docs/favicon.png -------------------------------------------------------------------------------- /docs/google3bfa582f85e44cb8.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google3bfa582f85e44cb8.html -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide: 3 | - toc 4 | --- 5 | 6 | 7 | 8 | 9 |
10 | 11 | # 🚨 Developer Documentation Has Moved! 🚨 12 | 13 | ## All Flare developer documentation is now available at the [Flare Developer Hub](https://dev.flare.network/) 14 | 15 | 16 | 17 | Source code repository: [https://github.com/flare-foundation/developer-hub](https://github.com/flare-foundation/developer-hub) 18 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /docs/samples/ftso/GetRandomNumber.js: -------------------------------------------------------------------------------- 1 | const FLARE_CONTRACTS = "@flarenetwork/flare-periphery-contract-artifacts"; 2 | const FLARE_RPC = "https://coston-api.flare.network/ext/C/rpc"; 3 | const FLARE_CONTRACT_REGISTRY_ADDR = 4 | "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019"; 5 | 6 | async function runGetRandomNumber() { 7 | // 1. Import Dependencies 8 | const ethers = await import("ethers"); 9 | const flare = await import(FLARE_CONTRACTS); 10 | const provider = new ethers.JsonRpcProvider(FLARE_RPC); 11 | 12 | // 2. Access the Contract Registry 13 | const flareContractRegistry = new ethers.Contract( 14 | FLARE_CONTRACT_REGISTRY_ADDR, 15 | flare.nameToAbi("FlareContractRegistry", "coston").data, 16 | provider 17 | ); 18 | 19 | // 3. Retrieve the Relay Contract 20 | const relayAddress = await flareContractRegistry.getContractAddressByName( 21 | "Relay" 22 | ); 23 | const relay = new ethers.Contract( 24 | relayAddress, 25 | flare.nameToAbi("IRelay", "coston").data, 26 | provider 27 | ); 28 | 29 | // 4. Get the Random Number 30 | const [randomNumber, isSecure, timestamp] = await relay.getRandomNumber(); 31 | console.log("Random Number is", randomNumber); 32 | console.log("Is it secure", isSecure); 33 | console.log("Creation timestamp is", timestamp); 34 | } 35 | 36 | runGetRandomNumber(); -------------------------------------------------------------------------------- /docs/samples/ftso/GetRandomNumber.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.7.6 <0.9; 3 | 4 | import {IRelay} from "@flarenetwork/flare-periphery-contracts/coston/util-contracts/userInterfaces/IRelay.sol"; 5 | import {FlareContractsRegistryLibrary} from "@flarenetwork/flare-periphery-contracts/coston/util-contracts/ContractRegistryLibrary.sol"; 6 | 7 | contract GetRandomNumber { 8 | function generateNumber() external view returns (uint256, bool, uint256) { 9 | address relayAddress = 10 | FlareContractsRegistryLibrary.getContractAddressByName("Relay"); 11 | IRelay relay = IRelay(relayAddress); 12 | (uint256 randomNumber, bool isSecure, uint256 timestamp) = 13 | relay.getRandomNumber(); 14 | 15 | return (randomNumber, isSecure, timestamp); 16 | } 17 | } -------------------------------------------------------------------------------- /docs/samples/ftso/GetRandomNumber.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | // Import dependencies 5 | import "forge-std/Test.sol"; 6 | import "../src/GetRandomNumber.sol"; 7 | 8 | // Test Contract 9 | contract GetRandomNumberTest is Test { 10 | string private constant FLARE_RPC = 11 | "https://flare-api.flare.network/ext/bc/C/rpc"; 12 | uint256 private flareFork; 13 | 14 | function setUp() public { 15 | flareFork = vm.createFork(FLARE_RPC); 16 | } 17 | 18 | function testRandomNumber() public { 19 | vm.selectFork(flareFork); 20 | GetRandomNumber randNumber = new GetRandomNumber(); 21 | 22 | (uint256 _randomNumber, bool _isSecure, uint256 _timeStamp) = randNumber 23 | .getRandomNumber(); 24 | 25 | assertGt(_randomNumber, 0, "Random Number expected to be > 0"); 26 | assertTrue(_isSecure, "Expect to be true"); 27 | assertGt( 28 | _timestamp, 29 | 1695817332, 30 | "Timestamp expected to be greater than a known past block" 31 | ); 32 | } 33 | } -------------------------------------------------------------------------------- /docs/samples/ftso/GettingDataFeeds.js: -------------------------------------------------------------------------------- 1 | const FLARE_PACKAGE = "@flarenetwork/flare-periphery-contract-artifacts"; 2 | const FLARE_RPC = "https://flare-api.flare.network/ext/bc/C/rpc"; 3 | 4 | async function runGettingDataFeeds(symbol) { 5 | console.log(`Retrieving current price of ${symbol}...`); 6 | 7 | // 1. Import dependencies 8 | const ethers = await import("ethers"); 9 | const flare = await import(FLARE_PACKAGE); 10 | 11 | // Node to submit queries to. 12 | const provider = new ethers.JsonRpcProvider(FLARE_RPC); 13 | 14 | // 2. Access the Contract Registry 15 | const flareContractRegistry = new ethers.Contract( 16 | "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019", 17 | flare.nameToAbi("FlareContractRegistry", "flare").data, 18 | provider); 19 | 20 | // 3. Retrieve the FTSO Registry 21 | const ftsoRegistryAddr = await 22 | flareContractRegistry.getContractAddressByName("FtsoRegistry"); 23 | const ftsoRegistry = new ethers.Contract( 24 | ftsoRegistryAddr, 25 | flare.nameToAbi("FtsoRegistry", "flare").data, 26 | provider); 27 | 28 | // 4. Get latest price 29 | const [price, timestamp, decimals] = 30 | await ftsoRegistry["getCurrentPriceWithDecimals(string)"](symbol); 31 | 32 | console.log(`${Number(price) / Math.pow(10, Number(decimals))} USD`); 33 | console.log(`Calculated at ${new Date(Number(timestamp) * 1000)}`); 34 | } 35 | 36 | runGettingDataFeeds("BTC"); 37 | -------------------------------------------------------------------------------- /docs/samples/ftso/GettingDataFeeds.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.0; 4 | 5 | // 1. Import dependencies 6 | import "@flarenetwork/flare-periphery-contracts/flare/util-contracts/userInterfaces/IFlareContractRegistry.sol"; 7 | import "@flarenetwork/flare-periphery-contracts/flare/ftso/userInterfaces/IFtsoRegistry.sol"; 8 | 9 | contract GettingDataFeeds { 10 | 11 | address private constant FLARE_CONTRACT_REGISTRY = 12 | 0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019; 13 | 14 | function getTokenPriceWei( 15 | string memory _symbol 16 | ) public view returns( 17 | uint256 _price, uint256 _timestamp, uint256 _decimals) 18 | { 19 | // 2. Access the Contract Registry 20 | IFlareContractRegistry contractRegistry = IFlareContractRegistry( 21 | FLARE_CONTRACT_REGISTRY); 22 | 23 | // 3. Retrieve the FTSO Registry 24 | IFtsoRegistry ftsoRegistry = IFtsoRegistry( 25 | contractRegistry.getContractAddressByName('FtsoRegistry')); 26 | 27 | // 4. Get latest price 28 | (_price, _timestamp, _decimals) = 29 | ftsoRegistry.getCurrentPriceWithDecimals(_symbol); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /docs/samples/ftso/GettingDataFeeds.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | 4 | // Import dependencies 5 | import "forge-std/Test.sol"; 6 | import "../src/GettingDataFeeds.sol"; 7 | 8 | // Test Contract 9 | contract TestGettingDataFeeds is Test { 10 | 11 | string private constant FLARE_RPC = 12 | "https://flare-api.flare.network/ext/bc/C/rpc"; 13 | uint256 private flareFork; 14 | 15 | function setUp() public { 16 | flareFork = vm.createFork(FLARE_RPC); 17 | } 18 | 19 | function testSimplePrice() public { 20 | vm.selectFork(flareFork); 21 | GettingDataFeeds datafeeds = new GettingDataFeeds(); 22 | 23 | (uint256 _price, uint256 _timestamp, uint256 _decimals) = 24 | datafeeds.getTokenPriceWei("BTC"); 25 | 26 | assertGt(_timestamp, 1695817332, 27 | "Timestamp expected to be greater than a known past block"); 28 | assertGe(_decimals, 0, 29 | "Number of decimals expected to be >= 0"); 30 | assertLe(_decimals, 18, 31 | "Number of decimals expected to be <= 18"); 32 | assertGt(_price, 0, 33 | "Price expected to be > 0"); 34 | assertLt(_price, 1000000 * 10 ** _decimals, 35 | "Price expected to be < 1'000'000"); 36 | } 37 | } -------------------------------------------------------------------------------- /docs/samples/ftso/TestGetRandomNumber.js: -------------------------------------------------------------------------------- 1 | const { expect } = require("chai"); 2 | describe("Test Random Number", function () { 3 | let contract; 4 | beforeEach(async function () { 5 | contract = await ethers.deployContract("GetRandomNumber"); 6 | }); 7 | 8 | it("RandomNumber", async function () { 9 | const [randomNumber, isSecure, timestamp] = await contract.generateNumber(); 10 | expect(randomNumber).to.be.at.least( 11 | 1000000000000000000000000000000000000000n 12 | ); 13 | expect(isSecure).to.be.true; 14 | expect(timestamp).to.be.gt(1695817332); 15 | }); 16 | }); -------------------------------------------------------------------------------- /docs/samples/ftso/TestGettingDataFeeds.js: -------------------------------------------------------------------------------- 1 | const { expect } = require("chai"); 2 | 3 | describe("GettingDataFeeds", async function () { 4 | let contract; 5 | beforeEach(async function () { 6 | contract = await ethers.deployContract("GettingDataFeeds"); 7 | }); 8 | it("Should return sensible values", async function () { 9 | const res = await contract.getTokenPriceWei("BTC"); 10 | 11 | expect(res._timestamp).to.greaterThan(1695817332); 12 | expect(res._decimals).to.within(0, 18); 13 | expect(res._price).to.within(0, 1000000 * 10 ** Number(res._decimals)); 14 | }); 15 | }); -------------------------------------------------------------------------------- /docs/samples/sc/AddressValidity.js: -------------------------------------------------------------------------------- 1 | const FLARE_CONTRACTS = "@flarenetwork/flare-periphery-contract-artifacts"; 2 | const FLARE_RPC = "https://coston-api.flare.network/ext/C/rpc"; 3 | const ATTESTATION_PROVIDER_URL = "https://attestation-coston.aflabs.net"; 4 | const ATTESTATION_PROVIDER_API_KEY = "123456"; 5 | const FLARE_CONTRACT_REGISTRY_ADDR = 6 | "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019"; 7 | 8 | // You should get your private keys from an external source. 9 | // DO NOT embed them in source code in a production environment! 10 | const PRIVATE_KEY = 11 | "0x6607fc65548ffe231ce954018b3ee01fedb242281227e42a30a9bffa759557d7"; 12 | 13 | async function runAddressValidity(network, addressToValidate) { 14 | const VERIFICATION_ENDPOINT = 15 | `${ATTESTATION_PROVIDER_URL}/verifier/${network.toLowerCase()}` + 16 | `/AddressValidity/prepareRequest`; 17 | const ATTESTATION_ENDPOINT = 18 | `${ATTESTATION_PROVIDER_URL}/attestation-client/api/proof/` + 19 | `get-specific-proof`; 20 | 21 | // 1. Set up 22 | const ethers = await import("ethers"); 23 | const flare = await import(FLARE_CONTRACTS); 24 | const utils = await import( 25 | `${FLARE_CONTRACTS}/dist/coston/StateConnector/libs/ts/utils.js` 26 | ); 27 | const provider = new ethers.JsonRpcProvider(FLARE_RPC); 28 | const signer = new ethers.Wallet(PRIVATE_KEY, provider); 29 | 30 | // 2. Prepare Attestation Request 31 | const { encodeAttestationName } = utils; 32 | const rawAttestationRequest = { 33 | attestationType: encodeAttestationName("AddressValidity"), 34 | sourceId: encodeAttestationName(`test${network.toUpperCase()}`), 35 | requestBody: { 36 | addressStr: addressToValidate, 37 | }, 38 | }; 39 | console.log( 40 | "Preparing attestation request using verifier", 41 | ATTESTATION_PROVIDER_URL, 42 | "..." 43 | ); 44 | console.log("Request:", rawAttestationRequest); 45 | 46 | const verifierResponse = await fetch(VERIFICATION_ENDPOINT, { 47 | method: "POST", 48 | headers: { 49 | "Content-Type": "application/json", 50 | "X-API-KEY": ATTESTATION_PROVIDER_API_KEY, 51 | }, 52 | body: JSON.stringify(rawAttestationRequest), 53 | }); 54 | const encodedAttestationRequest = await verifierResponse.json(); 55 | if (encodedAttestationRequest.status !== "VALID") { 56 | console.log("Received error:", encodedAttestationRequest); 57 | return; 58 | } 59 | console.log( 60 | " Received encoded attestation request:", 61 | encodedAttestationRequest.abiEncodedRequest 62 | ); 63 | 64 | // 3. Access Contract Registry 65 | const flareContractRegistry = new ethers.Contract( 66 | FLARE_CONTRACT_REGISTRY_ADDR, 67 | flare.nameToAbi("FlareContractRegistry", "coston").data, 68 | provider 69 | ); 70 | 71 | // 4. Retrieve the State Connector Contract Address 72 | const stateConnectorAddress = 73 | await flareContractRegistry.getContractAddressByName("StateConnector"); 74 | const stateConnector = new ethers.Contract( 75 | stateConnectorAddress, 76 | flare.nameToAbi("StateConnector", "coston").data, 77 | signer 78 | ); 79 | 80 | // 5. Request Attestation from the State Connector Contract 81 | console.log("Submitting attestation to State Connector..."); 82 | const attestationTx = await stateConnector.requestAttestations( 83 | encodedAttestationRequest.abiEncodedRequest 84 | ); 85 | const receipt = await attestationTx.wait(); 86 | const block = await provider.getBlock(receipt.blockNumber); 87 | 88 | // 6. Calculate Round ID 89 | const roundOffset = await stateConnector.BUFFER_TIMESTAMP_OFFSET(); 90 | const roundDuration = await stateConnector.BUFFER_WINDOW(); 91 | const submissionRoundID = Number( 92 | (BigInt(block.timestamp) - roundOffset) / roundDuration 93 | ); 94 | 95 | console.log(" Attestation submitted in round", submissionRoundID); 96 | 97 | // 7. Wait for the Attestation Round to Finalize 98 | var prevFinalizedRoundID = 0; 99 | setTimeout(async function poll() { 100 | const lastFinalizedRoundID = Number( 101 | await stateConnector.lastFinalizedRoundId() 102 | ); 103 | if (prevFinalizedRoundID != lastFinalizedRoundID) { 104 | console.log(" Last finalized round is", lastFinalizedRoundID); 105 | prevFinalizedRoundID = lastFinalizedRoundID; 106 | } 107 | if (lastFinalizedRoundID < submissionRoundID) { 108 | setTimeout(poll, 10000); 109 | return; 110 | } 111 | 112 | // 8. Retrieve Proof 113 | const proofRequest = { 114 | roundId: submissionRoundID, 115 | requestBytes: encodedAttestationRequest.abiEncodedRequest, 116 | }; 117 | 118 | console.log("Retrieving proof from attestation provider..."); 119 | const providerResponse = await fetch(ATTESTATION_ENDPOINT, { 120 | method: "POST", 121 | headers: { 122 | "Content-Type": "application/json", 123 | "X-API-KEY": ATTESTATION_PROVIDER_API_KEY, 124 | }, 125 | body: JSON.stringify(proofRequest), 126 | }); 127 | const proof = await providerResponse.json(); 128 | if (proof.status !== "OK") { 129 | console.log("Received error:", proof); 130 | return; 131 | } 132 | console.log(" Received Merkle proof:", proof.data.merkleProof); 133 | 134 | // 9. Send Proof to Verifier Contract 135 | // Unpacked attestation proof to be used in a Solidity contract. 136 | const fullProof = { 137 | merkleProof: proof.data.merkleProof, 138 | data: { 139 | ...proof.data, 140 | ...proof.data.request, 141 | ...proof.data.response, 142 | status: proof.status, 143 | } 144 | }; 145 | 146 | const { isValid } = fullProof.data.responseBody; 147 | 148 | console.log("Sending the proof for verification..."); 149 | const addressVerifier = new ethers.Contract( 150 | flare.nameToAddress("IAddressValidityVerification", "coston"), 151 | flare.nameToAbi("IAddressValidityVerification", "coston").data, 152 | signer 153 | ); 154 | const isVerified = 155 | await addressVerifier.verifyAddressValidity(fullProof); 156 | console.log(" Attestation result:", isVerified); 157 | 158 | // 10. Check if Address is Valid 159 | if (isVerified) { 160 | console.log( 161 | isValid 162 | ? "Attestation providers agree that the address is valid." 163 | : "Attestation providers agree that the address is invalid." 164 | ); 165 | } else { 166 | console.log( 167 | "Could not verify attestation. Validity of address is unknown." 168 | ); 169 | } 170 | }, 10000); 171 | } 172 | 173 | runAddressValidity( 174 | "btc", 175 | "tb1p4mdyx3dvgk4dhvv8yv2dtuymf00wxhgkkjheqm7526fu7znnd6msw3qxvj" 176 | ); -------------------------------------------------------------------------------- /docs/samples/sc/EVMTransaction.js: -------------------------------------------------------------------------------- 1 | const FLARE_CONTRACTS = "@flarenetwork/flare-periphery-contract-artifacts"; 2 | const FLARE_RPC = "https://coston-api.flare.network/ext/C/rpc"; 3 | const ATTESTATION_PROVIDER_URL = "https://attestation-coston.flare.network"; 4 | const VERIFIER_URL = "https://evm-verifier.flare.network"; 5 | const VERIFIER_API_KEY = "123456"; 6 | const FLARE_CONTRACT_REGISTRY_ADDR = 7 | "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019"; 8 | 9 | // You should get your private keys from an external source. 10 | // DO NOT embed them in source code in a production environment! 11 | const PRIVATE_KEY = 12 | "0x6607fc65548ffe231ce954018b3ee01fedb242281227e42a30a9bffa759557d7"; 13 | 14 | async function runRetrieveEVMTransaction(network, transactionHashToRetrieve) { 15 | const VERIFICATION_ENDPOINT = 16 | `${VERIFIER_URL}/verifier/${network.toLowerCase()}` + 17 | `/EVMTransaction/prepareRequest`; 18 | const ATTESTATION_ENDPOINT = 19 | `${ATTESTATION_PROVIDER_URL}/attestation-client/api/proof/` + 20 | `get-specific-proof`; 21 | 22 | // 1. Set up 23 | const ethers = await import("ethers"); 24 | const flare = await import(FLARE_CONTRACTS); 25 | const utils = await import( 26 | `${FLARE_CONTRACTS}/dist/coston/StateConnector/libs/ts/utils.js` 27 | ); 28 | const provider = new ethers.JsonRpcProvider(FLARE_RPC); 29 | const signer = new ethers.Wallet(PRIVATE_KEY, provider); 30 | 31 | // 2. Prepare Attestation Request 32 | const { encodeAttestationName } = utils; 33 | const rawAttestationRequest = { 34 | attestationType: encodeAttestationName("EVMTransaction"), 35 | sourceId: encodeAttestationName(`test${network.toUpperCase()}`), 36 | requestBody: { 37 | transactionHash: transactionHashToRetrieve, 38 | requiredConfirmations: "1", // Must be a string 39 | provideInput: true, 40 | listEvents: true, 41 | logIndices: [] 42 | }, 43 | }; 44 | console.log( 45 | "Preparing attestation request using verifier", 46 | VERIFIER_URL, 47 | "..." 48 | ); 49 | console.log("Request:", rawAttestationRequest); 50 | 51 | const verifierResponse = await fetch(VERIFICATION_ENDPOINT, { 52 | method: "POST", 53 | headers: { 54 | "Content-Type": "application/json", 55 | "X-API-KEY": VERIFIER_API_KEY, 56 | }, 57 | body: JSON.stringify(rawAttestationRequest), 58 | }); 59 | const encodedAttestationRequest = await verifierResponse.json(); 60 | if (encodedAttestationRequest.status !== "VALID") { 61 | console.log("Received error:", encodedAttestationRequest); 62 | return; 63 | } 64 | console.log( 65 | " Received encoded attestation request:", 66 | encodedAttestationRequest.abiEncodedRequest 67 | ); 68 | 69 | // 3. Access Contract Registry 70 | const flareContractRegistry = new ethers.Contract( 71 | FLARE_CONTRACT_REGISTRY_ADDR, 72 | flare.nameToAbi("FlareContractRegistry", "coston").data, 73 | provider 74 | ); 75 | 76 | // 4. Retrieve the State Connector Contract Address 77 | const stateConnectorAddress = 78 | await flareContractRegistry.getContractAddressByName("StateConnector"); 79 | const stateConnector = new ethers.Contract( 80 | stateConnectorAddress, 81 | flare.nameToAbi("StateConnector", "coston").data, 82 | signer 83 | ); 84 | 85 | // 5. Request Attestation from the State Connector Contract 86 | console.log("Submitting attestation to State Connector..."); 87 | const attestationTx = await stateConnector.requestAttestations( 88 | encodedAttestationRequest.abiEncodedRequest 89 | ); 90 | const receipt = await attestationTx.wait(); 91 | const block = await provider.getBlock(receipt.blockNumber); 92 | 93 | // 6. Calculate Round ID 94 | const roundOffset = await stateConnector.BUFFER_TIMESTAMP_OFFSET(); 95 | const roundDuration = await stateConnector.BUFFER_WINDOW(); 96 | const submissionRoundID = Number( 97 | (BigInt(block.timestamp) - roundOffset) / roundDuration 98 | ); 99 | 100 | console.log(" Attestation submitted in round", submissionRoundID); 101 | 102 | // 7. Wait for the Attestation Round to Finalize 103 | var prevFinalizedRoundID = 0; 104 | setTimeout(async function poll() { 105 | const lastFinalizedRoundID = Number( 106 | await stateConnector.lastFinalizedRoundId() 107 | ); 108 | if (prevFinalizedRoundID != lastFinalizedRoundID) { 109 | console.log(" Last finalized round is", lastFinalizedRoundID); 110 | prevFinalizedRoundID = lastFinalizedRoundID; 111 | } 112 | if (lastFinalizedRoundID < submissionRoundID) { 113 | setTimeout(poll, 10000); 114 | return; 115 | } 116 | 117 | // 8. Retrieve Proof 118 | const proofRequest = { 119 | roundId: submissionRoundID, 120 | requestBytes: encodedAttestationRequest.abiEncodedRequest, 121 | }; 122 | 123 | console.log("Retrieving proof from attestation provider..."); 124 | const providerResponse = await fetch(ATTESTATION_ENDPOINT, { 125 | method: "POST", 126 | headers: { 127 | "Content-Type": "application/json", 128 | "X-API-KEY": VERIFIER_API_KEY, 129 | }, 130 | body: JSON.stringify(proofRequest), 131 | }); 132 | const proof = await providerResponse.json(); 133 | if (proof.status !== "OK") { 134 | console.log("Received error:", proof); 135 | return; 136 | } 137 | console.log(" Received Merkle proof:", proof.data.merkleProof); 138 | 139 | // 9. Send Proof to Verifier Contract 140 | // Unpacked attestation proof to be used in a Solidity contract. 141 | const fullProof = { 142 | merkleProof: proof.data.merkleProof, 143 | data: { 144 | ...proof.data, 145 | ...proof.data.request, 146 | ...proof.data.response, 147 | status: proof.status, 148 | } 149 | }; 150 | 151 | const responseBody = fullProof.data.responseBody; 152 | 153 | console.log("Sending the proof for verification..."); 154 | const EVMTransactionVerifier = new ethers.Contract( 155 | flare.nameToAddress("IEVMTransactionVerification", "coston"), 156 | flare.nameToAbi("IEVMTransactionVerification", "coston").data, 157 | signer 158 | ); 159 | const isVerified = 160 | await EVMTransactionVerifier.verifyEVMTransaction(fullProof); 161 | console.log(" Attestation result:", isVerified); 162 | 163 | // 10. Check response 164 | if (isVerified) { 165 | console.log("Retrieved transaction:"); 166 | console.dir(responseBody, { depth: null }); 167 | } else { 168 | console.log( 169 | "Could not retrieve transaction." 170 | ); 171 | } 172 | }, 10000); 173 | } 174 | 175 | runRetrieveEVMTransaction( 176 | "eth", 177 | "0x58d98ffe5f960f63ac55184ef5215f5cf2c1ab1983ac3c11a39e24477299170d" 178 | ); -------------------------------------------------------------------------------- /docs/samples/tests/wrap.js: -------------------------------------------------------------------------------- 1 | // This is a snippet useful as reference. It shows: 2 | // - How to sign transactions both from the browser and Node.js 3 | // - How to wrap native tokens by sending them to the WNAT contract. 4 | // 5 | // Someday this might be turned into a proper tutorial. 6 | 7 | const FLARE_PACKAGE = "@flarenetwork/flare-periphery-contract-artifacts"; 8 | const FLARE_RPC = "https://coston2-api.flare.network/ext/bc/C/rpc"; 9 | 10 | // Get private keys from an external source. 11 | // DO NOT embed them in source code! 12 | const TEST_PRIVATE_KEY = ""; 13 | 14 | async function Wrap_run(amount) { 15 | 16 | // 1. Setup 17 | const ethers = await import("ethers"); 18 | const flare = await import(FLARE_PACKAGE); 19 | var provider, signer; 20 | if (typeof window === "undefined") { 21 | // Node.js 22 | provider = new ethers.JsonRpcProvider(FLARE_RPC); 23 | signer = new ethers.Wallet(TEST_PRIVATE_KEY, provider); 24 | } else { 25 | // Browser 26 | if (typeof window.tutorialData === "undefined") { 27 | console.log("Wallet is not connected."); 28 | return; 29 | } 30 | provider = new ethers.BrowserProvider(window.tutorialData.provider); 31 | signer = await provider.getSigner(); 32 | } 33 | const account = signer.address; 34 | 35 | // 2. Access the Contract Registry 36 | const flareContractRegistry = new ethers.Contract( 37 | "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019", 38 | flare.nameToAbi("FlareContractRegistry", "coston2").data, 39 | signer); 40 | 41 | // 3. Retrieve the WNat contract 42 | const wnatAddr = await 43 | flareContractRegistry.getContractAddressByName("WNat"); 44 | const wnat = new ethers.Contract( 45 | wnatAddr, 46 | flare.nameToAbi("WNat", "coston2").data, 47 | signer); 48 | 49 | balance_nat = await provider.getBalance(account) 50 | balance_wrapped = await wnat.balanceOf(account); 51 | console.log(`Balance of account ${account}:`); 52 | console.log(` ${Number(balance_nat) / 10 ** 18} C2FLR`); 53 | console.log(` ${Number(balance_wrapped) / 10 ** 18} WC2FLR`); 54 | console.log(`Wrapping ${amount} C2FLR...`); 55 | 56 | const options = { value: ethers.parseEther(amount) }; 57 | await wnat.deposit(options); 58 | console.log(`Transaction submitted.`); 59 | } 60 | 61 | Wrap_run("1"); 62 | -------------------------------------------------------------------------------- /docs/tech/api-portal.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Flare API Portal 7 | 8 | Flare's API Portal is a paid product that gives developers access to a number of **private nodes** running on different blockchains, including Flare, [Songbird](glossary.md#songbird) and [Coston](glossary.md#coston), but also other networks like Bitcoin or XRPL. 9 | 10 | These nodes are **not rate-limited**, so it is typically **more convenient** to connect your apps to them than to deploy your own nodes, or connect to public nodes. 11 | 12 | This is one more step towards Flare's goal to **connect all blockchains**. 13 | 14 | !!! info "Visit [Flare's API Portal website](https://api-portal.flare.network/)" 15 | 16 | !!! question "Visit the [API Portal's FAQ](https://api-portal.flare.network/support) if you are having authentication issues!" 17 | -------------------------------------------------------------------------------- /docs/tech/archive/flare-launch-process.md: -------------------------------------------------------------------------------- 1 | --- 2 | og_image: assets/thumbnails/launch-process-thumb.png 3 | og_description: The goal of this page is to remove any confusion around Flare's launch process. 4 | search: 5 | boost: 0.5 6 | --- 7 | 8 | # Flare Launch Process 9 | 10 | The Flare launch included a rather **large airdrop**, a **community vote**, and the deployment of a **novel meritocratic consensus** system. 11 | Because of its complexity, it was divided into a series of **sequential phases** with **clearly-defined triggers** that signaled each transition. 12 | 13 | The following information was intended to **remove any confusion around the launch process** by clearly describing the purpose of each phase and what happened in them. 14 | 15 | 17 | 18 | Click on a phase to navigate to its description. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | ## Definitions 46 | 47 | The following definitions make the rest of this page clear and unambiguous. 48 | 49 | * **FIP.01**: [A governance proposal](https://proposals.flare.network/FIP/FIP_1.html) that, among other things, changed the initial token distributions as explained below. 50 | This proposal needed to be voted on according to the schedule described in this page. 51 | 52 | * **Flare Airdrop for XRP Holders**: Certain holders of XRP tokens on Dec 12, 2020, were eligible to register for the FLR token distribution (then called _Spark_ tokens) once the Flare network launched. 53 | 54 | The FIP.01 proposal modified the way in which the airdrop worked. 55 | 56 | * **Original Airdrop**: 28.53B FLR tokens, which in the original distribution plan went to those who registered for the distribution. 57 | 58 | * **New Airdrop**: 4.28B FLR tokens destined for those that registered for the distribution. 59 | 60 | * **Delegation Incentive Pool (DIP)**: 24.25B FLR tokens destined for _any Flare holder_ that participated in the network over 36 months as per the FIP.01 distribution plan. 61 | 62 | _Note that the New Airdrop plus the DIP match the Original Airdrop._ 63 | 64 | * **Token Distribution Event (TDE)**: The moment when the initial `$FLR` tokens were distributed to those who registered for the `$FLR` token distribution. 65 | These tokens were minted and locked when the network was created, and they were released when it was sufficiently decentralized. 66 | 67 | ## Token Distribution Plans 68 | 69 | The following distribution plans were offered. The FIP.01 Distribution Plan was implemented after [FIP.01](https://proposals.flare.network/FIP/FIP_1.html) was approved. 70 | 71 | * **Original Distribution Plan**: 72 | 73 | * 15% of the original airdrop would have been sent to those who registered for the `$FLR` distribution upon the TDE, and the rest would have been delivered monthly over the subsequent 36 months. 74 | * Inflation would have been 10% of the fully diluted supply, per annum. 75 | 76 | * **FIP.01 Distribution Plan**: 77 | 78 | * The new airdrop was sent to those who registered for the `$FLR` distribution upon the TDE, and the DIP was distributed to all `$FLR` token holders (actually, wrapped `$FLR` holders) over 36 months. Flare employees and companies were excluded. 79 | * Inflation is 10% of available supply in the first year, then 7% the following year, 5% the year after and in perpetuity, except that from year 3 onwards [inflation](glossary.md#inflation) is capped at 5bn `$FLR` per year. 80 | * Inflation distribution: 70% to [FTSO](../ftso/index.md) rewards, 20% to [validator](../validators.md) rewards and 10% to the default Attestation Provider Set of the [Flare Data connector](../data-connector.md). 81 | 82 | ## Launch Phases 83 | 84 | ### Private Observation Mode 85 | 86 | !!! danger "Trigger: The Flare network launches" 87 | 88 | On July 14, 2022, the network started centralized, with only 21 validators, run by the Flare Foundation. 89 | 90 | Flare validator source code was **not** available yet. 91 | 92 | FTSO data providers: 93 | 94 | * Could submit data, as they do on Songbird, but did not act as validators because they could not run nodes. 95 | 96 | * Were not rewarded. [All inflation would be burned during observation mode](https://flare.network/om-inflation/). 97 | 98 | --- 99 | 100 | ### Public Observation Mode 101 | 102 | !!! danger "Trigger: The [Flare validator source code](https://github.com/flare-foundation/go-flare) becomes publicly available" 103 | 104 | During this mode, professional validators started onboarding, so the network started to become decentralized. 105 | 106 | FTSO data providers: 107 | 108 | * Could submit data, as they do on Songbird, but did not act as validators because they would not have funds to stake until the TDE. 109 | 110 | * Were not rewarded. [All inflation was burned during observation mode](https://flare.network/om-inflation/). 111 | 112 | --- 113 | 114 | ### Initial Distribution Period 115 | 116 | !!! danger "Trigger: 66% of validator power is independent of Flare,
AND
Exchanges agree to distribute the `$FLR` token to their customers within a few days of the TDE" 117 | 118 | !!! tip "Token Distribution Event (TDE) happens" 119 | The **new airdrop** was sent to the Flare addresses provided by `$XRP` token holders when they claimed. 120 | 121 | Part of the airdrop went to Exchange accounts, which distributed it to the users that originally claimed (the **intended recipients**). 122 | 123 | During this period, Flare monitored how many of the airdrop tokens reached the intended recipients, by following the Exchange's communication channels. 124 | 125 | FTSO data providers: 126 | 127 | * Could deploy their own **validator** nodes. 128 | 129 | * Acted as validators and their voting power [depended on their FTSO performance and stake](../validators.md). 130 | 131 | FTSO and validator rewards were enabled. 132 | Inflation was not burned anymore. 133 | 134 | --- 135 | 136 | ### FIP.01 Notice Period 137 | 138 | !!! danger "Trigger: 66% of the new airdrop reaches its intended recipients" 139 | 140 | [FIP.01](https://proposals.flare.network/FIP/FIP_1.html) proposed to modify how the rest of the tokens (after the TDE) would be distributed, so it required the community to vote. 141 | Users voted with their `$FLR` token stake, so voting could not start until enough tokens had reached the intended recipients. 142 | 143 | After 66% of the FLR tokens distributed during the TDE reached these users, **a 1-week notice period** began. 144 | 145 | Flare announced to the community that enough tokens were distributed and the notice period had started. 146 | 147 | --- 148 | 149 | ### FIP.01 Voting Period 150 | 151 | !!! danger "Trigger: 1 week after Notice Period starts" 152 | 153 | All `$FLR` token holders (obtained either from the new airdrop or bought at Exchanges) could vote on [FIP.01](https://proposals.flare.network/FIP/FIP_1.html) using a voting front-end. 154 | 155 | Flare announced to the community that the Voting Period had started and relayed instructions about how to vote. 156 | 157 | Voting Period lasted 1 week. 158 | 159 | --- 160 | 161 | ### Regular Operation (Beta) 162 | 163 | !!! danger "Trigger: FIP.01 is approved after 1 week of voting" 164 | 165 | The changes proposed in [FIP.01](https://proposals.flare.network/FIP/FIP_1.html) **were implemented**. 166 | The **DIP** will be distributed to ALL holders of FLR during 37 months. 167 | 168 | [Flare Beta](../flare-beta.md) is still in operation, but community-run validators are gradually gaining more power. 169 | 170 | --- 171 | 172 | ### Regular Operation 173 | 174 | !!! danger "Trigger: Community-run FTSO validators are deemed reliable enough" 175 | 176 | [Flare Beta](../flare-beta.md) will end. 177 | 178 | FTSO validators' validation power is not artificially reduced anymore and validator rewards (20% of inflation) will be distributed equally among all validators according to their performance and stake. 179 | -------------------------------------------------------------------------------- /docs/tech/archive/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 0.5 4 | --- 5 | 6 | # Archive 7 | 8 | This section archives old information. 9 | 10 | Select one of the topics below: 11 | 12 | * [Flare Launch Process](./flare-launch-process.md) 13 | * [FTSO v1](./ftso-v1.md) 14 | -------------------------------------------------------------------------------- /docs/tech/automatic-claiming.md: -------------------------------------------------------------------------------- 1 | # Automatic Claiming 2 | 3 | > **Note:** This guide has been moved to the [Flare Developer Hub](https://dev.flare.network/network/guides/using-flare-stake-tool). Please visit there for the most up-to-date information. -------------------------------------------------------------------------------- /docs/tech/flare-beta.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Flare Beta 7 | 8 | Decentralization will be achieved by moving the transaction validation duty **from the Flare Foundation to community-run FTSO** [data providers](glossary.md#data_provider), but this will not happen instantly. 9 | 10 | Instead, to ensure a safe transition, a number of **professional validators** were initially enabled and continue to be employed. 11 | 12 | The professional validators were chosen among companies with proven experience running blockchain infrastructure and **at first held most of the validation power**. 13 | This power, though, will be **progressively shifted** onto the community-run validators until they run the network on their own. 14 | 15 | This initial period is called **Flare Beta**, and it will span several [launch phases](./archive/flare-launch-process.md). 16 | 17 | ## Flare Beta Details 18 | 19 | The Flare Beta began at the same time as the token distribution event (TDE). 20 | 21 | During this period: 22 | 23 | * 20 total validators **with equal validation power** (20K FLR each, initially) are enabled. 24 | * 4 run by the Flare Foundation. 25 | * 16 run by 4 professional validators. 26 | 27 | * Each FTSO running an observation node will be a candidate to become a validator node later. These nodes are regularly scanned to ensure they meet security standards. If they meet the security standards, they enable the node operators to receive rewards. 28 | 29 | * Validator rewards are split 50% for the professional validators and 50% for the FTSOs running observation nodes. 30 | 31 | * Estimated duration: 6 - 9 months, depending on the evolution of the network. 32 | -------------------------------------------------------------------------------- /docs/tech/flare-systems-protocol.md: -------------------------------------------------------------------------------- 1 | # Flare Systems Protocol 2 | 3 | > **Note:** This section has been moved to the [Flare Developer Hub](https://dev.flare.network/network/fsp). Please visit there for the most up-to-date information. -------------------------------------------------------------------------------- /docs/tech/flare.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # What Is Flare? 7 | 8 | !!! image inline end "" 9 | ![Flare logo](logo-FLR.png){ .allow-zoom } 10 | 11 | Flare is the blockchain for data. 12 | It is a [layer 1](glossary.md#layer1), [EVM](glossary.md#evm) [smart contract](glossary.md#smart_contract) platform designed to expand the utility of blockchain. 13 | 14 | Flare's aim is to provide data as a public good, meaning that data is not controlled by a centralized entity and is available to all. 15 | The infrastructure providers, which perform doubly as [validators](../tech/validators.md) and data providers, enable two native [oracles](glossary.md#oracle), the [FTSO](./ftso/index.md) and the [Flare Data Connector](./data-connector.md). 16 | This [native](glossary.md#native) processing provides developers on Flare with efficient access to large amounts of data and [data proofs](glossary.md#data_proof) at minimal cost, with which to build software on the platform. 17 | 18 | By giving developers [trustless](glossary.md#trustless) access to the broadest range of data needed by the software they build, Flare can advance the development of more blockchain use cases where data is important, such as in [DeFi](glossary.md#defi), gaming, [NFT](glossary.md#nft), music, social networks, Real World Assets [(RWAs)](glossary.md#rwa), Machine Learning (ML), and Artificial Intelligence (AI). 19 | 20 | ## Flare Protocols 21 | 22 | Flare has the following native data acquisition protocols at these stages of development: 23 | 24 | * The **[Flare Time-Series Oracle (FTSO)](./ftso/index.md)** provides continuous estimations of changing data, such as [price pairs](glossary.md#price_pair). 25 | * The **[Flare Data Connector](./data-connector.md)** allows querying of verifiable, non-changing data from other chains and the internet. 26 | * The **[FAssets](https://dev.flare.network/fassets/overview)** system is being developed by Flare Labs. It allows tokens on blockchains that do not support smart contracts to be used trustlessly with smart contracts on the Flare blockchain. 27 | 28 | ## Developing on Flare 29 | 30 | For information about developing on Flare, see the [Flare Developer Hub](https://dev.flare.network/). 31 | 32 | ## Flare Networks 33 | 34 | Flare has 4 networks with different purposes: 35 | 36 | * **Flare** is the [main network](glossary.md#main_network), where `$FLR` is the native currency. 37 | * **Songbird** is the [canary network](glossary.md#canary_network), where `$SGB` is the native currency. Created with users in mind, it is meant for testing features under "real fire" conditions, before deploying them on the main network. 38 | * **Coston** is Songbird's public [test network](glossary.md#coston), created with developers in mind. 39 | * **Coston2** is Flare's public [test network](glossary.md#coston), created with developers in mind. 40 | 41 |
42 | ![The Flare networks](flare-network-types.png){ loading=lazy .allow-zoom width=500px } 43 |
General feature adoption flow.
44 |
45 | 46 | ## Flare Chains 47 | 48 | Flare uses two chains and is developing a built-in interoperability mechanism between them. 49 | 50 | * **C-Chain:** The contract chain that is used for smart contracts. It is where the Ethereum Virtual Machine operates, and is the chain where the vast bulk of the community currently interact. 51 | * **P-Chain:** The platform chain that accommodates [staking](../tech/validators.md) and provides rewards to its validators. 52 | -------------------------------------------------------------------------------- /docs/tech/ftso/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # FTSO 7 | 8 | For details about the Flare Time Series Oracle (FTSO), see [FTSOv2 in the Flare Developer Hub](https://dev.flare.network/ftso/overview). 9 | -------------------------------------------------------------------------------- /docs/tech/governance.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Governance 7 | 8 | > **Note:** This section has been moved to the [Flare Developer Hub](https://dev.flare.network/network/fsp/governance). Please visit there for the most up-to-date information. 9 | -------------------------------------------------------------------------------- /docs/tech/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Concepts 7 | 8 | This section contains in-depth descriptions of Flare's key concepts, technology and tools. 9 | 10 | Select one of the topics below: 11 | 12 | * [What Is Flare?](./flare.md) 13 | * [Automatic Claiming](./automatic-claiming.md) 14 | * [FAssets](https://dev.flare.network/fassets/overview) 15 | * [Flare API Portal](./api-portal.md) 16 | * [Flare Beta](./flare-beta.md) 17 | * [Flare Systems Protocol](./flare-systems-protocol.md) 18 | * [The FlareDrop](./the-flaredrop.md) 19 | * [FTSO](./ftso/index.md) 20 | * [Governance](./governance.md) 21 | * [Personal Delegation Accounts](./personal-delegation-account.md) 22 | * [Flare Data Connector](./data-connector.md) 23 | * [Tokenomics](./tokenomics.md) 24 | * [Validator Nodes](./validators.md) 25 | * [Glossary](./glossary.md) 26 | * [Archive](./archive/index.md) 27 | -------------------------------------------------------------------------------- /docs/tech/personal-delegation-account.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 1 4 | --- 5 | 6 | # Personal Delegation Accounts 7 | 8 | > **Note:** This section has been moved to the [Flare Developer Hub](https://dev.flare.network/network/guides/manage-flaredrops). Please visit there for the most up-to-date information. 9 | -------------------------------------------------------------------------------- /docs/tech/the-flaredrop.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 1 4 | --- 5 | 6 | # The FlareDrop 7 | 8 | > **Note:** This section has been moved to the [Flare Developer Hub](https://dev.flare.network/network/guides/manage-flaredrops). Please visit there for the most up-to-date information. -------------------------------------------------------------------------------- /docs/tech/validators.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Validator Nodes 7 | 8 | > **Note:** This section has been moved to the [Flare Developer Hub](https://dev.flare.network/run-node/validator-node). Please visit there for the most up-to-date information. -------------------------------------------------------------------------------- /docs/user/automatic-claiming.md: -------------------------------------------------------------------------------- 1 | # Automatic Claiming 2 | 3 | > **Note:** This guide has been moved to the [Flare Developer Hub](https://dev.flare.network/network/guides/using-flare-stake-tool). Please visit there for the most up-to-date information. -------------------------------------------------------------------------------- /docs/user/claiming-the-flaredrop.md: -------------------------------------------------------------------------------- 1 | # Claiming the FlareDrop 2 | 3 | Claiming the FlareDrop is available every 30 days and is based on the average balance from the last 23 days of each 30-day month. 4 | Therefore, it is advised that each address claim its funds during the first 7 days of each 30-day round. 5 | 6 | See [The FlareDrop concept page](../tech/the-flaredrop.md) for further explanation. 7 | 8 |
9 | ![FlareDrop Distribution Dates](flaredrop-distribution-dates.png){ loading=lazy .allow-zoom width=500px } 10 |
FlareDrop distribution dates.
11 |
12 | 13 | There are several ways to claim. 14 | You can claim: 15 | 16 | * Using the [Flare Portal](https://portal.flare.network/). 17 | * Through an [executor](../tech/automatic-claiming.md), which you can configure using the Portal, or 18 | 19 | !!! warning "Two steps to ensure receiving all your `$FLR` !" 20 | 21 | You must: 22 | 23 | 1. **Wrap `$FLR` to receive it.** 24 | Rewards are proportional to the `$WFLR` balance, not `$FLR`, so always wrap as much `$FLR` as you can! 25 | Wrapping has no downside: Wrapped tokens continue to be available for [delegation](../tech/ftso/index.md#delegation) and [governance voting](../tech/governance.md), for example, and they can be unwrapped at any time. 26 | See [Wrapping Flare Tokens](../user/wrapping-tokens.md). 27 | 2. **Claim before the distribution expires.** 28 | After the distribution becomes claimable, it expires in two bank months and a week (67 days). 29 | 30 | ## Claiming from the Flare Portal 31 | 32 | Claim manually from the Flare Portal. 33 | From there, you can see how many `$FLR` tokens you have to claim and you can claim them. 34 | 35 | 1. Go to the [Flare Portal](https://portal.flare.network/). 36 | 2. Click **Connect to Wallet** and log into your wallet. 37 | 38 | --8<-- 39 | ./include/wallet-warning.md 40 | --8<-- 41 | 42 | 3. Your **Main Account** is open by default. 43 | If you enabled a [PDA](../tech/personal-delegation-account.md) and want to claim for it instead, click **Delegation Account**. 44 | 4. Under **Claim your FlareDrop distribution**, any `$FLR` you have to claim displays on the button. 45 |
46 | ![Claim Your FlareDrop Distribution](flaredrop-claim-distribution.png){ loading=lazy .allow-zoom width=500px } 47 |
Claim Your FlareDrop Distribution.
48 |
49 | 5. Click the **Claim** button to claim your `$FLR`. 50 | A confirmation dialog opens. 51 |
52 | ![FlareDrop claiming confirmation](flaredrop-claim-confirmation.png){ loading=lazy .allow-zoom } 53 |
FlareDrop claiming confirmation.
54 |
55 | As a convenience, you have the choice to wrap your tokens after claiming them. 56 | In this way they are ready for the next FlareDrop or to be [delegated to the FTSO system](../tech/ftso/index.md#delegation), for example. 57 | 6. Click on the **Claim All Distribution** button. 58 | 7. Confirm the transaction on your wallet. 59 | 60 | ## Nominating Executors 61 | 62 | Alternatively, you can assign an [executor](../tech/automatic-claiming.md) to claim the FlareDrop for you. 63 | This is useful for cold wallets but also for any users wishing to reduce their operational burden. 64 | See [Automatic Claiming](./automatic-claiming.md) to learn how. 65 | -------------------------------------------------------------------------------- /docs/user/delegation/index.md: -------------------------------------------------------------------------------- 1 | # FTSO Delegation 2 | 3 | Select one of the topics below: 4 | 5 | * [Managing Delegations](./managing-delegations.md) 6 | * [Managing Rewards](./managing-rewards.md) 7 | -------------------------------------------------------------------------------- /docs/user/delegation/managing-delegations.md: -------------------------------------------------------------------------------- 1 | # Managing Delegations Using the Flare Portal 2 | 3 | When you make delegations to data providers, you increase their vote power, reinforce the stability of the FTSO ecosystem, and earn monetary rewards. 4 | 5 | This information explains how to manage your delegations using the [Flare Portal](https://portal.flare.network). Alternatively, if you have used block explorers for other networks and are competent interacting with smart contracts without a user interface, you can use the block explorer, which provides more options but can be more complex. Using it is intended for advanced users. 6 | 7 | ## Prerequisites 8 | 9 | Before you delegate your vote power, you must: 10 | 11 | * [Wrap your native tokens](../wrapping-tokens.md). Wrapped tokens are required to delegate your vote power to data providers. 12 | * Choose 1 or 2 data providers. Multiple lists of data providers are available online, such as [FlareMetrics](https://flaremetrics.io/). As you browse the lists, consider the [factors that affect the potential for rewards](../../tech/ftso/index.md#rewards). 13 | * [Understand how the timing of delegations affects rewards](../../tech/ftso/index.md#effects-of-the-vote-power-block-snapshot-on-delegations), and consider the following implications about the vote-power snapshot that will affect your rewards. 14 | 15 | ### Delegating Your Vote Power 16 | 17 | 1. Open the [Flare Portal](https://portal.flare.network). The home page is displayed. 18 | 19 |
20 | ![Flare Portal Home](delegation-portal-connect.png){ loading=lazy .allow-zoom width=500px } 21 |
Flare Portal home.
22 |
23 | 24 | 2. Click **Connect to Wallet** and log into your wallet. The interface to your **Main Account** opens. 25 | 26 | --8<-- 27 | ./include/wallet-warning.md 28 | --8<-- 29 | 30 | 3. Ensure you are connected to the network you want. In the following image, the wallet is connected to the Flare network. 31 | 32 |
33 | ![Flare Portal Main Account](delegation-portal-main.png){ loading=lazy .allow-zoom width=500px } 34 |
**Main Account** on the Flare network.
35 |
36 | 37 | 4. On the **Main Account** tab, locate the **FTSO provider delegations** field, and click **Delegate**. The **Delegate FTSO providers** window is displayed. 38 | 39 | 5. Click the **Main provider** dropdown menu, click the data provider you want, and drag the slider to select the percentage of your vote power you want to delegate to the data provider. 40 | 41 |
42 | ![FTSO data providers](delegation-portal-providers.png){ loading=lazy .allow-zoom } 43 |
**Delegate FTSO providers** window.
44 |
45 | 46 | 6. **Optional**: If you want to delegate to a second data provider, locate the **Second (optional) provider** field, and repeat step 3. 47 | 7. Click **Submit**. 48 | 8. Follow the steps to confirm the transaction in your wallet. 49 | 50 | ### Removing Delegations 51 | 52 | 1. Open the [Flare Portal](https://portal.flare.network), connect your wallet, and ensure you are connected to the network you want. 53 | 2. On the **Main Account** tab, locate the **FTSO provider delegations** field, and click **Delegate**. The **Delegate FTSO providers** window is displayed. 54 | 3. Drag the slider to 0% for one or both of the data providers, and click **Submit**. 55 | 4. Follow the steps to confirm the transaction in your wallet. 56 | -------------------------------------------------------------------------------- /docs/user/delegation/managing-rewards.md: -------------------------------------------------------------------------------- 1 | # Managing Rewards Using the Flare Portal 2 | 3 | [Rewards](../../tech/ftso/index.md#rewards) are accrued from your delegations to FTSO data providers whose submitted data is close to the calculated median value in a price epoch. 4 | 5 | Use this information to claim FTSO delegation rewards by using the Flare Portal. Alternatively, if you have used block explorers for other networks and are competent interacting with smart contracts without a user interface, you can use the block explorer, which provides more options but can be more complex. Using it is intended for advanced users. 6 | 7 | 1. Open the [Flare Portal](https://portal.flare.network). The home page is displayed. 8 | 9 |
10 | ![Flare Portal Home](delegation-portal-connect.png){ loading=lazy .allow-zoom width=500px } 11 |
Flare Portal home.
12 |
13 | 14 | 2. Click **Connect to Wallet** and log into your wallet. The interface to your **Main Account** opens. 15 | 16 | --8<-- 17 | ./include/wallet-warning.md 18 | --8<-- 19 | 20 | 3. Ensure you are connected to the network you want. In the following image, the wallet is connected to the Flare network. 21 | 22 |
23 | ![Flare Portal Main Account](delegation-portal-main.png){ loading=lazy .allow-zoom width=500px } 24 |
**Main Account** on the Flare network.
25 |
26 | 27 | 4. On the **Main Account** tab, locate the **Claim your delegation rewards** section to determine whether you have claimable rewards and whether those rewards can currently be claimed: 28 | 29 | * If you have rewards to claim and the reward manager contains enough tokens, the **Claim** button is enabled and shows the amount of rewards you can claim. Go to Step 5. 30 | * If you have rewards to claim, but the reward manager currently does not contain enough tokens, the **Claim** button shows the amount of rewards you can claim but is disabled. 31 | 32 | For security reasons, a **limited amount of tokens** is stored at a given time in the reward manager contract. 33 | Sometimes, all delegators claim their rewards in a short period of time immediately after the reward epoch ends, and the token storage is depleted. 34 | The storage is replenished periodically. 35 | If you are currently unable to claim your rewards because the storage is empty, **try again the next day**. 36 | 37 | * If you don't have claimable rewards, the **Claim** button shows **0** and is disabled. 38 | 39 | The following image shows an account with claimable rewards: 40 | 41 |
42 | ![Account with claimable rewards](delegation-portal-main.png){ loading=lazy .allow-zoom width=500px } 43 |
An account with claimable rewards.
44 |
45 | 46 | 5. Click the **Claim** button. The **Claim your delegation rewards** window is displayed. 47 | 48 |
49 | ![Claim your delegation rewards](rewards-portal-claim.png){ loading=lazy .allow-zoom width=500px } 50 |
Claim your delegation rewards.
51 |
52 | 53 | 6. **Optional**: If you have enabled your [personal delegation account](../../tech/personal-delegation-account.md), the option to send your rewards to the PDA is preselected by default. 54 | To send your rewards to the address that you connected to the Portal instead, deselect the option. 55 | 7. Click **Claim All Rewards** to claim all available rewards for the listed epochs. 56 | 57 | 8. Follow the steps to confirm the transaction in your wallet. 58 | 59 | Your rewards are claimed, and your updated balance of native tokens is displayed. 60 | -------------------------------------------------------------------------------- /docs/user/governance/index.md: -------------------------------------------------------------------------------- 1 | # Governance 2 | 3 | This section contains information about participating in governance on the Flare and Songbird networks. 4 | 5 | * [Voting](./voting.md) 6 | -------------------------------------------------------------------------------- /docs/user/governance/voting.md: -------------------------------------------------------------------------------- 1 | # Voting 2 | 3 | An integral part of the [governance process](../../tech/governance.md), voting is the way you influence decisions about how Flare and Songbird operate. 4 | 5 | This process can be performed directly through Flare's smart contracts, but the Flare Foundation has developed the [Flare Portal](https://portal.flare.network) to enable you to conveniently cast your vote. 6 | 7 | The following information is about voting on the Flare and Songbird networks. 8 | Ensure you have selected one of these networks in your wallet. 9 | 10 | ## Governance Process Summary 11 | 12 | This section summarizes the voting process, which is explained in more detail in the [Governance page](../../tech/governance.md). 13 | 14 | All changes to the Flare and Songbird networks are determined by the outcomes of votes on [Flare Improvement Proposals and Songbird Testing Proposals](../../tech/governance.md#flare-improvement-proposals-and-songbird-test-proposals). 15 | 16 | For now, all proposals are published by the Flare Foundation. 17 | 18 | On each network, each account can cast a number of votes equal to the amount of wrapped tokens it holds. 19 | Since this amount varies over time, a snapshot of all accounts is taken at a block randomly chosen before voting starts. 20 | This block is called the [vote count block](../../tech/governance.md#the-vote-count-block). 21 | 22 | Before snapshots are taken, a **notice period** occurs. 23 | If you need to wrap tokens before a voting, **wrap them during this notice period so that they are always included in the snapshot**. 24 | 25 | !!! tip 26 | It is worth noting that you can use the same wrapped tokens to simultaneously vote on proposals and delegate to [FTSO data providers](glossary.md#data_provider). 27 | 28 | ## Requirements 29 | 30 | To vote on any proposal, you need an account that contains wrapped tokens. 31 | You can wrap your tokens by using the [Flare Portal](https://portal.flare.network), as shown in the [Getting Wrapped Tokens](#2-getting-wrapped-tokens) section below. 32 | 33 | !!! warning 34 | Only wrapped tokens held at the vote count block are considered towards your vote count. 35 | Tokens wrapped or received afterwards will **not** result in additional votes. 36 | 37 | If you need to wrap tokens, always do so during the **notice period**. 38 | 39 | ## Guide 40 | 41 | ### 1. Connecting to the Portal 42 | 43 | Copy the Flare Portal URL, since you will need it later: 44 | 45 | ```text 46 | https://portal.flare.network 47 | ``` 48 | 49 | The first step to use the portal is to connect your wallet to it, and the procedure is different for each wallet: 50 | 51 | #### Bifrost Wallet 52 | 53 | 1. Open Bifrost Wallet, log in, and click the web browser tab indicated by the four gray squares at the bottom of the screen. 54 | 2. Paste the Flare Portal URL in the search field at the top of the window, and click **Search**. 55 | 3. Click **Connect to Wallet**. 56 | 4. Select **Bifrost Wallet**. 57 | 5. Ensure either the Flare or Songbird network is selected in the pop-up window, and click **Connect**. 58 | 59 | Your wallet is now connected to the portal. 60 | 61 | #### MetaMask Mobile 62 | 63 | 1. Open MetaMask, and log in. 64 | 2. Click the **three-lines menu**, and click **Browser**. 65 | 3. Paste the Flare Portal URL in the search field at the top of the window, and click **Go**. 66 | 4. Click **Connect to Wallet**, and click **MetaMask**. 67 | 68 | Your wallet is now connected to the portal. 69 | 70 | #### Ledger Nano S/X and Chrome 71 | 72 | 1. Connect to your Ledger device, and unlock it. 73 | 2. Log into the MetaMask Chrome extension, and sync your Ledger device. 74 | 3. Paste the Flare Portal URL in the search field at the top of the Chrome window, and click **Enter**. 75 | 4. Click **Connect to Wallet**. 76 | 5. Click **MetaMask**. 77 | 78 | Your wallet is now connected to the portal. 79 | 80 | #### MetaMask or Brave Wallet 81 | 82 | 1. Copy and paste the Flare Portal URL in the search bar at the top of your browser and press **Enter**. 83 | 2. Click **Connect to Wallet**. 84 | 3. Select **MetaMask**. 85 | 4. Ensure the correct account address is selected and press **Confirm**. 86 | 87 | Your wallet is now connected to the portal. 88 | 89 | ### 2. Getting Wrapped Tokens 90 | 91 | Wrapped tokens are required to vote. 92 | 93 | To wrap your tokens: 94 | 95 | 1. On the **Account** tab in the Flare Portal, ensure you are connected to the network on which the proposal will be voted. 96 | 2. Locate your token balance, and click **Wrap**. 97 | 3. Specify the amount you want to wrap, and click **Wrap**. 98 | 99 | !!! warning "Never wrap all your tokens" 100 | Always leave some unwrapped tokens to pay for transaction fees. 101 | 102 | 4. Confirm the transaction in your wallet. 103 | 104 | Remember to wrap your tokens before voting starts, as explained in the [Governance Process Summary](#governance-process-summary) section above. 105 | 106 | ### 3. Casting Your Vote 107 | 108 | !!! tip 109 | 110 | Wrapped tokens are required to vote. 111 | Depending on the network, ensure you have either `$FLR` or `$SGB` in the wallet you will use to vote. 112 | For more information, see [Getting Wrapped Tokens](#2-getting-wrapped-tokens). 113 | 114 | 1. In the Flare Portal, select the **Voting** tab. 115 | The **Governance Proposals** page is displayed. 116 | 2. Locate your current number of votes in the black box. 117 | If you have fewer votes than you expected, consider the warning in the [Requirements](#requirements) section above. 118 | 3. In the **List of proposals**, locate the proposal you want to vote on, and **click on it**. 119 | The selected proposal is displayed. 120 | 4. Review the information in the **Proposal info** and **Voting details** sections. 121 | 5. Cast your vote. 122 | All your available votes will be assigned to the option you specify: 123 | 124 | * To vote in favor of the proposal, click **Vote For**. 125 | * To vote for the proposal to be rejected, click **Vote Against**. 126 | 127 | 6. After you sign the transaction, your vote is final and cannot be changed. 128 | To sign the transaction and lock your vote, click **Confirm**. 129 | 130 | Your contribution to this proposal is now complete. 131 | 132 | ## Transferring Votes 133 | 134 | Votes can be transferred to another account while the wrapped tokens remain in your possession. 135 | This is useful, for example, if you have wrapped tokens in multiple self-custody wallets, since you can simplify your voting process by transferring all the votes to a single wallet. 136 | 137 | You can read all the details about transferring votes in the [Governance page](../../tech/governance.md#vote-transfer). 138 | 139 | By completing the following process, you are crediting another account with votes only; 140 | the tokens themselves stay in the original wallet. 141 | 142 | 1. Copy the Flare or Songbird address you want to transfer votes to. 143 | 2. On the **Voting** tab in the Flare Portal, locate your amount of current votes in the black box, and click **Transfer votes**. 144 | The **Information about transferred votes** window is displayed. 145 | 3. Read the disclaimer, and click **Transfer votes**. 146 | The **Transfer votes** window is displayed. 147 | 4. In the **Transfer all my votes to** field, paste the address from Step 1, and click **Confirm**. 148 | 5. Click **Confirm** on your wallet to sign the transaction. 149 | Your votes are credited to the address you specified. 150 | The tokens themselves stay in the original address. 151 | 152 | !!! info "Canceling vote transfers" 153 | You can stop transferring your votes to another address, if you do so before the snapshot is taken. 154 | 155 | You can do so from the **Transfer votes** window using the **Remove delegation** button. 156 | This button is only available when you have previously transferred votes. 157 | -------------------------------------------------------------------------------- /docs/user/index.md: -------------------------------------------------------------------------------- 1 | # User Guides 2 | 3 | For details about the User Guides, visit the [Flare Networks website](https://flare.network/) 4 | -------------------------------------------------------------------------------- /docs/user/personal-delegation-account.md: -------------------------------------------------------------------------------- 1 | # Personal Delegation Accounts 2 | 3 | You can receive `$WFLR` rewards for making contributions to the Flare community, for example, by [delegating](../tech/ftso/index.md#delegation) your tokens to FTSO data providers. 4 | 5 | A Personal Delegation Account (PDA) allows you to keep these rewards temporarily separate from your main account, so that you can track them, for example, as a personal record or for tax purposes. 6 | In certain jurisdictions, delaying the realization of earnings for a specified time can lead to a reduced tax rate. 7 | See [the Concept page](../tech/personal-delegation-account.md) for more detail. 8 | 9 | Particularly, the balance of a PDA can still be redelegated to earn compounded interest and the governance votes it grants can be transferred to another address. 10 | 11 | If a PDA is enabled and you configured an [executor](../tech/automatic-claiming.md), it automatically claims rewards for the main account and the PDA, and sends them to the PDA. 12 | 13 | ## Enabling a PDA 14 | 15 | You can enable and disable your PDA at any time in the [Flare Portal](https://portal.flare.network/) without any ill-effect, except the cost of the transaction fee. 16 | 17 | 1. Open the [Flare Portal](https://portal.flare.network/). 18 | 2. Click **Connect to Wallet** and log into your wallet. 19 | The interface to your **Main Account** opens. 20 |
21 | ![Main Account Opens](pda-main-account-opens.png){ loading=lazy .allow-zoom } 22 |
Main Account opens.
23 |
24 | 25 | --8<-- 26 | ./include/wallet-warning.md 27 | --8<-- 28 | 29 | 3. To switch from the **Main Account** to your PDA, click **Delegation Account**. 30 | 4. Click **Enable**. 31 |
32 | ![Enable a PDA](pda-user-delegation-account.png){ loading=lazy .allow-zoom } 33 |
Enable a PDA.
34 |
35 | 5. A popup appears with a short description of what a PDA is. 36 |
37 | ![Confirm enabling the PDA](pda-faqs-enable.png){ loading=lazy .allow-zoom width=400px } 38 |
Confirm enabling the PDA.
39 |
40 | 6. Click **Enable**. 41 | Your wallet shows the details of the transaction. 42 | 7. Review the transaction and confirm it. 43 | 44 | Once the PDA is enabled, the Flare Portal displays the PDA address and the initial `0.0` `$WFLR` balance. 45 | Your PDA is now ready to receive rewards! 46 |
47 | ![PDA Enabled](pda-enabled.png){ loading=lazy .allow-zoom } 48 |
The PDA address is enabled.
49 |
50 | 51 | If a PDA is enabled and you configured an [executor](../tech/automatic-claiming.md), it automatically claims rewards for the main account and the PDA, and sends them to the PDA. 52 | 53 | ## Operations available in a PDA 54 | 55 | Other operations available are: 56 | 57 | | Operation | Description | 58 | | ------------- | ---------------------- | 59 | | **Disable** | You can **Disable** the PDA at any time. Disabling sends all `$WFLR` back to the main account to your `$WFLR` balance. Automatic claims from executors will go to the main account as well. | 60 | | **Withdraw** | You can withdraw from your PDA at any time. Click **Withdraw**, enter the amount of `$WFLR` to withdraw, and click **Withdraw** again. The amount is sent to your main account to your `$WFLR` balance. | 61 | | **Delegate** | You can [delegate](../tech/personal-delegation-account.md) your rewards to FTSO data providers for compounded rewards. | 62 | | **Transfer votes** | A PDA cannot vote on governance proposals directly, but it can [transfer its votes](../tech/governance.md#vote-transfer) to another address, including its main account. Click **Transfer votes**, click **main account** or enter an address to transfer to, and click **Confirm**. | 63 | | **Claim FLR** | The **Claim FLR** button shows how many rewards you have to claim. Use this button to claim rewards yourself, or configure an [executor](../tech/automatic-claiming.md) from the main account tab to do that for you. | 64 | -------------------------------------------------------------------------------- /docs/user/staking/index.md: -------------------------------------------------------------------------------- 1 | # Staking on Validators 2 | 3 | This section contains information about staking Flare assets on [validators](../../tech/validators.md) and receiving rewards earned from your stake. 4 | 5 | * [Using FlareStake to Stake](./staking-flarestake.md) 6 | * [Using the Flare Portal to Stake](./staking-portal.md) 7 | * [Using the Command Line to Stake](./staking-cli.md) 8 | 9 | ## Lists of Validators 10 | 11 | Use any of the following tools to obtain the latest list of validators and analyze their statistics: 12 | 13 | * [FlareMetrics](https://flaremetrics.io/validators) 14 | * [Flarescan](http://flarescan.com/validators) 15 | * [flare.builders](https://www.flare.builders/validators) 16 | * [SolidiFi](https://solidifi.app/validators) 17 | 18 | !!! info "Conditions for Choosing Profitable Validators" 19 | 20 | As you analyze validator statistics, remember that you will earn staking rewards in the current validation reward period only when the following conditions are met: 21 | 22 | * Your chosen validator is running an FTSO data provider 23 | * Your chosen validator is running an FTSO data provider that has earned any [FTSO rewards](../../tech/ftso/index.md#rewards) during the four FTSO reward epochs inside the current validation reward period 24 | * Your chosen validator is operational at least 80% of the time 25 | 26 | ## Limits 27 | 28 | The amount that you can stake and the rewards you can gain by staking are restricted by these limits: 29 | 30 | * **Delegation factor**: Limits the total amount that can be staked to a validator to its self-bond, which is the amount validators stake to their own nodes, times the _delegation factor_, which is 15. 31 | For example, if a validator has a self-bond stake of 1M `$FLR`, the total sum of all stakes, including delegations, cannot exceed 15M `$FLR`. 32 | This limit allows for 14M `$FLR` of delegations. 33 | 34 | To determine whether a validator has space for more delegations, open the [FlareMetrics list of validators](https://flaremetrics.io/validators), hover over the progress bar in the **Total Stake** column, and look at the **Free Space** amount. 35 | 36 | * **Staking cap**: Limits the reward performance of individual validators to **5% of the total staked amount**. 37 | If you stake your funds on a validator with more than 5% of the total staked amount, you receive less `$FLR` in reward. 38 | To maximize your reward, delegate your staking funds to a validator with less than 5% of the total staked amount of `$FLR`. 39 | 40 | To determine whether a validator exceeds the staking cap, open the [FlareMetrics list of validators](https://flaremetrics.io/validators) and look for an exclamation mark beside the amount of `$FLR` staked in the **Total Stake** column and hover over it. 41 | 42 | * **Maximum number of validators**: You can stake to any number of validators, but [rewards](./staking-flarestake.md#reward-claiming-guide), [FlareDrops](../../tech/the-flaredrop.md), and [governance vote power](../../tech/governance.md#the-vote-count-block) only apply for up to 3 different validators. 43 | 44 | For more information about validators, see [Validator Nodes](../../tech/validators.md). 45 | -------------------------------------------------------------------------------- /docs/user/wallets/bifrost-wallet.md: -------------------------------------------------------------------------------- 1 | # Bifrost Wallet 2 | 3 | Bifrost Wallet is a **noncustodial mobile wallet** available for both Android and iOS. 4 | You can view your portfolio of crypto assets, access decentralized applications through the in-app browser and perform operations on various blockchain networks, including sending, receiving, wrapping and delegating Flare (`$FLR`) and Songbird (`$SGB`). 5 | 6 | ## Getting Started 7 | 8 | Start by downloading Bifrost Wallet from the [Apple App Store](https://apps.apple.com/us/app/bifrost-wallet/id1577198351) or [Google Play Store](https://play.google.com/store/apps/details?id=com.bifrostwallet.app) and either create a new wallet or import an existing one from a recovery phrase. 9 | 10 | The official guides in the [Bifrost Wallet help center](https://support.bifrostwallet.com) may be of assistance. 11 | 12 | !!! note "Please make sure you have installed at least version 0.4.5" 13 | 14 | !!! note "XRP Airdrop" 15 | 16 | Note that, **once `$FLR` distribution begins**, users who imported their Ethereum-style claim address into Bifrost to access the XRP airdrop will automatically see their tokens in the Flare asset row in the `COINS` section. 17 | 18 | ## Adding Flare Tokens 19 | 20 | When your balance of any native or wrapped token on the Flare network or Songbird network is more than 0, Bifrost Wallet automatically displays the balance. No additional action is required. 21 | 22 | ## Wrap and Delegate 23 | 24 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 25 | 26 | To wrap and delegate your `$FLR` or `$SGB` tokens using Bifrost Wallet, see Bifrost's [guide for wrapping and delegating $FLR](https://support.bifrostwallet.com/en/articles/6545558-wrap-and-delegate-flare) and [guide for wrapping and delegating $SGB](https://support.bifrostwallet.com/en/articles/5588951-wrap-and-delegate-songbird). 27 | 28 | Alternatively, wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 29 | 30 | --8<-- "./include/wallet-warning.md" 31 | -------------------------------------------------------------------------------- /docs/user/wallets/brave-wallet.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: How to use your Brave wallet to access the Songbird and Flare networks 3 | --- 4 | 5 | # Brave Wallet 6 | 7 | Brave Browser now offers a noncustodial software wallet on both Windows and macOS for Ethereum Virtual Machine (EVM) integrated chains such as Flare and Songbird. 8 | 9 | ## Getting Started 10 | 11 | To use Brave Wallet with Flare or Songbird, ensure you have: 12 | 13 | * Downloaded Brave Browser to your computer, version 1.42.88 or later. 14 | * Initialized a Brave wallet or restored an existing one. 15 | * Protected your Brave wallet with a password. 16 | * Backed up your crypto wallet with a 12-word recovery phrase. 17 | 18 | ## Adding Flare Tokens 19 | 20 | After your wallet is set up, you need to connect to Flare's networks, which will add each network's native token to your listed assets. 21 | 22 | 1. Open Brave browser on your computer. 23 | 2. Navigate to **Settings**, and select **Web3** from the list of options. 24 | 3. In the box on the right, click **Wallet Networks**, and then click **Add**. 25 | 4. Complete the following steps to set up the Flare network and Songbird network: 26 | 27 | === "Flare" 28 | 29 | 1. In the **Search network field**, select `0xe(14) Flare Mainnet`, and verify that the displayed values match the values in this table: 30 | 31 | | Network Setting | Value | 32 | | ----------------------------- | ---------------------------------------------- | 33 | | **The id of chain** | 0xe | 34 | | **The name of chain** | Flare Mainnet | 35 | | **Chain's currency name** | Flare | 36 | | **Chain's currency symbol** | FLR | 37 | | **Chain's currency decimals** | 18 | 38 | | **RPC URLs** | | 39 | | **Icon URLs** | _(leave blank)_ | 40 | | **Block explorer URLs** | | 41 | 42 | 2. Click **Submit**. 43 | 44 | === "Songbird" 45 | 46 | 1. In the **Search network field**, select `0x13(19) Songbird Canary-Network`, and verify that the displayed values match the values in the following table. 47 | 48 | !!! tip 49 | Make sure the RPC node URL is `https://songbird-api.flare.network/ext/bc/C/rpc`. 50 | 51 | | Network Setting | Value | 52 | | ----------------------------- | ------------------------------------------------- | 53 | | **The id of chain** | 0x13 | 54 | | **The name of chain** | Songbird Canary-Network | 55 | | **Chain's currency name** | Songbird | 56 | | **Chain's currency symbol** | SGB | 57 | | **Chain's currency decimals** | 18 | 58 | | **RPC URLs** | | 59 | | **Icon URLs** | _(leave blank)_ | 60 | | **Block explorer URLs** | | 61 | 62 | 2. Click **Submit**. 63 | 64 | 5. Click **Wallet**. 65 | 6. Specify your password, and click **Unlock**. 66 | 7. On the left side of the screen beside **Balance**, click the drop-down menu and select **Flare** or **Songbird**. 67 | Connection to the network is complete, and your balance of native tokens on the selected network is displayed. 68 | 69 | With the previous steps completed, you now have access to the Flare network and Songbird Network and each network's native token, but you must [complete an extra step](./../wrapping-tokens.md#automatically) for the wallet to recognize wrapped tokens, which are needed in a lot of operations. 70 | 71 | ## Wrap and Delegate 72 | 73 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 74 | 75 | Wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 76 | 77 | --8<-- "./include/wallet-warning.md" 78 | -------------------------------------------------------------------------------- /docs/user/wallets/dcent-wallet.md: -------------------------------------------------------------------------------- 1 | # D'CENT Wallet 2 | 3 | D'CENT Biometric Wallet is a **noncustodial hardware wallet** and is considered one of the most secure ways to manage your crypto assets. 4 | 5 | ## Getting Started 6 | 7 | Purchase a D'CENT Biometric hardware wallet from the [official D'CENT shop](https://dcentwallet.com/Shop) or download their software wallet/mobile app from the [Apple App Store](https://apps.apple.com/us/app/dcent-wallet/id1447206611) or [Google Play Store](https://play.google.com/store/apps/details?id=com.kr.iotrust.dcent.wallet). 8 | Then either initialize a new wallet or import an existing one from a recovery phrase. 9 | 10 | The official D'CENT device setup help guides can be found here: [https://userguide.dcentwallet.com/biometric-wallet/setting-up](https://userguide.dcentwallet.com/biometric-wallet/setting-up). 11 | 12 | ## Adding Flare Tokens 13 | 14 | After your device is set up and synced with the mobile app, complete the following procedure to add native tokens `$FLR` and `$SGB` to your listed assets. Although this procedure also explains how to add the wrapped tokens `$WFLR` and `$WSGB` to your listed assets, you can automatically [add `$WFLR` and `$WSGB` using the Flare Portal](../wrapping-tokens.md#automatically). 15 | 16 | 1. Ensure the D'CENT biometric wallet is updated with the latest firmware, v2.24.0 or later. 17 | 2. Login to your D'CENT mobile app and have your device turned on, unlocked, and paired via Bluetooth. 18 | 3. Click the **+** sign on the bottom right of the **Account** tab. 19 | 4. In the **Search** box, search for one of the following tokens to add, and select the result: 20 | 21 | | Token | Result | 22 | | ---------------------| ----------------------- | 23 | | `Flare` | Flare (FLR) | 24 | | `Songbird` | Songbird Token (SGB) | 25 | | `Wrapped Flare` | Wrapped Flare (WFLR) | 26 | | `Wrapped Songbird` | Wrapped Songbird (WSGB) | 27 | 28 | 5. Name your new account, and click **Create**. 29 | 6. Repeat steps 4 and 5 for each token you want to add to the list of assets in your wallet. 30 | 31 | ## Wrap and Delegate 32 | 33 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 34 | 35 | You can wrap and delegate your `$SGB` using D'CENT's native FTSO Portal: 36 | 37 | !!! note "Delegation instructions for the Flare network are awaiting confirmation." 38 | 39 | 1. Click the **Discovery** tab at the bottom middle of the screen. 40 | 2. Select the **FTSO Portal** from the menu then click **Go**. 41 | 3. Choose the Songbird account you wish to use and click **Connect**. 42 | 4. You will need to wrap your `$SGB` by clicking **SGB ↔️ WSGB** marked in green near the top middle of the screen. 43 | 5. Input the `$SGB` amount you want to wrap and click the green **SGB ↔️ WSGB** box. 44 | 6. Click **Confirm** and follow the prompts to sign the transaction with your hardware device. 45 | 7. You can now delegate your `$WSGB` by clicking **Add delegation**. 46 | 8. Select a provider and input the percentage of your `$WSGB` holdings you want to delegate to their service and press **Delegate**. 47 | 48 | !!! note 49 | 50 | Providers listed as a _Partner_ have additional security features integrated with D'cent. 51 | 52 | 9. Click **Confirm** and follow the prompts to sign the transaction with your hardware device. 53 | 10. To add a second provider (up to two), repeat steps 7 through 9. 54 | 55 | Alternatively, wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 56 | 57 | --8<-- "./include/wallet-warning.md" 58 | -------------------------------------------------------------------------------- /docs/user/wallets/enkrypt-wallet.md: -------------------------------------------------------------------------------- 1 | # Enkrypt Wallet 2 | 3 | [Enkrypt](https://www.enkrypt.com/?mtm_campaign=Flare%20Wiki%20-%20Getting%20started%20with%20Enkrypt) is a **multichain**, **open-source** and **noncustodial** wallet that tracks no data. 4 | It interacts with Polkadot, Ethereum, Bitcoin and more, all directly in the browser. 5 | 6 | ## Getting Started 7 | 8 | 1. Install [Enkrypt](https://www.enkrypt.com/?mtm_campaign=Flare%20Wiki%20-%20Getting%20started%20with%20Enkrypt). 9 | 2. Create a new wallet or import an existing wallet to Enkrypt. 10 | 3. Securely back up your recovery phrase offline. 11 | 4. Protect your Enkrypt wallet with a password. 12 | 13 | ## Adding Flare Tokens 14 | 15 | After you set up your wallet, connect to Flare's networks, which will add each network's native token and wrapped token to your listed assets: 16 | 17 | 1. [Add Flare or Songbird as a custom network](https://help.myetherwallet.com/en/articles/6434713-enkrypt-connecting-to-networks-and-dapps) using these parameters: 18 | 19 | === "Flare" 20 | 21 | 1. From the main menu, click **Manage networks**. The **Manage networks** window is displayed. 22 | 2. Click the sliders icon beside the **Search networks** field. 23 | 3. Click **Custom network**. 24 | The **Custom network** window is displayed. 25 | 4. Specify the following values: 26 | 27 | | Network Setting | Value | 28 | | ---------------------- | ---------------------------------------------- | 29 | | **Network Name** | Flare | 30 | | **New RPC URL** | | 31 | | **Chain ID** | 14 | 32 | | **Currency Symbol** | FLR | 33 | | **Block Explorer URL** | | 34 | 35 | 5. Click **Add network**. 36 | 6. Locate Flare Mainnet at the bottom of the list, and toggle the switch to enable your wallet to display your balance of `$FLR`. 37 | 7. Follow [these instructions for manually adding tokens](../wrapping-tokens.md#manually) to retrieve the `WNat` contract address, and copy it. 38 | 39 | !!! tip 40 | The WNat contract address is different on each network. Ensure you copy the `WNat` contract address on the Flare network. 41 | 42 | 8. With Flare Mainnet selected on the main menu in your Enkrypt wallet, click **Add custom token**. 43 | The **Add a token** window is displayed. 44 | 9. In the **Contract address** field, paste the `WNat` contract address that you copied in step 6. 45 | 10. Click **Add token**. 46 | The wrapped token `$WFLR` is added to your list of Flare assets. 47 | 48 | === "Songbird" 49 | 50 | 1. From the main menu, click **Manage networks**. 51 | The **Manage networks** window is displayed. 52 | 2. Click the sliders icon beside the **Search networks** field. 53 | 3. Click **Custom network**. The **Custom network** window is displayed. 54 | 4. Specify the following values: 55 | 56 | | Network Setting | Value | 57 | | ---------------------- | ------------------------------------------------- | 58 | | **Network Name** | Songbird | 59 | | **New RPC URL** | | 60 | | **Chain ID** | 19 | 61 | | **Currency Symbol** | SGB | 62 | | **Block Explorer URL** | | 63 | 64 | 5. Click **Add network**. 65 | 6. Locate Songbird Canary-Network at the bottom of the list, and toggle the switch to enable your wallet to display your balance of `$SGB`. 66 | 7. Follow [these instructions for manually adding tokens](../wrapping-tokens.md#manually) to retrieve the `WNat` contract address, and copy it. 67 | 68 | !!! tip 69 | The WNat contract address is different on each network. Ensure you copy the `WNat` contract address on the Songbird network. 70 | 71 | 8. With Songbird Canary-Network selected on the main menu in your Enkrypt wallet, click **Add custom token**. 72 | The **Add a token** window is displayed. 73 | 9. In the **Contract address** field, paste the `WNat` contract address that you copied in step 6. 74 | 10. Click **Add token**. 75 | The wrapped token `$WSGB` is added to your list of Songbird assets. 76 | 77 | ## Wrap and Delegate 78 | 79 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 80 | 81 | Wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 82 | 83 | --8<-- "./include/wallet-warning.md" 84 | -------------------------------------------------------------------------------- /docs/user/wallets/how-to-access-flare-network-with-a-ledger-device.md: -------------------------------------------------------------------------------- 1 | # Ledger Nano X and Nano S 2 | 3 | Hardware wallets are considered among the more secure options to manage crypto assets and store private keys. 4 | Your crypto assets can remain safe, even if your computer or phone is compromised, as long as you keep your recovery phrase safe and review all transaction details before confirming transactions. 5 | 6 | This guide explains how to configure your Ledger device to use it through the MetaMask wallet. 7 | 8 | ## One-Time Setup 9 | 10 | You only need to perform the steps in this section once. 11 | 12 | ### Installing MetaMask 13 | 14 | Follow the [MetaMask guide](./how-to-access-flare-network-with-metamask.md) to install and configure the MetaMask wallet. 15 | Make sure MetaMask can show `$FLR` and `$SGB` tokens, and their wrapped `$WFLR` and `$WSGB` versions. 16 | 17 | ### Installing Ledger 18 | 19 | Follow the [Ledger](https://www.ledger.com/start) instructions to: 20 | 21 | 1. Install Ledger Live and open it. 22 | 2. Initialize your Ledger device with a recovery phrase. 23 | 3. Protect your Ledger device with a PIN code. 24 | 4. Install the latest Ledger device firmware. 25 | 26 | ### Installing the Ethereum App 27 | 28 | Flare is [EVM](glossary.md#evm)-compatible, so it uses the Ethereum app on Ledger. 29 | After meeting the requirements above, install the Ethereum app on the device with the following steps: 30 | 31 | 1. Open the **Manager** in Ledger Live. 32 | 2. Connect and unlock your Ledger device. 33 | 3. Enable the manager on your Ledger device by pressing both buttons. 34 | 4. Find **Ethereum (ETH)** in the app catalog. 35 | 5. Click the **Install** button of the app. 36 | 37 | Your Ledger device displays _Processing…_. 38 | The app installation is complete. 39 | 40 | ### Creating Accounts 41 | 42 | After enabling access to Songbird and Flare in MetaMask, create one or more accounts. 43 | 44 | In MetaMask: 45 | 46 | 1. Select **Flare** or **Songbird** in the network dropdown. 47 | 2. Connect your Ledger device using USB. 48 | 3. Open the Ethereum app on your Ledger device. 49 | 4. If Ledger Live is still running on your computer, you must quit the app. 50 | 5. Locate MetaMask's **Settings** and then **Advanced** settings. 51 | 6. Ensure that the **Preferred Ledger Connection Type** is set to **WebHID** in the drop-down menu (it should be the case by default). 52 | 7. Click your account image and **Connect Hardware Wallet**. 53 | A pop up box opens listing paired Human Interface Devices (HID). 54 | 8. Highlight your **Ledger S** or **Ledger X** and click **Connect**. 55 | A random set of addresses opens that are available for your use. 56 | 9. To create one or more accounts (for example, for different tokens or different purposes), select any account number or multiple account numbers and click **Unlock**. 57 | 58 | You have created one or more Ledger accounts to which you can send `$FLR` or `$SGB` tokens. 59 | 60 | Your `$FLR` and `$SGB` balance will be displayed on the MetaMask overview. 61 | Once the accounts contain `$WFLR` or `$WSGB` their balances will be shown too if you followed the [Wrapping Flare Tokens](../wrapping-tokens.md) guide. 62 | 63 | !!! note 64 | 65 | The [Ledger Live](https://www.ledger.com/ledger-live) desktop application, as of version 2.55, can show your `$FLR` and `$SGB` balances but NOT the wrapped `$WFLR` and `$WSGB` versions. 66 | 67 | The tokens are still in the account, but Ledger Live does not show them. 68 | 69 | ## Using Ledger with MetaMask 70 | 71 | Now that you have the one-time setup complete, here are a few things you can do to get started using your new accounts. 72 | 73 | * **Receive tokens**. 74 | To receive tokens, copy your account address and share it with the sender. 75 | 76 | * **Send tokens**. 77 | To send tokens, click **Send** and enter the recipient address. 78 | Then enter the desired amount and click **Next**. 79 | MetaMask will ask you to confirm the transaction from the Ledger device. 80 | 81 | * **Confirm transactions**. 82 | To confirm or reject a transaction, follow the on-screen instructions on your Ledger device. 83 | 84 | !!! warning 85 | Always review all transaction details on your Ledger device before confirming any transaction! 86 | 87 | --8<-- "./include/wallet-warning.md" 88 | 89 | To learn how to use Ledger, including signing transactions, go to [Ledger.com](https://www.ledger.com/). 90 | -------------------------------------------------------------------------------- /docs/user/wallets/how-to-access-flare-network-with-a-trezor-device.md: -------------------------------------------------------------------------------- 1 | # Trezor T 2 | 3 | Hardware wallets are considered among the more secure options to manage crypto assets and store private keys. 4 | Your crypto assets can remain safe, even if your computer or phone is compromised, as long as you keep your recovery phrase safe and review all transaction details before confirming transactions. 5 | 6 | ## Getting Started 7 | 8 | To use your Trezor device with Flare (`$FLR`) or Songbird (`$SGB`), first make sure that you have: 9 | 10 | 1. Initialized your Trezor device with a recovery phrase. 11 | 2. Protected your Trezor device with a PIN code. 12 | 3. Trezor Suite is installed, open and ready to use. 13 | 4. Enabled Ethereum under the **Crypto** tab in Trezor Suite. 14 | 5. Installed the latest Trezor device firmware. 15 | 6. Installed the latest version of [Google Chrome](https://www.google.com/chrome/). 16 | 7. Installed the [MetaMask browser extension](https://metamask.io/download). 17 | 18 | ## Use Trezor T Device with MetaMask 19 | 20 | You can access Flare and Songbird by using your Trezor T with the MetaMask browser extension. 21 | 22 | 1. Open the MetaMask browser extension in your browser. 23 | 2. Click **Custom RPC** in the network dropdown. 24 | 25 | === "Songbird" 26 | 27 | | Field | Value | 28 | | ---------------------- | ------------------------------------------------- | 29 | | **Network Name** | Songbird | 30 | | **New RPC URL** | | 31 | | **Chain ID** | 19 | 32 | | **Currency Symbol** | SGB | 33 | | **Block Explorer URL** | | 34 | 35 | === "Flare" 36 | 37 | | Field | Value | 38 | | ---------------------- | ---------------------------------------------- | 39 | | **Network Name** | Flare | 40 | | **New RPC URL** | | 41 | | **Chain ID** | 14 | 42 | | **Currency Symbol** | FLR | 43 | | **Block Explorer URL** | | 44 | 45 | 3. Click **Save**. 46 | 4. Select **Flare** or **Songbird** in the network dropdown. 47 | 5. Connect and unlock your Trezor device. 48 | 6. Click your account image and **Connect Hardware Wallet**. 49 | 7. Select Trezor and click **Continue**. 50 | 8. Follow the on screen instructions to export your public key. 51 | 9. Select your Account and click **Unlock**. 52 | 53 | !!! info 54 | 55 | Please note that the provided Flare RPC node is only for individuals and **not for commercial use**. 56 | 57 | Companies and developers may contact Flare Networks to arrange dedicated access. 58 | 59 | You will see your `$FLR` or `$SGB` balance on the overview. 60 | To receive tokens, copy your account address and share it with the sender. 61 | To send tokens, click **Send** and enter the recipient address, enter the desired amount and click **Next**. 62 | Follow the on screen instructions to confirm or reject the transaction on your Trezor device. 63 | 64 | !!! warning 65 | Always review all transaction details on your Trezor device before confirming any transaction! 66 | 67 | --8<-- "./include/wallet-warning.md" 68 | 69 | ## Wrap and Delegate 70 | 71 | Once connected to a Flare network, enter the address of the website or dapp you wish to use to wrap and delegate in the MetaMask browser. 72 | A few [FTSO](glossary.md#ftso) data providers have developed dApps integrated with their websites that allow users to wrap, delegate and claim SGB and Flare rewards. 73 | Delegating using this method is not exclusive to one specific provider, as these dapps allow you to choose from a number of different providers. 74 | 75 | Other providers have their own websites and are developing similar dapps. 76 | See the full list of active data providers on [flaremetrics.io](https://flaremetrics.io). 77 | -------------------------------------------------------------------------------- /docs/user/wallets/how-to-access-flare-network-with-metamask.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: How to connect the MetaMask browser extension to the Songbird or Flare networks 3 | --- 4 | 5 | # MetaMask 6 | 7 | The MetaMask browser extension is a convenient way to access and interact with blockchains like Songbird or Flare. 8 | To do so, you need to first add a custom network to MetaMask, as explained in this guide. 9 | Make sure that you have securely backed up your recovery phrase before proceeding. 10 | 11 | ## Getting Started 12 | 13 | To use MetaMask with Songbird or Flare, ensure you have: 14 | 15 | 1. Installed the latest version of [Google Chrome](https://www.google.com/chrome/). 16 | 2. Installed the [MetaMask browser extension](https://metamask.io/download). 17 | 3. Created a new wallet or imported an existing wallet to MetaMask. 18 | 4. Securely backed up your recovery phrase offline. 19 | 5. Protected your MetaMask with a password. 20 | 21 | ## Adding Flare Tokens 22 | 23 | After you set up your wallet, add the native tokens `$FLR` and `$SGB` and the wrapped tokens `$WFLR` and `$WSGB` to your listed assets: 24 | 25 | 1. Open the MetaMask browser extension. 26 | 2. Unlock your MetaMask wallet with your password. 27 | 3. Click the networks drop-down menu, and click **Add network**. In a browser tab, the **Settings** menu opens to the **Networks** section. 28 | 4. Scroll to the bottom of the page, and click **Add a network manually**. 29 | 5. Complete the following steps to set up the Flare network and Songbird network: 30 | 31 | === "Flare" 32 | 33 | 1. Specify the values from the following table to set up the Flare network, which will add the native `$FLR` token to your list of assets. 34 | 35 | | Field | Value | 36 | | ---------------------- | ---------------------------------------------- | 37 | | **Network Name** | Flare | 38 | | **New RPC URL** | | 39 | | **Chain ID** | 14 | 40 | | **Currency Symbol** | FLR | 41 | | **Block Explorer URL** | | 42 | 43 | 2. Click **Save**. 44 | 3. [Follow these instructions to automatically add `$WFLR`](../wrapping-tokens.md#automatically) to your listed assets. 45 | 46 | === "Songbird" 47 | 48 | 1. Specify the values from the following table to set up the Songbird network, which will add the native `$SGB` token to your list of assets. 49 | 50 | | Field | Value | 51 | | ---------------------- | ------------------------------------------------- | 52 | | **Network Name** | Songbird | 53 | | **New RPC URL** | | 54 | | **Chain ID** | 19 | 55 | | **Currency Symbol** | SGB | 56 | | **Block Explorer URL** | | 57 | 58 | 2. Click **Save**. 59 | 3. [Follow these instructions to automatically add `$WSGB`](../wrapping-tokens.md#automatically) to your listed assets. 60 | 61 | !!! warning 62 | Always review all transaction details in MetaMask before confirming any transaction! 63 | 64 | --8<-- "./include/wallet-warning.md" 65 | 66 | ## Wrap and Delegate 67 | 68 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 69 | 70 | Wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 71 | -------------------------------------------------------------------------------- /docs/user/wallets/index.md: -------------------------------------------------------------------------------- 1 | # Wallets 2 | 3 | For details about the wallets, visit the [Flare Networks website](https://flare.network/wallets) 4 | -------------------------------------------------------------------------------- /docs/user/wallets/safepal-s1-wallet.md: -------------------------------------------------------------------------------- 1 | # SafePal S1 Wallet 2 | 3 | SafePal S1 is a **noncustodial hardware wallet** that is considered one of the most secure ways to manage your crypto assets. 4 | 5 | ## Getting Started 6 | 7 | Use of a SafePal S1 hardware wallet requires syncing the device with the mobile app. 8 | A step by step unboxing guide to initialize a new device/wallet, or import an existing one from a recovery phrase, can be found here: [https://safepalsupport.zendesk.com/hc/en-us/articles/360046051752-How-to-Set-Up-a-S1-Hardware-Wallet](https://safepalsupport.zendesk.com/hc/en-us/articles/360046051752-How-to-Set-Up-a-S1-Hardware-Wallet). 9 | 10 | ## Adding Flare Tokens 11 | 12 | After you set up your wallet, add the native tokens `$FLR` and `$SGB` and the wrapped token `$WFLR` to your listed assets. 13 | 14 | !!! tip 15 | SafePal currently does not support the addition of wrapped Songbird (`$WSGB`) to wallets. 16 | 17 | 1. Ensure the SafePal S1 is updated with the latest firmware, **version V1.0.32** or later. 18 | 2. Login to your SafePal mobile app and have your S1 device turned on and unlocked. 19 | 3. Scroll to the bottom of your listed assets in the mobile app, and click **Manage Coins**. 20 | 4. Click the **Enter token or token contract address** field. 21 | The **Search** window is displayed. 22 | 5. Complete the following steps to add Flare and Songbird tokens to your wallet: 23 | 24 | === "Flare" 25 | 26 | 1. Scroll through the list of networks, and select **Flare**. 27 | 2. In the **Enter token or token contract address** field, search for `Flare`. 28 | 3. Click the plus sign (+) displayed beside **FLR (Flare)**. 29 | FLR (Flare) added to your list of assets, and the homepage is displayed. 30 | 4. Scroll to the bottom of your listed assets in the mobile app, and click **Manage Coins**. 31 | 5. Select **Flare** from the list of networks again, and search for `Wrapped Flare`. 32 | 6. Click the plus sign (+) displayed beside **WFLR (Flare)**. 33 | WFLR (Flare) is added to your list of assets on the homepage. 34 | 35 | === "Songbird" 36 | 37 | 1. In the **Enter token or token contract address** field, search for `Songbird`. 38 | A list of Songbird tokens on various blockchains is displayed. 39 | 40 | !!! tip 41 | Ignore all Songbird tokens categorized as BEP-20 and ERC-20. 42 | 2. Click the plus sign (+) for this **SGB (Songbird)** token with the logo: 43 | 44 | ![SGB Songbird token](safepal-songbird-logo.png) 45 | 46 | SGB (Songbird) is added to your list of assets on the homepage. 47 | 48 | ## Wrap and Delegate 49 | 50 | When you delegate your vote power to FTSO data providers, you not only support the Flare ecosystem but also earn monetary rewards. 51 | 52 | You can use the SafePal mobile app to wrap and delegate your tokens: 53 | 54 | 1. Open the SafePal mobile app and navigate to the built-in web browser by clicking the four squares at the bottom middle of the screen. 55 | 2. Enter the address of the website or dapp you wish to use to wrap and delegate in the search bar at the top of the screen. 56 | 57 | !!! info 58 | 59 | These dapps are usually created by FTSO [data providers](glossary.md#data_provider), but some of them allow you to choose a different data provider to delegate to. 60 | Take a look at [flaremetrics.io](https://flaremetrics.io/) and pick the one you prefer. 61 | 62 | 3. After copying and pasting the address, click the drop-down menu to the right of the search tab. 63 | 4. Scroll down, select the **Flare** or **Songbird** networks, and click **Go**. 64 | 5. A pop-up will appear notifying that you are being redirected to a third-party dapp. Press **Confirm**. 65 | 66 | Other data providers host similar websites or dapps for wrapping and delegation. 67 | See the full list of signal providers on Songbird at [https://flaremetrics.io/](https://flaremetrics.io). 68 | 69 | Alternatively, wrap and delegate your `$FLR` or `$SGB` tokens using the [Flare Portal](https://portal.flare.network/). First, [wrap your tokens](../wrapping-tokens.md), and then [delegate them](../delegation/managing-delegations.md#delegating-your-vote-power). 70 | 71 | --8<-- "./include/wallet-warning.md" 72 | -------------------------------------------------------------------------------- /docs/user/wrapping-tokens.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Wrapping Flare Tokens 7 | 8 | This information explains how to wrap and unwrap native tokens on various Flare networks using the [Flare Portal](https://portal.flare.network) or the block explorer. 9 | Wrapped tokens are required to [delegate your vote power](../tech/ftso/index.md#delegation) to FTSO data providers and to [vote on decisions](../tech/governance.md) that affect how Flare networks operate. 10 | 11 | When you complete the following steps for wrapping, your native tokens, such as `$FLR` and `$SGB`, are wrapped into `$WFLR` and `$WSGB`, respectively, so that you can participate in FTSO delegation and governance. 12 | When you need to convert your wrapped tokens into native tokens again, unwrap the wrapped tokens using similar steps, as described below. 13 | 14 | ## Using the Flare Portal 15 | 16 | 1. Open the [Flare Portal](https://portal.flare.network). 17 | The home page is displayed. 18 | 19 |
20 | ![Flare Portal Home](delegation-portal-connect.png){ loading=lazy .allow-zoom width=500px } 21 |
Flare Portal home.
22 |
23 | 24 | 2. Click **Connect to Wallet** and log into your wallet. 25 | The interface to your **Main Account** opens. 26 | 27 | --8<-- 28 | ./include/wallet-warning.md 29 | --8<-- 30 | 31 | 3. Ensure you are connected to the network you want. 32 | In the following image, the wallet is connected to the Flare network. 33 | 34 |
35 | ![Flare Portal Main Account](delegation-portal-main.png){ loading=lazy .allow-zoom width=500px } 36 |
**Main Account** on the Flare network.
37 |
38 | 39 | 4. Choose one of the following options: 40 | 41 | * **Wrap**: Locate your balance of native tokens, and click **Wrap**. 42 | 43 | !!! warning "Never wrap all your tokens" 44 | Wrapping and unwrapping tokens are transactions with fees to be paid in native tokens. 45 | Always leave some unwrapped tokens to pay for transaction fees. 46 | 47 | Specify the amount to wrap, and click **Wrap** again. 48 | 49 | * **Unwrap**: Locate your balance of wrapped tokens, and click **Unwrap**. 50 | Specify the amount to unwrap, and click **Unwrap** again. 51 | 52 | 5. Follow the steps to complete the transaction in your wallet. 53 | 54 | Your wrapped token balance is updated and displayed in the Flare Portal and your wallet. 55 | 56 | If your wrapped token balance is not displayed in your wallet, you must manually [add the wrapped token](#adding-wrapped-tokens-to-wallets) so that your wallet recognizes it. 57 | 58 | ## Using the Block Explorer 59 | 60 | !!! example "This section is for advanced users." 61 | 62 | 1. Open a block explorer. 63 | 2. From the block explorer, open the `WNat` contract. 64 | 3. Click **Connect Wallet**, and complete the steps to connect your wallet, ensuring you are on the network on which you will wrap tokens. 65 | 4. Click the **Write Contract** tab, and use the following methods to wrap and unwrap tokens: 66 | 67 | * `deposit`: Wraps the amount of native tokens you specify in the field. 68 | * `withdraw`: Unwraps the amount of native tokens you specify in the field. 69 | 70 | Your token balance is updated and displayed in your wallet. 71 | If your wrapped token balance is not displayed in your wallet, you must manually [add the wrapped token](#adding-wrapped-tokens-to-wallets) so that your wallet recognizes it. 72 | 73 | ## Adding Wrapped Tokens to Wallets 74 | 75 | Your wrapped tokens are stored on the blockchain in a special [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) smart contract called `WNat`, for Wrapped Native tokens. 76 | Some wallets, like the [Bifrost Wallet](./wallets/bifrost-wallet.md), are aware of this contract and are therefore preconfigured to display `$WFLR` and `$WSGB` balances. 77 | Some other wallets, though, require you to configure them so that they can display wrapped-token balances. 78 | 79 | If your wallet doesn't display your wrapped-token balance, you need to configure it, either automatically or manually as described in the following procedures. 80 | 81 | ### Automatically 82 | 83 | This is typically the fastest procedure, but might not work with all wallets. 84 | 85 | 1. Open the [Flare Portal](https://portal.flare.network). The home page is displayed. 86 | 87 |
88 | ![Flare Portal Home](delegation-portal-connect.png){ loading=lazy .allow-zoom width=500px } 89 |
Flare Portal home.
90 |
91 | 92 | 2. Click **Connect to Wallet** and log into your wallet. The interface to your **Main Account** opens. 93 | 3. Ensure you are connected to the network you want. In the following image, the wallet is connected to the Flare network. 94 | 95 |
96 | ![Flare Portal Main Account](delegation-portal-main.png){ loading=lazy .allow-zoom width=500px } 97 |
**Main Account** on the Flare network.
98 |
99 | 100 | 4. On the **Main Account** tab, locate the **Account** heading and the **Help** icon, identified by a question mark. 101 | 102 |
103 | ![Flare Portal Account Help](wrapping-portal-help.png){ loading=lazy .allow-zoom width=500px } 104 |
Flare Portal Account Help.
105 |
106 | 107 | 5. Click the **Help** icon and click **How do I add Wrapped Flare token to my wallet?**. 108 | A **Click here** link for adding `$WFLR` to your wallet is displayed. 109 | 110 |
111 | ![Flare Portal Wrapping Help](wrapping-portal-faq-add-wrapped.png){ loading=lazy .allow-zoom width=500px } 112 |
Flare Portal Wrapping Help.
113 |
114 | 115 | 6. Click **Click here**. 116 | Your wallet opens. Wallets typically ask you to accept the token. The exact instructions depend on your wallet. 117 | 118 | 7. Follow the prompts in your wallet to add the wrapped token. 119 | 120 | Your wrapped token balance is displayed in your wallet. 121 | 122 | ### Manually 123 | 124 | !!! example "This section is for advanced users." 125 | 126 | If the automatic method did not work for you, most wallets can still be configured to recognize ERC-20 tokens through an **Import tokens** or **Add custom asset** menu, for example. 127 | 128 | The exact instructions depend on your wallet, but they generally just require you to locate the aforementioned menu and provide the address of the `WNat` contract. 129 | The wallet can usually then retrieve the token name, symbol, and number of decimals directly from the contract. 130 | -------------------------------------------------------------------------------- /include/openapi.md: -------------------------------------------------------------------------------- 1 | {% macro embed(api_filename) %} 2 | 3 | 4 | {% endmacro %} -------------------------------------------------------------------------------- /include/wallet-warning.md: -------------------------------------------------------------------------------- 1 | !!! warning "Caution" 2 | When you connect your wallet to a dapp such as the [Flare Portal](https://portal.flare.network/), always double-check that the address shown in the dapp is the one you intend. 3 | 4 | See the Caution box at the bottom of the [Wallets](/user/wallets/#unconnected_account) page for more information. 5 | -------------------------------------------------------------------------------- /readme/add-to-github.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/add-to-github.jpeg -------------------------------------------------------------------------------- /readme/add-to-gitlab.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/add-to-gitlab.jpeg -------------------------------------------------------------------------------- /readme/click-add-key.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/click-add-key.jpeg -------------------------------------------------------------------------------- /readme/click-preference.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/click-preference.jpeg -------------------------------------------------------------------------------- /readme/click-ssh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/click-ssh.jpg -------------------------------------------------------------------------------- /readme/docker-desktop-container-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/docker-desktop-container-details.png -------------------------------------------------------------------------------- /readme/docker-desktop-open-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/docker-desktop-open-container.png -------------------------------------------------------------------------------- /readme/docker-desktop-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/docker-desktop-start.png -------------------------------------------------------------------------------- /readme/docker-desktop-stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flare-foundation/docs/c89674dbcd4d212c98c5ff3183c4102c3b5c8aca/readme/docker-desktop-stop.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs==1.5.3 2 | mkdocs-material==9.5.13 3 | mkdocs-material-extensions==1.3.0 4 | mkdocs-git-revision-date-plugin==0.3.2 5 | mkdocs-autolinks-plugin==0.7.1 6 | mkdocs-redirects==1.2.1 7 | mkdocs-macros-plugin==1.0.4 8 | mkdocs-swagger-ui-tag==0.6.8 9 | jinja2==3.1.2 10 | setuptools==68.2.2 -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | 3.8 --------------------------------------------------------------------------------