
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@flarenetwork/ftso-adapters
Advanced tools
Solidity library contracts that adapt Flare's FTSO data to popular oracle interfaces such as Chainlink, Pyth, and API3. These libraries let dApps migrate to Flare's native FTSO oracle with minimal code changes.
ftsoFeedId) and holds cached price data in storage.refresh() function on your contract and call it periodically (via a keeper or cron) to keep on-chain prices fresh.This example shows how to build a contract that uses a FtsoChainlinkAdapterLibrary to expose a Chainlink-compatible latestRoundData interface. The pattern is identical for API3 and Pyth adapters.
FtsoChainlinkAdapterLibrary.sol// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
library FtsoChainlinkAdapterLibrary {
struct Round {
int256 answer;
uint256 startedAt;
uint256 updatedAt;
uint80 answeredInRound;
uint80 roundId;
}
// Fetches price from FTSO and updates the cached Round in the consuming contract
function refresh(Round storage _latestState /*, other args */) internal {
// Fetch price from FTSO, transform, and store in _latestState
}
// Reads and validates the cached price
function latestRoundData(
Round storage _latestState /*, other args */
)
internal
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
{
// Validate _latestState and return Chainlink-like round data
}
}
MyPriceConsumer.sol// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import { FtsoChainlinkAdapterLibrary } from "./FtsoChainlinkAdapterLibrary.sol";
contract MyPriceConsumer {
// --- Adapter configuration and cached state ---
bytes21 public immutable ftsoFeedId;
uint8 public immutable chainlinkDecimals;
uint256 public immutable maxAgeSeconds;
FtsoChainlinkAdapterLibrary.Round private _latestPriceData;
constructor(bytes21 _ftsoFeedId, uint8 _decimals, uint256 _maxAge) {
ftsoFeedId = _ftsoFeedId;
chainlinkDecimals = _decimals;
maxAgeSeconds = _maxAge;
}
// Keeper-triggered method to refresh cache via the library
function refresh() external {
FtsoChainlinkAdapterLibrary.refresh(_latestPriceData /*, ftsoFeedId, chainlinkDecimals */);
}
// Chainlink-compatible read method backed by cached data
function latestRoundData()
public
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
{
return FtsoChainlinkAdapterLibrary.latestRoundData(_latestPriceData /*, maxAgeSeconds */);
}
// Example business logic using the adapter output
function executeTrade() external {
(, int256 price, , , ) = latestRoundData();
require(price > 0, "Price is not available");
// ... your logic here ...
}
}
refresh() periodically to keep data fresh.FAQs
FTSO Adapters for different oracles.
We found that @flarenetwork/ftso-adapters demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.