Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,33 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:@docusaurus/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint", "prettier"],
plugins: ["@typescript-eslint"],
rules: {
"prettier/prettier": [2],
"prettier/prettier": "error",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/consistent-type-imports": [
"warn",
{ prefer: "type-imports" },
],
},
overrides: [
{
files: [
"*.config.js",
"*.config.ts",
"docusaurus.config.*",
"sidebars.*",
],
env: { node: true },
rules: { "@typescript-eslint/no-var-requires": "off" },
},
],
};
12 changes: 8 additions & 4 deletions .github/workflows/check-external-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
check-external-links:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Restore lychee cache
Expand All @@ -24,16 +25,16 @@ jobs:
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
continue-on-error: true
with:
lycheeVersion: "latest"
args: |
--config lychee.toml
.
fail: true
docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on PR if broken links found
if: steps.lychee.outputs.exit_code != 0
if: ${{ always() && steps.lychee.outputs.exit_code != 0 }}
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Expand All @@ -47,3 +48,6 @@ jobs:
</details>
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fail if broken links found
if: ${{ steps.lychee.outputs.exit_code != 0 }}
run: exit 1
4 changes: 2 additions & 2 deletions docs/fassets/developer-guides/usdt0-fxrp-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Before starting, make sure you have:

## Required Addresses on Flare Mainnet

