A collection of Berachain EVM examples: code, frameworks, languages, contracts, and more.
⚠️ Important Note: This repository contains largely sample code provided by ecosystem partners. The code is not fully maintained for correctness and security patches, and is intended to be adapted and customized for your own projects. Please review and test thoroughly before using in production environments.
This monorepo includes shared packages that power the examples:
packages/rpc-config
- Centralized configuration for Berachain networks, RPC URLs, and utility functionspackages/eslint-config
- Shared ESLint configuration for consistent code stylepackages/typescript-config
- Shared TypeScript configuration for all appspackages/ui
- Shared UI components and styles for frontend applications
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env
-
Deploy a contract:
# Deploy ERC20 contract pnpm deploy:berachain --filter foundry-erc20 --no-cache
Choose your development path by exploring the apps organized by category:
- WalletConnect + Next.js - Complete wallet connection with transaction signing
- WalletConnect + Expo - Mobile wallet integration for React Native
- RainbowKit + Vite - Modern wallet connector with Rainbow theming
- Particle Auth Core - Social login with embedded MPC wallets
- ThirdWeb Connect - Simplified wallet connection with ThirdWeb SDK
- Foundry ERC20 - Basic token contract deployment with Foundry
- Hardhat + Ethers v6 - NFT contract with modern Hardhat setup
- Viem + Solidity - Lightweight contract interaction with Viem
- Ethers v6 + Solidity - Traditional Ethers.js contract deployment
- OpenZeppelin Upgrades - Upgradeable contract patterns
- Contract Verification - Verify contracts on Berachain explorers
- Goldsky Subgraph - Index ERC20 balances with GraphQL queries
- Envio Indexer - Real-time blockchain data indexing
- Pyth Oracle - Integrate real-time price feeds
- Gelato VRF - Verifiable random functions for gaming/DeFi
- Pyth Entropy - Random number generation with Pyth Network
- Batch Transactions - Efficient multi-call patterns
- Berps Bot - Automated trading bot example
- EIP-7702 Gas Sponsorship - Account abstraction with gas sponsorship
- LayerZero OFT - Bridge ERC20 tokens using LayerZero V2
- Governance Proposals - Create and manage on-chain governance proposals
- Local Docker Devnet - Complete local Berachain environment with your own validators
- Node Scripts - Utility scripts for launching Berachain nodes
- Monitoring - Prometheus and Grafana setup for node monitoring
- ERPC Proxy Caching - RPC caching layer for better performance
- Irys Bera Node.js - Decentralized storage integration
Need help getting started? Check out the Berachain documentation for network configuration and fundamental concepts!
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.