flare-ftso

Provides integration guidance for consuming Flare Time Series Oracle price feeds onchain and offchain.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/Rasslonely/NexusXRP --skill flare-ftso-rasslonely
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flare-ftso
Source: https://github.com/Rasslonely/NexusXRP/tree/main/.agents/skills/flare-ftso
Command: npx skills add https://github.com/Rasslonely/NexusXRP --skill flare-ftso-rasslonely

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires web3, @flarenetwork/flare-periphery-contract-artifacts, and includes scripts (resource) and references (resource) components.

What problem does it solve? Developers building on Flare Network need accurate, up-to-date knowledge of the FTSO oracle's feed IDs, contract interfaces, fee mechanics, and verification patterns to integrate decentralized price feeds without hardcoding addresses or misusing payable methods. ## Core Features & Use Cases - Feed Consumption Patterns: Explains how to read block-latency and Scaling anchor feeds via FtsoV2Interface in Solidity, offchain with web3/ethers, and in React frontends using wagmi and the Flare periphery packages. - Feed IDs and Fee Calculation: Documents the 21-byte feed ID encoding, common crypto/USD feed IDs, and fee calculation via IFeeCalculator for payable calls. - Anchor Feed Verification: Covers Merkle proof verification of Scaling feeds with verifyFeedData, plus volatility incentives and delegation mechanics. - Use Case: A developer building a DeFi vault on Flare needs the XRP/USD price onchain; this Skill explains resolving FtsoV2 via ContractRegistry, calling getFeedByIdInWei with the correct feed ID, and converting the result to a human-readable price. ## Quick Start Ask the AI to show how to read the FLR/USD price feed from the Flare FTSO in a Solidity contract on Coston2 testnet.

Frequently Asked Questions about flare-ftso

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read FTSO price feeds in a Solidity contract?

Resolve the FtsoV2 contract via ContractRegistry (getTestFtsoV2 on Coston2, getFtsoV2 on mainnet), then call getFeedById or getFeedsById with the 21-byte feed ID. Never hardcode the FtsoV2 address, and set the EVM version to cancun when compiling.

How to read Flare FTSO feeds offchain with JavaScript?

Use web3 or ethers to call the FtsoV2 contract through a Flare RPC endpoint, resolving the address at runtime via ContractRegistry's getContractAddressByName. The @flarenetwork/flare-periphery-contract-artifacts package provides the ABI via interfaceToAbi.

What is the feed ID format for Flare FTSO price feeds?

Each feed uses a 21-byte (bytes21) ID: a category byte (e.g. 0x01 for crypto) followed by the UTF-8 encoded ticker pair right-padded with zeros. For example, FLR/USD is 0x01464c522f55534400000000000000000000000000.

Does reading FTSO block-latency feeds cost gas or fees?

Block-latency feed view calls are free to query onchain. Some state-changing payable calls require a fee calculated via IFeeCalculator's calculateFeeByIds, and Scaling anchor feeds are free to query with minimal gas for onchain Merkle verification.

How do I verify Scaling anchor feed data onchain?

Call ftsoV2.verifyFeedData with a FeedDataWithProof struct containing the feed data (votingRoundId, id, value, turnoutBIPS, decimals) and its Merkle proof. This validates the value against the onchain Merkle root published each 90-second voting epoch.

Can I use FTSO feeds in a React frontend with wagmi?

Yes, use wagmi with @flarenetwork/flare-wagmi-periphery-package, which exports chain configs, ABIs, and the ContractRegistry address. Resolve FtsoV2 via getContractAddressByName, then call getFeedByIdInWei with useReadContract and format results with viem's formatUnits.