Skip to content

flare-foundation/flare-foundry-starter

Repository files navigation

Flare Logo

Flare Foundry Starter

This is a starter kit for interacting with Flare blockchain using Foundry. It provides example code for interacting with the enshrined Flare protocols (FTSO, FDC, FAssets), and useful deployed contracts. It also demonstrates how the official Flare smart contract periphery package can be used in your projects.

Getting Started

Prerequisites

Installation

Install all dependencies:

forge soldeer install

Configuration

Copy the .env.example to .env and fill in your private key:

cp .env.example .env

At minimum, set PRIVATE_KEY to a funded wallet on the target network. The .env.example file contains all available configuration options including RPC URLs, API keys, verifier URLs, and DA Layer endpoints.

Running Scripts

Load environment variables and run any script with Foundry:

source .env && forge script script/HelloWorld.s.sol --rpc-url coston2 --broadcast

Running Tests

forge test

Project Structure

script/
├── fdcExample/          # Flare Data Connector (all attestation types)
├── ftso/                # FTSO price feed examples
├── customFeeds/         # Custom FDC-backed price feeds
├── fassets/             # FAssets minting, bridging, redemption
├── adapters/            # Third-party oracle adapters (Chainlink, Pyth, etc.)
├── boringVault/         # BoringVault DeFi integration
├── firelight/           # Firelight protocol interactions
├── wnat/                # Wrapped native token operations
├── HelloWorld.s.sol     # Simple starter example
└── GuessingGame.s.sol   # Interactive game example
src/                     # Smart contract source files
test/                    # Forge tests

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors