Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_MAINNET_NODE_URI=
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
89 changes: 68 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,83 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# Safe Reserve

## Getting Started

First, run the development server:
Follow these steps to start the application:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
1. **Install Dependencies**
```sh
pnpm install
```
2. **Configure Environment Variables**
```sh
cp .env.example .env.local
```
3. **Start the Development Server**
```sh
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
---

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Environment Variables

## Learn More
Ensure the following environment variables are properly configured:

To learn more about Next.js, take a look at the following resources:
- `NEXT_PUBLIC_MAINNET_NODE_URI` – Mainnet RPC URL
- `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` – WalletConnect Project ID
- You can get this from [WalletConnect Cloud](https://cloud.walletconnect.com/)

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
---

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Scripts Information

## Deploy on Vercel
Available scripts for development and maintenance:

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
- **Development**

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
```sh
pnpm dev
```

Starts the development server.

- **Build**

```sh
pnpm build
```

Creates a production build.

- **Production**

```sh
pnpm start
```

Runs the production server.

- **Type Checking**
```sh
pnpm typecheck:ci
```
Runs TypeScript type checking.

---

## Project Structure

The project follows a modular architecture with the following key directories:

- `app/` – Next.js app directory containing pages and layouts
- `components/` – Reusable React components
- `contracts/` – Smart contract definitions and ABIs
- `core/` – Core application logic and business rules
- `hooks/` – Custom React hooks
- `lib/` – Utility functions and shared libraries
- `public/` – Static assets
- `routes/` – Application routing configuration
- `utils/` – Helper functions and utilities
- `views/` – Page-specific components and logic
11 changes: 10 additions & 1 deletion config/wagmi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getDefaultConfig } from "connectkit";
import { defineChain } from "viem";
import { createConfig, http } from "wagmi";
import { createConfig, http, injected } from "wagmi";
import { walletConnect } from "wagmi/connectors";

export type NetworkType = "Mainnet" | "Arbitrum" | "Optimism" | "Sonic";

Expand Down Expand Up @@ -51,6 +52,14 @@ export const config = createConfig(
chains.map((ch) => [ch.id, http(getRpc(ch.name), { retryDelay: 1_000 })])
),

connectors: [
injected(),
walletConnect({
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || "",
qrModalOptions: { themeVariables: { "--wcm-z-index": "210" } },
}),
],

walletConnectProjectId:
process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || "",

Expand Down
Loading