FAQs
This page answers common questions encountered by developers building applications on Flare networks.
Technical Troubleshooting
Why am I getting invalid opcode: opcode 0x5f not defined
when deploying or interacting with my contract?
Cause: This error typically occurs because your contract was compiled with a Solidity version (usually >=0.8.20) that defaults to the shanghai
EVM version (or later), which introduced the PUSH0
(0x5f) opcode. Flare and Songbird currently support EVM versions up to london
, which does not recognize this opcode.
Solution: You need to explicitly tell your compiler to target the london
EVM version.
-
Using Remix: Set EVM version to
london
in the Advanced Configurations section of the Solidity Compiler tab: -
Using Hardhat: Set
evmVersion: "london"
within thesolidity
configuration object in yourhardhat.config.ts
(or.js
):// hardhat.config.ts
import { HardhatUserConfig } from "hardhat/config";
// ... other imports
const config: HardhatUserConfig = {
solidity: {
version: "0.8.24", // Example version
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "london", // Add this line
},
},
// ... other configurations
};
export default config;See the Hardhat Starter Kit config for a full example.
-
Using Foundry: Add
evm_version = "london"
under the[profile.default]
section in yourfoundry.toml
:# foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
# ... other settings
evm_version = "london" # Add this lineSee the Foundry Starter Kit config for a full example.
-
Using Standard Solidity JSON Input: Set
evmVersion
tolondon
within thesettings
object:{
"language": "Solidity",
"sources": {
/* ... */
},
"settings": {
"optimizer": {
/* ... */
},
"evmVersion": "london", // Set this
"outputSelection": {
/* ... */
}
}
} -
Using
solc
CLI: Use the--evm-version london
flag:solc --evm-version london --optimize --abi --bin YourContract.sol -o build/
Network & Tokens
Where can I get testnet tokens (faucet)?
Flare provides faucets for its public testnets:
- Flare Testnet Coston2: Get C2FLR from the Coston2 Faucet. Use Coston2 for testing applications intended for Flare mainnet.
- Songbird Testnet Coston: Get CFLR from the Coston Faucet. Use Coston for testing applications intended for the Songbird canary network.
How do I add Flare/Songbird networks to my wallet (e.g., MetaMask)?
The easiest way is to visit the respective block explorer, scroll down to the footer, and click the "Add Network" button:
- Flare Mainnet: Flarescan or Flare Explorer
- Coston2 Testnet: Coston2 Flarescan or Coston2 Explorer
- Songbird Canary-Network: Songbird Flarescan or Songbird Explorer
- Coston Testnet: Coston Flarescan or Coston Explorer
Alternatively, you can add them manually using the details on the Network Configuration page.
What's the difference between Flare and Songbird?
- Flare (FLR): The main production network with real economic value.
- Songbird (SGB): A "canary network" - blockchain used for testing protocol-level features and dApps in a live environment with real consequences before they are potentially deployed to Flare. It serves as a proving ground.
Read more on the Network Overview page.
Which RPC endpoint should I use?
- For Development/Testing: The Public RPCs are convenient for getting started. However, they have rate limits and shared resources.
- For Production Applications: It is strongly recommended to use a dedicated RPC endpoint from a provider for better performance, reliability, and support. See the Developer Tools page for options.
- For Running Nodes: You can also run your own RPC node.
What is the block time and finality on Flare?
Flare networks use the Snowman++ consensus protocol.
- Block Time: Approximately 1.8 seconds.
- Finality: Near-instantaneous (single-slot finality). Once a block is accepted by consensus, it's considered final.
Learn more on the Consensus page.
Development Resources
Where can I find the addresses of Flare's core smart contracts?
The addresses for contracts like WNat
, FtsoV2
, FdcHub
, etc., vary by network.
- Use the
FlareContractRegistry
: This contract acts as a directory. It has the same address (0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019
) on all Flare networks (Flare, Coston2, Songbird, Coston). You can query itsgetContractAddressByName
orgetAllContracts
methods to find the addresses of other contracts on the specific network you are connected to. - Check the Solidity Reference: Deployed contract addresses for each network are listed on the relevant reference pages for convenience:
Are there official developer tools or SDKs?
Flare maintains several resources to aid development:
- Language-Specific Guides: Tutorials for interacting with Flare using JavaScript, Python, Go, and Rust.
- Starter Kits: Pre-configured project templates for Hardhat & Foundry.
- Developer Tools List: A curated list of RPCs, Indexers, Bridges, SDKs, and more.
Where can I learn about Flare-specific terminology?
Learn more about the terminology used in the Flare ecosystem (like FTSO, FSP, PDA, etc.) on the Terminology page.
Community & Support
I have a project I would like to build on Flare. Can I get a grant?
Yes! The Flare Foundation offers grants to support innovative projects that contribute to the ecosystem's growth. Learn more and apply on the Flare Grants Program page.
Where can I get technical support or ask questions?
Connect with Flare's developer community and the team through these channels:
- Flare Experts: Get dedicated Developer Support from a Flare expert.
- Discord: The primary channel for developer Q&A, discussions, and support. Join the Flare Network Discord and head to the developer channels.
- Telegram: Engage with the broader community on Telegram (may be less developer-focused).
- GitHub: Report issues, contribute to code, or explore the open-source repositories at Flare Foundation GitHub. (Best for code-specific issues, not general Q&A).