diff --git a/README.md b/README.md index cea5f277..661ed50c 100644 --- a/README.md +++ b/README.md @@ -91,9 +91,22 @@ To generate the Solidity contract documentation from the `flare-smart-contracts- To ensure [uv](https://docs.astral.sh/uv/) dependencies are synced, from within `automations/` run: ```bash +cd automations uv sync ``` +To update feed IDs: + +```bash +uv run feed_table_generator.py +``` + +To update contract addresses using the Contract Registry: + +```bash +uv run solidity_reference_table_generator.py +``` + To update contract addresses and FTSOv2 feed data, in the project root run: ```bash diff --git a/automations/feed_table_generator.py b/automations/feed_table_generator.py index e440e117..66f11fbf 100644 --- a/automations/feed_table_generator.py +++ b/automations/feed_table_generator.py @@ -172,7 +172,7 @@ def generate_feed_data( anchor_risk = read_data_from_file(ANCHOR_RISK_PATH) anchor_data = generate_feed_data(feed_names, anchor_risk, decimals, coins_list) write_data_to_file(ANCHOR_FEEDS_PATH, anchor_data) - + logging.info( "Feed Table automation: Data successfully saved to %s and %s", BLOCK_LATENCY_FEEDS_PATH, diff --git a/automations/reference_table_generator.py b/automations/reference_table_generator.py deleted file mode 100644 index 12d63b13..00000000 --- a/automations/reference_table_generator.py +++ /dev/null @@ -1,78 +0,0 @@ -import json -import logging -import sys -from pathlib import Path -from web3 import Web3 - -logging.basicConfig(level=logging.INFO) - -networks = { - "Flare Mainnet": { - "rpc_url": "https://flare-api.flare.network/ext/C/rpc", - "contract_address": "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" - }, - "Flare Testnet Coston2": { - "rpc_url": "https://coston2-api.flare.network/ext/C/rpc", - "contract_address": "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" - }, - "Songbird Canary Network": { - "rpc_url": "https://songbird-api.flare.network/ext/C/rpc", - "contract_address": "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" - }, - "Songbird Testnet Coston": { - "rpc_url": "https://coston-api.flare.network/ext/C/rpc", - "contract_address": "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" - } - -} - -network_data = {} - -contract_abi = [ - { - "inputs": [], - "name": "getAllContracts", - "outputs": [ - { - "internalType": "string[]", - "name": "", - "type": "string[]" - }, - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - } -] - -for network_name, config in networks.items(): - logging.info(f"Connecting to {network_name}...") - web3 = Web3(Web3.HTTPProvider(config["rpc_url"])) - - if not web3.is_connected(): - logging.error(f"Could not connect to the {network_name}") - continue - - contract = web3.eth.contract(address=config["contract_address"], abi=contract_abi) - - try: - result = contract.functions.getAllContracts().call() - contract_names = result[0] - contract_addresses = result[1] - - network_data[network_name] = [] - for name, address in zip(contract_names, contract_addresses): - network_data[network_name].append({'Contract Name': name, 'Address': address}) - - except Exception as e: - logging.error(f"An error occurred while fetching data from {network_name}: {e}") - -output_file = Path("contract_data.json") -with output_file.open('w') as f: - json.dump(network_data, f, indent=4) - -logging.info(f"Data successfully saved to {output_file}") diff --git a/automations/solidity_reference.json b/automations/solidity_reference.json index 01ac0921..8f4788dc 100644 --- a/automations/solidity_reference.json +++ b/automations/solidity_reference.json @@ -34,15 +34,15 @@ }, { "name": "InflationAllocation", - "address": "0x260371e0CF561887C6Da270CC3Be84C2FaB5444f" + "address": "0xe3b151a43b86c6b146a7dB0CdE22AbD8Beb01E2b" }, { "name": "Inflation", - "address": "0xEfd7a680Db05F1dCD86EB5a074897F502C8601A0" + "address": "0x4d92ba6D90DF99f7F25dc5B53b1697957e02A02c" }, { "name": "Supply", - "address": "0x8577D2D50827bCE2EC1dc9Cf9F1199826781D5AF" + "address": "0x58c8235cd77152ff21E5fA90a9390a84d435F717" }, { "name": "FtsoRewardManager", @@ -94,7 +94,7 @@ }, { "name": "PollingFoundation", - "address": "0x258E20bdbb2d891521308d2af381B1BD962B67B5" + "address": "0xc8294a2335C6c45de827121090ce4Ba9977907D2" }, { "name": "FlareAssetRegistry", @@ -118,7 +118,7 @@ }, { "name": "PollingFtso", - "address": "0x461c4219d5fcAF0fEA304F57a4b0f8061f08064A" + "address": "0xbB907038933d0711e9018C9DC31121C146F2A5a0" }, { "name": "AddressBinder", @@ -268,15 +268,15 @@ }, { "name": "InflationAllocation", - "address": "0xfa1903401A0cf7048A94C63D5dc5B4f36ff7b176" + "address": "0xfe903A4C4F4ffD0fdaa1A3bbC123Cbd70A242D74" }, { "name": "Inflation", - "address": "0x98B8e9B5830F04Fe3b8d56A2f8455E337037ba28" + "address": "0xC738FdCDE9cd2FBd72618d36ed71008b8d001ba4" }, { "name": "Supply", - "address": "0x0496dcb45cDf498e3b797050f0469a0DE24F02e9" + "address": "0xdd1e652D6318c4Bceb7028851C5435a89C2A17fb" }, { "name": "FtsoRewardManager", @@ -465,6 +465,22 @@ { "name": "RewardsV2", "address": "0xB4f43E342c5c77e6fe060c0481Fe313Ff2503454" + }, + { + "name": "FdcHub", + "address": "0x48aC463d7975828989331F4De43341627b9c5f1D" + }, + { + "name": "FdcInflationConfigurations", + "address": "0x5C670a6950111D6f38B0D7cAdEB58D534fd9D209" + }, + { + "name": "FdcRequestFeeConfigurations", + "address": "0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e" + }, + { + "name": "FdcVerification", + "address": "0x075bf301fF07C4920e5261f93a0609640F53487D" } ], "SongbirdCanaryNetwork": [ @@ -482,7 +498,7 @@ }, { "name": "PriceSubmitter", - "address": "0x1000000000000000000000000000000000000003" + "address": "0x155513345E3fe9A0aa8B0BeF156b1576C39f0f3C" }, { "name": "InflationAllocation", @@ -498,15 +514,15 @@ }, { "name": "FtsoRewardManager", - "address": "0x13F7866568dC476cC3522d17C23C35FEDc1431C5" + "address": "0x1643299dBBb36E3E1AC26a7FeBC3F97382bDCfa5" }, { "name": "CleanupBlockNumberManager", - "address": "0x9EB1ec7BB48908B64F0E94bcF991cba719485F7c" + "address": "0x207425DA5ddb52C2fAd5333dCF4f2d95b0489a79" }, { "name": "VoterWhitelister", - "address": "0x6Ce15a3aDd04d1A4C575B6be19674D6bb11Ba614" + "address": "0xEfF0A449290763a95ee33a6A108F5B0b1Ea06bE9" }, { "name": "WNat", @@ -526,11 +542,11 @@ }, { "name": "FtsoManager", - "address": "0x7A6B15E17b7691ba687ad182bD12cb4a91D533ae" + "address": "0xf4c4B9334F794076A7E7F5Da50da3990Ac8236c9" }, { "name": "PollingFoundation", - "address": "0x725cd5E69388515029BCBF9F8aE2cc47f397CD64" + "address": "0x79Df47237292Dbd1477502CFF3F61cD535B0FAce" }, { "name": "FlareContractRegistry", @@ -538,7 +554,7 @@ }, { "name": "PollingFtso", - "address": "0x790525B93Fa4BFd3A586b68C5F41c113645f8AF6" + "address": "0x6A4707d6ac8a029705f17B1653AFC3c2D9933E1e" }, { "name": "ClaimSetupManager", @@ -627,6 +643,22 @@ { "name": "RewardsV2", "address": "0xE26AD68b17224951b5740F33926Cc438764eB9a7" + }, + { + "name": "FdcHub", + "address": "0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06" + }, + { + "name": "FdcInflationConfigurations", + "address": "0x2766f9927748Ef59aeC95B4777CcF29a77d35191" + }, + { + "name": "FdcRequestFeeConfigurations", + "address": "0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C" + }, + { + "name": "FdcVerification", + "address": "0xd283afC5A67E2d4Bc700b5B640328Bda22450621" } ], "SongbirdTestnetCoston": [ @@ -644,7 +676,7 @@ }, { "name": "PriceSubmitter", - "address": "0x1000000000000000000000000000000000000003" + "address": "0x2ADC05f9c85149274266fFeD348C705622858820" }, { "name": "InflationAllocation", @@ -660,15 +692,15 @@ }, { "name": "FtsoRewardManager", - "address": "0xfD36176C63dA52E783a347DE3544B0b44C7054a6" + "address": "0x332b2B083f20504588Dd0624D6fd14379b692FAb" }, { "name": "CleanupBlockNumberManager", - "address": "0xB50DAcdaA3Af02F8A0533902C117ADFC31A31Ccf" + "address": "0xC03A9C0D30e272d44334ab732B281125290c9f3a" }, { "name": "VoterWhitelister", - "address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95" + "address": "0x6b9d022224c11446Ad7D373F5BaF6271200FdA1f" }, { "name": "WNat", @@ -688,7 +720,7 @@ }, { "name": "FtsoManager", - "address": "0x12B6E9dB4Ac9889aBb92beAA6CF7d71f334c1168" + "address": "0x9E10Ca7D1EA3c6f50071d20bde95608b93D2efe1" }, { "name": "PollingFoundation", @@ -788,7 +820,7 @@ }, { "name": "FdcVerification", - "address": "0xa6D12A8C224E82330b7fA4F7a1003E64cbF50D38" + "address": "0x57a2db68fb40f6C61342FF4beF283AE185eA8E51" }, { "name": "FtsoV2", diff --git a/automations/solidity_reference_table_generator.py b/automations/solidity_reference_table_generator.py index b7c21718..b01e2f1a 100644 --- a/automations/solidity_reference_table_generator.py +++ b/automations/solidity_reference_table_generator.py @@ -40,10 +40,8 @@ def get_solidity_reference( web3 = Web3(Web3.HTTPProvider(rpc_url)) if not web3.is_connected(): - logging.error( - "Could not connect to the %s with RPC: %s", network_name, rpc_url - ) - continue + msg = f"Could not connect to the {network_name} with RPC: {rpc_url}" + raise ConnectionError(msg) contract = web3.eth.contract( address=Web3.to_checksum_address(registry_address), abi=registry_abi diff --git a/docs/fassets/guides/mint-redeem-fassets.mdx b/docs/fassets/guides/mint-redeem-fassets.mdx index 32557e95..2a4a1477 100644 --- a/docs/fassets/guides/mint-redeem-fassets.mdx +++ b/docs/fassets/guides/mint-redeem-fassets.mdx @@ -71,8 +71,6 @@ The FAsset user operates with multiple keys for the Flare and underlying network - ::: - 2. Fund the user's Songbird Testnet Coston wallet with some CFLR to pay for gas. The user wallet's address is in the `secrets.json` file under the `user.native.address` key. You can get CFLR tokens from the [Coston Faucet](https://faucet.flare.network/coston). diff --git a/docs/fdc/1-overview.mdx b/docs/fdc/1-overview.mdx index 1b9dc52d..55f6d569 100644 --- a/docs/fdc/1-overview.mdx +++ b/docs/fdc/1-overview.mdx @@ -9,8 +9,7 @@ import useBaseUrl from "@docusaurus/useBaseUrl"; :::info -FDC is currently under development. -Get involved in alpha testing on Flare Testnet Coston2 by following the [FDC Guides](/category/fdc-guides). +FDC is currently in testing on Flare Testnet Coston2 prior to its launch on Flare Mainnet. ::: diff --git a/docs/fdc/3-attestation-types.mdx b/docs/fdc/3-attestation-types.mdx index 41fd82a7..6ad69847 100644 --- a/docs/fdc/3-attestation-types.mdx +++ b/docs/fdc/3-attestation-types.mdx @@ -3,7 +3,6 @@ title: Attestation Types description: Learn about different attestation types supported by FDC. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 3 -unlisted: true --- import DocCardList from "@theme/DocCardList"; diff --git a/docs/fdc/5-open-api.mdx b/docs/fdc/5-open-api.mdx deleted file mode 100644 index 848134b7..00000000 --- a/docs/fdc/5-open-api.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -slug: fdcopenapi -title: FDC Protocol Data Provider API -description: OpenAPI specification for FDC protocol data provider API -keywords: [Attestation Request, Attestation Providers, Voting Round] -unlisted: true ---- - -import useBaseUrl from "@docusaurus/useBaseUrl"; -import SwaggerUI from "swagger-ui-react"; -import "swagger-ui-react/swagger-ui.css"; - -export default function () { - return ; -} - - diff --git a/docs/fdc/5-reference.mdx b/docs/fdc/5-reference.mdx index edc204e8..a0271430 100644 --- a/docs/fdc/5-reference.mdx +++ b/docs/fdc/5-reference.mdx @@ -10,7 +10,6 @@ keywords: flare-network, smart-contracts, ] -unlisted: true --- import Tabs from "@theme/Tabs"; diff --git a/docs/fdc/attestation-types/address-validity.mdx b/docs/fdc/attestation-types/address-validity.mdx index 1957b62d..02194915 100644 --- a/docs/fdc/attestation-types/address-validity.mdx +++ b/docs/fdc/attestation-types/address-validity.mdx @@ -3,7 +3,6 @@ title: AddressValidity description: Assertion whether a given string represents a valid address on an external blockchain. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 1 -unlisted: true --- import Addresses from "./_addresses.mdx"; diff --git a/docs/fdc/attestation-types/balance-decreasing-transaction.mdx b/docs/fdc/attestation-types/balance-decreasing-transaction.mdx index 1ffd4668..ae1b17e1 100644 --- a/docs/fdc/attestation-types/balance-decreasing-transaction.mdx +++ b/docs/fdc/attestation-types/balance-decreasing-transaction.mdx @@ -3,7 +3,6 @@ title: BalanceDecreasingTransaction description: Detects a transaction that either decreases the balance of a specified address. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 2 -unlisted: true --- import Finality from "./_finality.mdx"; diff --git a/docs/fdc/attestation-types/confirmed-block-height-exists.mdx b/docs/fdc/attestation-types/confirmed-block-height-exists.mdx index 7f8efd22..760df68e 100644 --- a/docs/fdc/attestation-types/confirmed-block-height-exists.mdx +++ b/docs/fdc/attestation-types/confirmed-block-height-exists.mdx @@ -3,7 +3,6 @@ title: ConfirmedBlockHeightExists description: Assertion whether a specified block number is confirmed. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 3 -unlisted: true --- import Finality from "./_finality.mdx"; diff --git a/docs/fdc/attestation-types/evm-transaction.mdx b/docs/fdc/attestation-types/evm-transaction.mdx index acaba0f5..c9ef3539 100644 --- a/docs/fdc/attestation-types/evm-transaction.mdx +++ b/docs/fdc/attestation-types/evm-transaction.mdx @@ -3,7 +3,6 @@ title: EVMTransaction description: Information about an EVM transaction, including details on associated events if specified. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 4 -unlisted: true --- import IEVMTransaction from "../reference/IEVMTransaction.mdx"; diff --git a/docs/fdc/attestation-types/payment.mdx b/docs/fdc/attestation-types/payment.mdx index f0551cfb..1f10fe4c 100644 --- a/docs/fdc/attestation-types/payment.mdx +++ b/docs/fdc/attestation-types/payment.mdx @@ -3,7 +3,6 @@ title: Payment description: Information about a transaction on an external chain that is classified as a native currency payment. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 5 -unlisted: true --- import StandardAddressHash from "./_standard_address_hash.mdx"; diff --git a/docs/fdc/attestation-types/referenced-payment-nonexistence.mdx b/docs/fdc/attestation-types/referenced-payment-nonexistence.mdx index bb1fb246..1eed1dc9 100644 --- a/docs/fdc/attestation-types/referenced-payment-nonexistence.mdx +++ b/docs/fdc/attestation-types/referenced-payment-nonexistence.mdx @@ -3,7 +3,6 @@ title: ReferencedPaymentNonexistence description: Assertion that a payment agreed to be completed by a certain deadline, has not been made. keywords: [fdc, oracle, flare-data-connector, flare-network] sidebar_position: 5 -unlisted: true --- import StandardPaymentReference from "./_standard_payment_reference.mdx"; diff --git a/docs/fdc/reference/IAddressValidity.mdx b/docs/fdc/reference/IAddressValidity.mdx index dda1a970..f5943568 100644 --- a/docs/fdc/reference/IAddressValidity.mdx +++ b/docs/fdc/reference/IAddressValidity.mdx @@ -2,7 +2,6 @@ title: IAddressValidity sidebar_position: 6 description: Assert whether a string represents a valid address. -unlisted: true --- Sourced from `IAddressValidity.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IAddressValidity.sol). diff --git a/docs/fdc/reference/IBalanceDecreasingTransaction.mdx b/docs/fdc/reference/IBalanceDecreasingTransaction.mdx index ae3d7151..033ed6f9 100644 --- a/docs/fdc/reference/IBalanceDecreasingTransaction.mdx +++ b/docs/fdc/reference/IBalanceDecreasingTransaction.mdx @@ -2,7 +2,6 @@ title: IBalanceDecreasingTransaction sidebar_position: 7 description: Detect a transaction that decreases an address balance. -unlisted: true --- Sourced from `IBalanceDecreasingTransaction.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IBalanceDecreasingTransaction.sol). diff --git a/docs/fdc/reference/IConfirmedBlockHeightExists.mdx b/docs/fdc/reference/IConfirmedBlockHeightExists.mdx index fb8edf45..f62ee815 100644 --- a/docs/fdc/reference/IConfirmedBlockHeightExists.mdx +++ b/docs/fdc/reference/IConfirmedBlockHeightExists.mdx @@ -2,7 +2,6 @@ title: IConfirmedBlockHeightExists sidebar_position: 8 description: Assert that a block number is confirmed. -unlisted: true --- Sourced from `IConfirmedBlockHeightExists.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IConfirmedBlockHeightExists.sol). diff --git a/docs/fdc/reference/IEVMTransaction.mdx b/docs/fdc/reference/IEVMTransaction.mdx index 56728c39..0e15c13c 100644 --- a/docs/fdc/reference/IEVMTransaction.mdx +++ b/docs/fdc/reference/IEVMTransaction.mdx @@ -2,7 +2,6 @@ title: IEVMTransaction sidebar_position: 9 description: Relay a transaction from an EVM chain. -unlisted: true --- Sourced from `IEVMTransaction.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IEVMTransaction.sol). diff --git a/docs/fdc/reference/IFdcHub.md b/docs/fdc/reference/IFdcHub.md index 6c0a52c4..f72b7ec5 100644 --- a/docs/fdc/reference/IFdcHub.md +++ b/docs/fdc/reference/IFdcHub.md @@ -2,7 +2,6 @@ title: IFdcHub sidebar_position: 2 description: Primary interface for interacting with FDC. -unlisted: true --- Primary interface for interacting with FDC. diff --git a/docs/fdc/reference/IFdcInflationConfigurations.md b/docs/fdc/reference/IFdcInflationConfigurations.md index 207be1ab..84f6658e 100644 --- a/docs/fdc/reference/IFdcInflationConfigurations.md +++ b/docs/fdc/reference/IFdcInflationConfigurations.md @@ -2,7 +2,6 @@ title: IFdcInflationConfigurations sidebar_position: 5 description: Interface for managing FDC inflation configuration. -unlisted: true --- Interface for managing FDC inflation configuration. diff --git a/docs/fdc/reference/IFdcRequestFeeConfigurations.md b/docs/fdc/reference/IFdcRequestFeeConfigurations.md index 2c9d27a7..4d578e52 100644 --- a/docs/fdc/reference/IFdcRequestFeeConfigurations.md +++ b/docs/fdc/reference/IFdcRequestFeeConfigurations.md @@ -2,7 +2,6 @@ title: IFdcRequestFeeConfigurations sidebar_position: 4 description: Interface for managing FDC request fee configuration. -unlisted: true --- Interface for managing FDC request fee configuration. diff --git a/docs/fdc/reference/IFdcVerification.md b/docs/fdc/reference/IFdcVerification.md index 15142963..fbf6b876 100644 --- a/docs/fdc/reference/IFdcVerification.md +++ b/docs/fdc/reference/IFdcVerification.md @@ -2,7 +2,6 @@ title: IFdcVerification sidebar_position: 3 description: Interface for verifying FDC requests. -unlisted: true --- Interface for verifying FDC requests. diff --git a/docs/fdc/reference/IPayment.mdx b/docs/fdc/reference/IPayment.mdx index 993e5031..9452e851 100644 --- a/docs/fdc/reference/IPayment.mdx +++ b/docs/fdc/reference/IPayment.mdx @@ -2,7 +2,6 @@ title: IPayment sidebar_position: 10 description: Relay a transaction in native currency. -unlisted: true --- Sourced from `IPayment.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IPayment.sol). diff --git a/docs/fdc/reference/IReferencedPaymentNonexistence.mdx b/docs/fdc/reference/IReferencedPaymentNonexistence.mdx index 86f861b2..8a02e06f 100644 --- a/docs/fdc/reference/IReferencedPaymentNonexistence.mdx +++ b/docs/fdc/reference/IReferencedPaymentNonexistence.mdx @@ -2,7 +2,6 @@ title: IReferencedPaymentNonexistence sidebar_position: 11 description: Assert whether an agreed-upon payment has not been made. -unlisted: true --- Sourced from `IReferencedPaymentNonexistence.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/fdc/IReferencedPaymentNonexistence.sol). diff --git a/docs/fdc/reference/data-availability-api.mdx b/docs/fdc/reference/data-availability-api.mdx index 744f8f55..acd3bbb0 100644 --- a/docs/fdc/reference/data-availability-api.mdx +++ b/docs/fdc/reference/data-availability-api.mdx @@ -2,7 +2,6 @@ sidebar_label: Data Availability API hide_title: true description: OpenAPI specification for Data Availability API. -unlisted: true sidebar_position: 1 --- diff --git a/sidebars.ts b/sidebars.ts index 73c9f2bf..6635460d 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -158,12 +158,6 @@ const sidebars: SidebarsConfig = { link: { type: "doc", id: "fdc/reference" }, items: [{ type: "autogenerated", dirName: "fdc/reference" }], }, - { - type: "category", - label: "FDC API Docs", - link: { type: "doc", id: "fdc/open-api" }, - items: [], - }, ], }, {