The decentralized origin for Flare builders ☀️.
This site is built with Docusaurus, a modern static site generator.
Ensure the following tools are installed:
- Node.js v20
- nvm for managing multiple Node.js versions
-
Clone the repository:
git clone https://github.com/flare-foundation/developer-hub.git cd developer-hub
-
Install dependencies:
npm install
-
Start the local development server:
npm run start
This launches the development server and automatically opens your default browser. Live reloading ensures changes appear instantly.
Browse commonly used snippets in developer-hub/examples/.
Supported languages:
- Python
- JavaScript
- Rust
- Go
Ensure consistent formatting using Prettier:
npm run format
Note: Prettier support for MDXv3 is evolving (tracking issue). If needed, bypass Prettier by using:
{/* prettier-ignore */}
All code examples in examples/ follow language-specific formatters.
To create a production-ready build:
npm run build
The static files are generated in the build
directory. To serve the production build locally:
npm run serve
Tip: Test search functionality using a production build.
To generate Solidity documentation:
-
Switch to Node.js v18:
nvm use 18
-
Run the Documentation Generator:
cd docgen chmod +x generate-solidity-docs.sh ./generate-solidity-docs.sh
This pulls the latest smart contracts and generates docs.
-
Switch Back to Node.js v20:
nvm use 20
Ensure uv dependencies are synced:
cd automations
uv sync
-
Update Feed IDs:
Generate and save feed IDs in
anchor_feeds.json
andblock_latency_feeds.json
:uv run feed_table_generator.py
-
Update Contract Addresses:
Fetch and save contract addresses in
solidity_reference.json
:uv run solidity_reference_table_generator.py
-
Run All Automations:
Execute all tasks at once:
npm run automations
Contributions are welcome! Before your first PR, read the CONTRIBUTING.md.