This is the official repo for HelloBase, a starting place for any developer who is interested in building onchain.
The app is composed of two pieces:
- Next.js client
- Smart Contracts on Base Sepolia
This repo contains the code for the Next.js client and uses a combination of Wagmi.sh and Coinbase Smart Wallets to provide a seemless experience for anyone to start building onchain. Below is a flow chart for the user experience and what happens behind the scenes.
sequenceDiagram
participant User
participant Wallet
participant ContractFactory
participant Contract
User->>Wallet: Create Wallet
User->>ContractFactory: Deploy Contract
ContractFactory-->>Contract: Create new instance
ContractFactory-->>User: Return contract address
Wallet->>Contract: Set initial greeting
Contract-->>User: Confirm transaction
User->>Contract: Read greeting
Contract-->>User: Return greeting
Wallet->>Contract: Set new greeting
Contract-->>User: Confirm transaction
User->>Contract: Read greeting again
Contract-->>User: Return new greeting
First clone the repo and install dependencies
git clone https://github.com/PinataCloud/hello-base
cd hello-base
npm install
Update the .env.example
to .env.local
and fill in the environment variables
NEXT_PUBLIC_URL= # Hosted App URL
NEXT_PUBLIC_FACTORY_ADDRESS= # Address of deployed factory
Spin up the dev server
npm run dev
Feel free to reach out if you have any questions!