- V3 SwapRouter (SparkDEX): [0x8a1E35F5c98C4E85B36B7B253222eE17773b2781](https://flarescan.com/address/0x8a1E35F5c98C4E85B36B7B253222eE17773b2781/contract/14/code).
- USDT0: [0xe7cd86e13AC4309349F30B3435a9d337750fC82D](https://flarescan.com/address/0xe7cd86e13AC4309349F30B3435a9d337750fC82D).
- V3 SwapRouter (SparkDEX): [0x8a1E35F5c98C4E85B36B7B253222eE17773b2781](https://flare-explorer.flare.network/address/0x8a1E35F5c98C4E85B36B7B253222eE17773b2781?tab=contract).
- USDT0: [0xe7cd86e13AC4309349F30B3435a9d337750fC82D](https://flare-explorer.flare.network/address/0xe7cd86e13AC4309349F30B3435a9d337750fC82D).
- FXRP: [resolved dynamically from the Asset Manager](/fassets/developer-guides/fassets-fxrp-address).

## Solidity Uniswap V3 Wrapper Contract
Expand Down
2 changes: 1 addition & 1 deletion docs/run-node/2-from-source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Make sure to check the [hardware requirements](/run-node/system-requirements) be
- [git](https://git-scm.com/install/)
- [GCC](https://gcc.gnu.org/install/)
- [jq](https://stedolan.github.io/jq/download/)
- [rsync](https://rsync.samba.org/download.html)
- [rsync](https://github.com/RsyncProject/rsync)
- [cURL](https://curl.se/download.html)
- [Ubuntu](https://ubuntu.com) (`>=24.10`)

Expand Down
2 changes: 1 addition & 1 deletion docs/support/terminology.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ A consensus mechanism in which token holders vote for validators to secure the n

Enshrining involves incorporating essential middleware components directly into the core protocol of a blockchain network. For a component to be considered enshrined, it **must** require a network hard-fork to be altered (refer to Vitalik's article on [enshrinement](https://vitalik.eth.limo/general/2023/09/30/enshrinement.html)).

Enshrining can be seen as a stronger form of restaking, a concept popularized by protocols like [EigenLayer](https://docs.eigencloud.xyz/eigenlayer/concepts/eigenlayer-overview). Unlike restaking, where only a fraction of the network stake is used to secure middleware, enshrining leverages the entire network stake.
Enshrining can be seen as a stronger form of restaking, a concept popularized by protocols like [EigenLayer](https://docs.eigencloud.xyz). Unlike restaking, where only a fraction of the network stake is used to secure middleware, enshrining leverages the entire network stake.

An enshrined oracle is an oracle that is integrated into the core protocol of a blockchain network. These oracles inherit the full security of the network, meaning that compromising the safety or liveness of the oracle would necessitate compromising the entire network.

Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ const config: Config = {
indexDocs: true,
indexPages: true,
indexBlog: false,
hashed: true,
docsRouteBasePath: "/",
},
],
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/GaslessApp.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from "react";
import { ethers, Eip1193Provider } from "ethers";
import { ethers, type Eip1193Provider } from "ethers";
import USD0Abi from "./USD0.json";
import Heading from "@theme/Heading";

Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/PriceVerification.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, web3, run } from "hardhat";
import {
import type {
PriceVerifierCustomFeedInstance,
IRelayInstance,
} from "../../typechain-types";
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/api3Example.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, run, web3 } from "hardhat";
import { PriceGuesserInstance } from "../../typechain-types";
import type { PriceGuesserInstance } from "../../typechain-types";

// --- Configuration ---
const PriceGuesser: PriceGuesserInstance = artifacts.require("PriceGuesser");
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/bandExample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, network, run, web3 } from "hardhat";
import { PriceTriggeredSafeInstance } from "../../typechain-types";
import type { PriceTriggeredSafeInstance } from "../../typechain-types";

// --- Configuration ---
const PriceTriggeredSafe: PriceTriggeredSafeInstance =
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/chainlinkExample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, run, web3 } from "hardhat";
import { AssetVaultInstance } from "../../typechain-types";
import type { AssetVaultInstance } from "../../typechain-types";

// --- Configuration ---
const AssetVault: AssetVaultInstance = artifacts.require("AssetVault");
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/chronicleExample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, run, web3 } from "hardhat";
import { DynamicNftMinterInstance } from "../../typechain-types";
import type { DynamicNftMinterInstance } from "../../typechain-types";

// --- Configuration ---
const DynamicNftMinter: DynamicNftMinterInstance =
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/deployFTSOConsumer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ethers, run } from "hardhat";
import { FtsoV2ConsumerContract } from "../typechain-types";
import type { FtsoV2ConsumerContract } from "../typechain-types";

const FtsoV2Consumer = artifacts.require("FtsoV2Consumer");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// 1. install xrpl package
// https://www.npmjs.com/package/xrpl
import { Client, Wallet, xrpToDrops, Payment, TxResponse } from "xrpl";
import type { Payment, TxResponse } from "xrpl";
import { Client, Wallet, xrpToDrops } from "xrpl";

// 2. Define the constants
const AGENT_ADDRESS = "r4KgCNzn9ZuNjpf17DEHZnyyiqpuj599Wm"; // Agent underlying chain address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAssetManagerFXRP } from "../utils/fassets";
import { prepareAttestationRequestBase } from "../utils/fdc";
import { IAssetManagerInstance } from "../../typechain-types";
import type { IAssetManagerInstance } from "../../typechain-types";
import { logEvents } from "../../scripts/utils/core";

// yarn hardhat run scripts/fassets/executeMinting.ts --network coston2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAssetManagerFXRP } from "../utils/fassets";
import { IAssetManagerInstance } from "../../typechain-types";
import type { IAssetManagerInstance } from "../../typechain-types";
import { logEvents } from "../../scripts/utils/core";

// 1. Define constants
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAssetManagerFXRP } from "../utils/fassets";
import { IAssetManagerInstance } from "../../typechain-types";
import type { IAssetManagerInstance } from "../../typechain-types";
import { logEvents } from "../../scripts/utils/core";

// 1. Define constants
Expand Down
4 changes: 2 additions & 2 deletions examples/developer-hub-javascript/fassetsSwapAndRedeem.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// 1. Dependencies and constants
import { run } from "hardhat";

import { SwapAndRedeemInstance } from "../../typechain-types";
import { ERC20Instance } from "../../typechain-types/@openzeppelin/contracts/token/ERC20/ERC20";
import type { SwapAndRedeemInstance } from "../../typechain-types";
import type { ERC20Instance } from "../../typechain-types/@openzeppelin/contracts/token/ERC20/ERC20";

import { getAssetManagerFXRP } from "../utils/getters";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { agencyAddress } from "./config";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";

const MinTempAgency = artifacts.require("MinTempAgency");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { agencyAddress } from "./config";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";

const MinTempAgency = artifacts.require("MinTempAgency");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import hre, { run } from "hardhat";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";

const MinTempAgency = artifacts.require("MinTempAgency");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { agencyAddress } from "./config";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";

const MinTempAgency = artifacts.require("MinTempAgency");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { agencyAddress } from "./config";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";
import {
prepareAttestationRequestBase,
submitAttestationRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { agencyAddress } from "./config";
import { MinTempAgencyInstance } from "../../../typechain-types";
import type { MinTempAgencyInstance } from "../../../typechain-types";

const MinTempAgency = artifacts.require("MinTempAgency");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import hre from "hardhat";
import { ProofOfReservesInstance, IRelayInstance } from "../../typechain-types";
import type {
ProofOfReservesInstance,
IRelayInstance,
} from "../../typechain-types";
import {
prepareAttestationRequestBase,
getFdcHub,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from "chai";
import { ethers } from "hardhat";
import { FtsoV2Consumer } from "../typechain-types"; // Adjust the path based on your typechain output directory
import type { FtsoV2Consumer } from "../typechain-types"; // Adjust the path based on your typechain output directory

describe("FtsoV2Consumer", function () {
let ftsoV2Consumer: FtsoV2Consumer;
Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/pythExample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { artifacts, run } from "hardhat";
import { PythNftMinterInstance } from "../../typechain-types";
import type { PythNftMinterInstance } from "../../typechain-types";

// --- Configuration ---
const PythNftMinter: PythNftMinterInstance = artifacts.require("PythNftMinter");
Expand Down
4 changes: 2 additions & 2 deletions examples/developer-hub-javascript/uniswapV3Wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ethers, run } from "hardhat";
import { web3 } from "hardhat";

import { UniswapV3WrapperInstance } from "../../typechain-types";
import type { UniswapV3WrapperInstance } from "../../typechain-types";
import { getAssetManagerFXRP } from "../utils/getters";
import { ERC20Instance } from "../../typechain-types/@openzeppelin/contracts/token/ERC20/ERC20";
import type { ERC20Instance } from "../../typechain-types/@openzeppelin/contracts/token/ERC20/ERC20";

// yarn hardhat run scripts/fassets/uniswapV3Wrapper.ts --network flare

Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/wnat-deposit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ethers } from "hardhat";
import { IWNatInstance } from "typechain-types/@flarenetwork/flare-periphery-contracts/coston/IWNat";
import type { IWNatInstance } from "typechain-types/@flarenetwork/flare-periphery-contracts/coston/IWNat";

const WNAT_ADDRESS = "0x767b25A658E8FC8ab6eBbd52043495dB61b4ea91";

Expand Down
2 changes: 1 addition & 1 deletion examples/developer-hub-javascript/wnat-withdraw.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ethers } from "hardhat";
import { IWNatInstance } from "../../typechain-types/@flarenetwork/flare-periphery-contracts/coston/IWNat";
import type { IWNatInstance } from "../../typechain-types/@flarenetwork/flare-periphery-contracts/coston/IWNat";

const WNAT_ADDRESS = "0x767b25A658E8FC8ab6eBbd52043495dB61b4ea91";

Expand Down
35 changes: 22 additions & 13 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
base_url = "https://dev.flare.network/"
verbose = "info"
cache = true
accept = ["200", "429", "403"]
no_progress = true
cache = true
max_cache_age = "2d"
cache_exclude_status = "403, 429, 500.."
timeout = 20
retry_wait_time = 2
max_retries = 2
max_concurrency = 8
accept = ["200..=399", "429"]
exclude_all_private = true
exclude = [
'^/',
'https://dev\.flare\.network/',
'https?://localhost(?::[0-9]+)?/',
'https://fdc-verifiers-testnet\.flare\.network/',
'https://github\.com/flare-foundation/flare-hardhat-starter/',
'https://github\.com/flare-foundation/flare-foundry-starter/',
'https://sepolia\.etherscan\.io/',
'https://metamask\.io/',
'https://openweathermap\.org/',
'https://www\.gnu\.org/',
'https://swapi\.dev/',
'^https://dev\.flare\.network/',
'^https://fdc-verifiers-testnet\.flare\.network/',
'^https://github\.com/flare-foundation/flare-hardhat-starter/',
'^https://github\.com/flare-foundation/flare-foundry-starter/',
'^https://sepolia\.etherscan\.io/',
'^https://metamask\.io/',
'^https://openweathermap\.org/',
'^https://www\.gnu\.org/',
'^https://swapi\.dev/',
'^https://www\.npmjs\.com/',
'^https://discord\.com/',
'^https://docs\.eigencloud\.xyz/',
'^https://coston2\.testnet\.flarescan\.com/',
]
Loading