Skip to content

Commit

Permalink
feat: add fdc documentation (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
dineshpinto authored Dec 7, 2024
2 parents e6fa1bc + 6487fae commit 8f8bf25
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 150 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion automations/feed_table_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
78 changes: 0 additions & 78 deletions automations/reference_table_generator.py

This file was deleted.

74 changes: 53 additions & 21 deletions automations/solidity_reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
},
{
"name": "InflationAllocation",
"address": "0x260371e0CF561887C6Da270CC3Be84C2FaB5444f"
"address": "0xe3b151a43b86c6b146a7dB0CdE22AbD8Beb01E2b"
},
{
"name": "Inflation",
"address": "0xEfd7a680Db05F1dCD86EB5a074897F502C8601A0"
"address": "0x4d92ba6D90DF99f7F25dc5B53b1697957e02A02c"
},
{
"name": "Supply",
"address": "0x8577D2D50827bCE2EC1dc9Cf9F1199826781D5AF"
"address": "0x58c8235cd77152ff21E5fA90a9390a84d435F717"
},
{
"name": "FtsoRewardManager",
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"name": "PollingFoundation",
"address": "0x258E20bdbb2d891521308d2af381B1BD962B67B5"
"address": "0xc8294a2335C6c45de827121090ce4Ba9977907D2"
},
{
"name": "FlareAssetRegistry",
Expand All @@ -118,7 +118,7 @@
},
{
"name": "PollingFtso",
"address": "0x461c4219d5fcAF0fEA304F57a4b0f8061f08064A"
"address": "0xbB907038933d0711e9018C9DC31121C146F2A5a0"
},
{
"name": "AddressBinder",
Expand Down Expand Up @@ -268,15 +268,15 @@
},
{
"name": "InflationAllocation",
"address": "0xfa1903401A0cf7048A94C63D5dc5B4f36ff7b176"
"address": "0xfe903A4C4F4ffD0fdaa1A3bbC123Cbd70A242D74"
},
{
"name": "Inflation",
"address": "0x98B8e9B5830F04Fe3b8d56A2f8455E337037ba28"
"address": "0xC738FdCDE9cd2FBd72618d36ed71008b8d001ba4"
},
{
"name": "Supply",
"address": "0x0496dcb45cDf498e3b797050f0469a0DE24F02e9"
"address": "0xdd1e652D6318c4Bceb7028851C5435a89C2A17fb"
},
{
"name": "FtsoRewardManager",
Expand Down Expand Up @@ -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": [
Expand All @@ -482,7 +498,7 @@
},
{
"name": "PriceSubmitter",
"address": "0x1000000000000000000000000000000000000003"
"address": "0x155513345E3fe9A0aa8B0BeF156b1576C39f0f3C"
},
{
"name": "InflationAllocation",
Expand All @@ -498,15 +514,15 @@
},
{
"name": "FtsoRewardManager",
"address": "0x13F7866568dC476cC3522d17C23C35FEDc1431C5"
"address": "0x1643299dBBb36E3E1AC26a7FeBC3F97382bDCfa5"
},
{
"name": "CleanupBlockNumberManager",
"address": "0x9EB1ec7BB48908B64F0E94bcF991cba719485F7c"
"address": "0x207425DA5ddb52C2fAd5333dCF4f2d95b0489a79"
},
{
"name": "VoterWhitelister",
"address": "0x6Ce15a3aDd04d1A4C575B6be19674D6bb11Ba614"
"address": "0xEfF0A449290763a95ee33a6A108F5B0b1Ea06bE9"
},
{
"name": "WNat",
Expand All @@ -526,19 +542,19 @@
},
{
"name": "FtsoManager",
"address": "0x7A6B15E17b7691ba687ad182bD12cb4a91D533ae"
"address": "0xf4c4B9334F794076A7E7F5Da50da3990Ac8236c9"
},
{
"name": "PollingFoundation",
"address": "0x725cd5E69388515029BCBF9F8aE2cc47f397CD64"
"address": "0x79Df47237292Dbd1477502CFF3F61cD535B0FAce"
},
{
"name": "FlareContractRegistry",
"address": "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019"
},
{
"name": "PollingFtso",
"address": "0x790525B93Fa4BFd3A586b68C5F41c113645f8AF6"
"address": "0x6A4707d6ac8a029705f17B1653AFC3c2D9933E1e"
},
{
"name": "ClaimSetupManager",
Expand Down Expand Up @@ -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": [
Expand All @@ -644,7 +676,7 @@
},
{
"name": "PriceSubmitter",
"address": "0x1000000000000000000000000000000000000003"
"address": "0x2ADC05f9c85149274266fFeD348C705622858820"
},
{
"name": "InflationAllocation",
Expand All @@ -660,15 +692,15 @@
},
{
"name": "FtsoRewardManager",
"address": "0xfD36176C63dA52E783a347DE3544B0b44C7054a6"
"address": "0x332b2B083f20504588Dd0624D6fd14379b692FAb"
},
{
"name": "CleanupBlockNumberManager",
"address": "0xB50DAcdaA3Af02F8A0533902C117ADFC31A31Ccf"
"address": "0xC03A9C0D30e272d44334ab732B281125290c9f3a"
},
{
"name": "VoterWhitelister",
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95"
"address": "0x6b9d022224c11446Ad7D373F5BaF6271200FdA1f"
},
{
"name": "WNat",
Expand All @@ -688,7 +720,7 @@
},
{
"name": "FtsoManager",
"address": "0x12B6E9dB4Ac9889aBb92beAA6CF7d71f334c1168"
"address": "0x9E10Ca7D1EA3c6f50071d20bde95608b93D2efe1"
},
{
"name": "PollingFoundation",
Expand Down Expand Up @@ -788,7 +820,7 @@
},
{
"name": "FdcVerification",
"address": "0xa6D12A8C224E82330b7fA4F7a1003E64cbF50D38"
"address": "0x57a2db68fb40f6C61342FF4beF283AE185eA8E51"
},
{
"name": "FtsoV2",
Expand Down
6 changes: 2 additions & 4 deletions automations/solidity_reference_table_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/fassets/guides/mint-redeem-fassets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ The FAsset user operates with multiple keys for the Flare and underlying network

<SecretsInfo />

:::

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).

Expand Down
3 changes: 1 addition & 2 deletions docs/fdc/1-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand Down
1 change: 0 additions & 1 deletion docs/fdc/3-attestation-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
17 changes: 0 additions & 17 deletions docs/fdc/5-open-api.mdx

This file was deleted.

1 change: 0 additions & 1 deletion docs/fdc/5-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ keywords:
flare-network,
smart-contracts,
]
unlisted: true
---

import Tabs from "@theme/Tabs";
Expand Down
1 change: 0 additions & 1 deletion docs/fdc/attestation-types/address-validity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading

0 comments on commit 8f8bf25

Please sign in to comment.