@cryptoflops/base-connect-playground
v0.1.0
Published
<p align="center"> <img src="./public/logos/celo-saver.png" height="80" alt="CeloSaver" /> <img src="./public/logos/proof-pay.png" height="80" alt="ProofPay" /> <img src="./public/logos/market-pu
Readme
Base Connect Playground
A multi-chain application playground built with Reown AppKit, Wagmi, and Base.
This project is a reference for building Web3 applications. It shows how to integrate wallet connections, handle multi-chain interactions, and execute smart contract transactions.
Core Features
- Multi-Chain Connectivity: Switching between Base, Optimism, and Celo networks.
- Wallet Integration: Implementation of Reown AppKit for wallet connections.
- Smart Contract Interactions: Examples of reading state and recording transactions.
- Support Builder: A feature for sending tips to a specific address.
Tech Stack
- Framework: Next.js 15
- Web3 SDK: Reown AppKit
- Ethereum Hooks: Wagmi & Viem
- Styling: Tailwind CSS
- State Management: TanStack Query
Getting Started
Prerequisites
- Node.js 20+
- npm or yarn
Installation
Clone the repository:
git clone https://github.com/cryptoflops/base-connect-playground.git cd base-connect-playgroundInstall dependencies:
npm installConfigure Environment: Create a
.env.localfile in the root directory and add your Reown Project ID:NEXT_PUBLIC_PROJECT_ID=your_reown_project_idRun Locally:
npm run dev
Deployment
Deploy to Vercel
- Push code to a repository.
- Import the project into Vercel.
- Add the
NEXT_PUBLIC_PROJECT_IDenvironment variable. - Ensure the Node.js version is set to 20.x in the settings.
Contract Examples
The playground interacts with several contracts on Base Mainnet:
- Counter: State mutation (increment/decrement).
- Storage: Reading and writing string data.
- Boolean Flag: Toggling a state.
- Timestamp: Recording block timestamps.
- Events: Monitoring contract events.
Contributing
Contributions are welcome. Please submit a Pull Request for any enhancements.
License
This project is available under the MIT License.
