diff --git a/docs/1-intro.mdx b/docs/1-intro.mdx index b8df1c9e..a02e649a 100644 --- a/docs/1-intro.mdx +++ b/docs/1-intro.mdx @@ -17,13 +17,15 @@ keywords: import ThemedImage from "@theme/ThemedImage"; import useBaseUrl from "@docusaurus/useBaseUrl"; -**Flare is the blockchain for data**, providing developers and users with secure, decentralized access to high-integrity data from other chains and the internet. As an EVM-compatible Layer-1 blockchain, complete with enshrined data protocols, Flare offers a full-stack solution for building the next generation of secure, interoperable, and data-driven decentralized applications. +**Flare is the blockchain for data**, offering developers and users secure, decentralized access to high-integrity data from other chains and the internet. Flare's Layer-1 network uniquely supports enshrined data protocols at the network layer, making it the only EVM-compatible smart contract platform optimized for decentralized data acquisition, including price and time-series data, blockchain event and state data, and Web2 API data. + +By providing broad data access at scale and minimal cost, Flare delivers a full-stack solution for building the next generation of secure, interoperable, and data-driven decentralized applications. ## Getting started -- [Deploy your first smart contract](/network/getting-started) — Build and deploy your first on-chain Flare smart contract, using only your browser. +- [Deploy your first smart contract](/network/getting-started) — Build and deploy your first smart contract on Flare, using only your browser. -- [Learn how to use FTSOv2](./ftso/overview) — Leverage the latest upgrades to the Flare Time Series Oracle, with feeds now updating every ≈1.8 seconds. +- [Learn how to use FTSOv2](./ftso/overview) — Leverage the latest upgrades to the Flare Time Series Oracle (FTSO), with feeds now updating every ≈1.8 seconds. - Start building on Flare with programming languages you may already know @@ -34,9 +36,7 @@ import useBaseUrl from "@docusaurus/useBaseUrl"; ## Understand the architecture -Build a strong understanding of the core concepts that set Flare apart from other blockchains: - -- Flare's data protocols, [Flare Time Series Oracle (FTSO)](./ftso/overview) and [Flare Data Connector (FDC)](./fdc/overview), are enshrined into the core protocol of Flare, and inherit the economic security of the entire network. +Build a strong understanding of the core concepts that set Flare apart from other blockchains. Flare's data protocols, [Flare Time Series Oracle (FTSO)](./ftso/overview) and [Flare Data Connector (FDC)](./fdc/overview), are enshrined into the core protocol of Flare, and inherit the economic security of the entire network. **Understand the mechanism behind Flare's Secure RNG.** diff --git a/examples/developer-hub-go/coston2/secure_random.go b/examples/developer-hub-go/coston2/secure_random.go index 7a7da434..274e9b51 100644 --- a/examples/developer-hub-go/coston2/secure_random.go +++ b/examples/developer-hub-go/coston2/secure_random.go @@ -12,6 +12,7 @@ import ( func SecureRandom() { // Relay address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/scaling/solidity-reference address := common.HexToAddress("0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250") rpcUrl := "https://rpc.ankr.com/flare_coston2" // Connect to an RPC node diff --git a/examples/developer-hub-go/coston2/volatility_incentive.go b/examples/developer-hub-go/coston2/volatility_incentive.go index 4b37609b..6aab1c3e 100644 --- a/examples/developer-hub-go/coston2/volatility_incentive.go +++ b/examples/developer-hub-go/coston2/volatility_incentive.go @@ -18,6 +18,7 @@ func MakeVolatilityIncentive() { // Get private key from environment privateKey, _ := crypto.HexToECDSA(os.Getenv("ACCOUNT_PRIVATE_KEY")[2:]) // FastUpdatesIncentiveManager address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/solidity-reference incentiveAddress := common.HexToAddress("0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c") // Connect to an RPC node client, _ := ethclient.Dial("https://rpc.ankr.com/flare_coston2") diff --git a/examples/developer-hub-go/ftsov2_config_coston2.go b/examples/developer-hub-go/ftsov2_config_coston2.go index 763fce94..5da65b75 100644 --- a/examples/developer-hub-go/ftsov2_config_coston2.go +++ b/examples/developer-hub-go/ftsov2_config_coston2.go @@ -12,6 +12,7 @@ import ( func FtsoV2Config() { // FastUpdatesConfiguration address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/solidity-reference address := common.HexToAddress("0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14") rpcUrl := "https://rpc.ankr.com/flare_coston2" // Connect to an RPC node diff --git a/examples/developer-hub-go/ftsov2_consumer_coston2.go b/examples/developer-hub-go/ftsov2_consumer_coston2.go index 6058b143..97eb1456 100644 --- a/examples/developer-hub-go/ftsov2_consumer_coston2.go +++ b/examples/developer-hub-go/ftsov2_consumer_coston2.go @@ -14,6 +14,7 @@ import ( func FtsoV2Consumer() { // FastUpdater address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/solidity-reference ftsoAddress := common.HexToAddress("0x58fb598EC6DB6901aA6F26a9A2087E9274128E59") rpcUrl := "https://rpc.ankr.com/flare_coston2" // Connect to an RPC node diff --git a/examples/developer-hub-go/main.go b/examples/developer-hub-go/main.go index bfd194a6..af2f8182 100644 --- a/examples/developer-hub-go/main.go +++ b/examples/developer-hub-go/main.go @@ -1,11 +1,15 @@ package main +// coston2 package ABIs //go:generate abigen --abi Relay.abi --pkg coston2 --type Relay --out coston2/Relay.go //go:generate abigen --abi FlareContractRegistry.abi --pkg coston2 --type FlareContractRegistry --out coston2/FlareContractRegistry.go -//go:generate abigen --abi=build/FtsoV2FeedConsumer.abi --pkg coston2 --type FtsoV2FeedConsumer --out coston2/FtsoV2FeedConsumer.go +//go:generate abigen --bin=build/FtsoV2FeedConsumer.bin --abi=build/FtsoV2FeedConsumer.abi --pkg coston2 --type FtsoV2FeedConsumer --out coston2/FtsoV2FeedConsumer.go //go:generate abigen --abi FastUpdatesIncentiveManager.abi --pkg coston2 --type FastUpdatesIncentiveManager --out coston2/FastUpdatesIncentiveManager.go //go:generate abigen --abi FastUpdatesConfiguration.abi --pkg main --type FastUpdatesConfiguration --out FastUpdatesConfiguration.go //go:generate abigen --abi FastUpdater.abi --pkg main --type FastUpdater --out FastUpdater.go +// flare package ABIs +//go:generate abigen --abi FlareContractRegistry.abi --pkg flare --type FlareContractRegistry --out flare/FlareContractRegistry.go +//go:generate abigen --bin=build/FtsoV2FeedConsumer.bin --abi=build/FtsoV2FeedConsumer.abi --pkg flare --type FtsoV2FeedConsumer --out flare/FtsoV2FeedConsumer.go import ( "developer-hub-go/coston2" diff --git a/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js b/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js index 5712a27f..203b5ac6 100644 --- a/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js +++ b/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js @@ -2,6 +2,7 @@ import { ethers } from "ethers"; // FastUpdatesConfiguration address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for FastUpdatesConfiguration contract diff --git a/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js b/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js index bdaa62b3..b314ecc5 100644 --- a/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js +++ b/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js @@ -2,6 +2,7 @@ import { Web3 } from "web3"; // FastUpdatesConfiguration address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for FastUpdatesConfiguration contract diff --git a/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js b/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js index a594c32d..96fe7bad 100644 --- a/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js +++ b/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js @@ -2,6 +2,7 @@ import { ethers } from "ethers"; // FastUpdater address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD diff --git a/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js b/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js index d0ec165c..7b7733cb 100644 --- a/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js +++ b/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js @@ -2,6 +2,7 @@ import { Web3 } from "web3"; // FastUpdater address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD diff --git a/examples/developer-hub-javascript/secure_random_coston2_ethers.js b/examples/developer-hub-javascript/secure_random_coston2_ethers.js index 2e6b34fa..d5de3e52 100644 --- a/examples/developer-hub-javascript/secure_random_coston2_ethers.js +++ b/examples/developer-hub-javascript/secure_random_coston2_ethers.js @@ -2,6 +2,7 @@ import { ethers } from "ethers"; // Relay address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/scaling/solidity-reference const ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for Relay contract diff --git a/examples/developer-hub-javascript/secure_random_coston2_web3.js b/examples/developer-hub-javascript/secure_random_coston2_web3.js index 17240bfd..df96326c 100644 --- a/examples/developer-hub-javascript/secure_random_coston2_web3.js +++ b/examples/developer-hub-javascript/secure_random_coston2_web3.js @@ -2,6 +2,7 @@ import { Web3 } from "web3"; // Relay address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/scaling/solidity-reference const ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for Relay contract diff --git a/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js b/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js index c85ffdb4..eeeac464 100644 --- a/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js +++ b/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js @@ -2,6 +2,7 @@ import { ethers } from "ethers"; // FastUpdatesIncentiveManager address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const INCENTIVE_ADDRESS = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for FastUpdatesIncentiveManager contract diff --git a/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js b/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js index ae78aeed..7671bb67 100644 --- a/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js +++ b/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js @@ -2,6 +2,7 @@ import { Web3 } from "web3"; // FastUpdatesIncentiveManager address (Flare Testnet Coston2) +// See https://dev.flare.network/ftso/solidity-reference const INCENTIVE_ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; const RPC_URL = "https://rpc.ankr.com/flare_coston2"; // ABI for FastUpdatesIncentiveManager contract diff --git a/examples/developer-hub-python/ftsov2_config_coston2.py b/examples/developer-hub-python/ftsov2_config_coston2.py index f061d7e3..b4d20621 100644 --- a/examples/developer-hub-python/ftsov2_config_coston2.py +++ b/examples/developer-hub-python/ftsov2_config_coston2.py @@ -4,6 +4,7 @@ from web3 import AsyncHTTPProvider, AsyncWeb3 # FastUpdatesConfiguration address (Flare Testnet Coston2) +# See https://dev.flare.network/ftso/solidity-reference ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14" RPC_URL = "https://rpc.ankr.com/flare_coston2" # ABI for FastUpdatesConfiguration contract diff --git a/examples/developer-hub-python/ftsov2_consumer_coston2.py b/examples/developer-hub-python/ftsov2_consumer_coston2.py index 4be4d902..ba4d1a6f 100644 --- a/examples/developer-hub-python/ftsov2_consumer_coston2.py +++ b/examples/developer-hub-python/ftsov2_consumer_coston2.py @@ -4,6 +4,7 @@ from web3 import AsyncHTTPProvider, AsyncWeb3 # FastUpdater address (Flare Testnet Coston2) +# See https://dev.flare.network/ftso/solidity-reference FTSO_ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59" RPC_URL = "https://rpc.ankr.com/flare_coston2" # Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD diff --git a/examples/developer-hub-python/secure_random_coston2.py b/examples/developer-hub-python/secure_random_coston2.py index b701dc3d..a06e2302 100644 --- a/examples/developer-hub-python/secure_random_coston2.py +++ b/examples/developer-hub-python/secure_random_coston2.py @@ -4,6 +4,7 @@ from web3 import AsyncHTTPProvider, AsyncWeb3 # Relay address (Flare Testnet Coston2) +# See https://dev.flare.network/ftso/scaling/solidity-reference ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250" RPC_URL = "https://rpc.ankr.com/flare_coston2" # ABI for Relay contract diff --git a/examples/developer-hub-python/volatility_incentive_coston2.py b/examples/developer-hub-python/volatility_incentive_coston2.py index f55c7723..9f2aeaff 100644 --- a/examples/developer-hub-python/volatility_incentive_coston2.py +++ b/examples/developer-hub-python/volatility_incentive_coston2.py @@ -5,6 +5,7 @@ # FastUpdatesIncentiveManager address (Flare Testnet Coston2) +# See https://dev.flare.network/ftso/solidity-reference INCENTIVE_ADDRESS = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c" RPC_URL = "https://rpc.ankr.com/flare_coston2" # ABI for FastUpdatesIncentiveManager contract diff --git a/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs b/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs index e4254e3c..e002a032 100644 --- a/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs +++ b/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs @@ -11,6 +11,7 @@ sol!( #[tokio::main] async fn main() -> Result<()> { // FastUpdatesConfiguration address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/solidity-reference let address = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14".parse()?; let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; // Connect to an RPC node diff --git a/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs b/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs index 25943536..056e5703 100644 --- a/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs +++ b/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs @@ -11,6 +11,7 @@ sol!( #[tokio::main] async fn main() -> Result<()> { // FastUpdater address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/solidity-reference let ftso_address = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59".parse()?; let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD diff --git a/examples/developer-hub-rust/src/bin/secure_random_coston2.rs b/examples/developer-hub-rust/src/bin/secure_random_coston2.rs index 6fd0e282..a4c364d1 100644 --- a/examples/developer-hub-rust/src/bin/secure_random_coston2.rs +++ b/examples/developer-hub-rust/src/bin/secure_random_coston2.rs @@ -10,7 +10,8 @@ sol!( #[tokio::main] async fn main() -> Result<()> { - // Relay address (Flare Testnet Coston2) + // Relay address (Flare Testnet Coston2) + // See https://dev.flare.network/ftso/scaling/solidity-reference let relay_address = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250".parse()?; let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; // Connect to an RPC node diff --git a/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs b/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs index 0df7241a..5a6d2374 100644 --- a/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs +++ b/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs @@ -16,7 +16,8 @@ async fn main() -> Result<()> { // Get private key from environment let private_key = std::env::var("ACCOUNT_PRIVATE_KEY")?; // FastUpdatesIncentiveManager address (Flare Testnet Coston2) - let ftso_address = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c".parse()?; + // See https://dev.flare.network/ftso/solidity-reference + let incentive_address = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c".parse()?; // Set up wallet and provider let signer: PrivateKeySigner = private_key.parse().unwrap(); let wallet = EthereumWallet::from(signer.clone()); @@ -25,7 +26,7 @@ async fn main() -> Result<()> { .wallet(wallet) .on_http("https://rpc.ankr.com/flare_coston2".parse()?); // Set up contract instance - let incentive = FastUpdatesIncentiveManager::new(ftso_address, provider); + let incentive = FastUpdatesIncentiveManager::new(incentive_address, provider); // Get the current sample size, sample size increase price, range, and scale let FastUpdatesIncentiveManager::getCurrentSampleSizeIncreasePriceReturn {