@flarenetwork/flare-periphery-contracts

中文文档
0.1.55发布于 2026/11/11MIT近 30 天下载 3102

Smart contracts for all Flare chains

原始使用文档
文档目录4 节
  1. Package structure
  2. Example usages
  3. I want to use the FTSO prices in my contract
  4. I want to confirm something using the attestation client

Flare periphery package for smart contract development

This package contains a collection of smart contracts deployed on the Flare, Coston2 (test network for Flare), Songbird and Coston (test network for Songbird) networks.

The intention of this package is to provide a set of interfaces for easier integration and development of smart contracts on Flare based networks. Interfaces in the most recent version of this package are the same as the ones deployed on the networks. This package exposes all public and most of the internal interfaces but does not expose any of the implementations. If you want to access the implementations, you can use the official Flare smart contracts repo.

The package functions similar to openzeppelin library packages and can easily be imported in nodejs based projects as well as directly in remix IDE.

Basic familiarity with the Flare network and EVM is assumed for use. For more information, please refer to the Flare Developer Hub. If you want a guided tutorial on EVM development and Flare focused smart contract development with this package, see the guide on Getting Started with Flare.

Package structure

Each of the networks has its own folder and subfolders for interfaces of specific flare based technologies. The folder structure is as follows:

├── coston
│   ├── distribution
│   ├── ftso
│   ├── governance
│   ├── inflation
│   ├── mockContracts
│   ├── stateConnector
│   └── util-contracts
├── coston2
│   ├── distribution
│   ├── ftso
│   ├── governance
│   ├── mockContracts
│   ├── stateConnector
│   └── util-contracts
├── examples
│   ├── coston
│   ├── coston2
│   ├── flare
│   └── songbird
├── flare
│   ├── distribution
│   ├── ftso
│   ├── governance
│   ├── mockContracts
│   ├── stateConnector
│   └── util-contracts
└── songbird
    ├── distribution
    ├── ftso
    ├── governance
    ├── inflation
    ├── mockContracts
    ├── stateConnector
    └── util-contracts

Example usages

I want to use the FTSO prices in my contract

You should use IFtsoRegistry (or IIFtsoRegistry) for simple price queries or IFtso (or IIFtso) for more advanced queries. The IFtsoRegistry interface is available in contracts/userInterfaces/IFtsoRegistry.sol and the IFtso interface is available in contracts/userInterfaces/IFtso.sol.

To use the interfaces deployed on Flare network, just import them in your contract source:

import { IPriceSubmitter } from "@flarenetwork/flare-periphery-contracts/flare/ftso/userInterfaces/IPriceSubmitter.sol";
import { IFtsoRegistry } from "@flarenetwork/flare-periphery-contracts/flare/ftso/userInterfaces/IFtsoRegistry.sol";

If you are using Foundry, you can install the interfaces with Forge and import them in your contract source:

import { IPriceSubmitter } from "flare-periphery-contracts/flare/ftso/userInterfaces/IPriceSubmitter.sol";
import { IFtsoRegistry } from "flare-periphery-contracts/flare/ftso/userInterfaces/IFtsoRegistry.sol";

Very simple contract that can consume the FTSO prices is shown in examples/networkName/SimpleFtsoExample.sol.

An example usage of the FTSO system to dynamically price token in a contract is showcased in examples/network/DynamicToken.sol with a more detailed explanation in the blogpost.

I want to confirm something using the attestation client

Coming soon.


You've got the tools, turn on your imagination and go, go and build something awesome!

If you find any mistake or have any suggestions, please open an issue or contact us are directly.

Package is provided as is, without any warranty.

版本与发布记录

@flarenetwork/flare-periphery-contracts 共发布 71 个版本,首次发布于 2022/11/07;过去 12 个月发布了 25 个版本。

版本发布日期距今
0.1.55latest2026/11/114 天前
0.1.542026/11/114 天前
0.1.532026/09/092 个月前
0.1.53-alpha.0alpha2026/08/222 个月前
0.1.522026/06/304 个月前
0.1.512026/06/115 个月前

关于 @flarenetwork/flare-periphery-contracts 的常见问题

@flarenetwork/flare-periphery-contracts 是什么?

Smart contracts for all Flare chains

如何安装 @flarenetwork/flare-periphery-contracts?

在项目目录运行 npm install @flarenetwork/flare-periphery-contracts,或使用 pnpm add / yarn add / bun add。

@flarenetwork/flare-periphery-contracts 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/flarenetwork__flare-periphery-contracts 是否存在。

@flarenetwork/flare-periphery-contracts 可以商用吗?

@flarenetwork/flare-periphery-contracts 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@flarenetwork/flare-periphery-contracts 的下载量有多少?

根据 npm 官方下载统计,@flarenetwork/flare-periphery-contracts 在 2026/10/15 – 2026/11/13 这 30 天内被下载 3,102 次,日均约 103 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@flarenetwork/flare-periphery-contracts 还在维护吗?

最新版本 0.1.55 发布于 2026/11/11(4 天前);至今共发布 71 个版本,其中过去 12 个月发布了 25 个;首次发布于 2022/11/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。