You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
1
+
# Tohma Devnet Bridge
2
2
3
-
## Getting Started
3
+
This repo implements a simple bridging interface for depositing to and withdrawing from Tohma L2 devnet.
4
4
5
-
First, run the development server:
5
+
## Installation and setup
6
+
7
+
### Define env vars
8
+
9
+
Clone `.env.example` to `.env` and set the environment variables for L1 and L2 chains.
6
10
7
11
```bash
8
-
npm run dev
9
-
# or
10
-
yarn dev
11
-
# or
12
-
pnpm dev
13
-
# or
14
-
bun dev
12
+
cp .env.example .env
15
13
```
16
14
17
-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
15
+
Note `NEXT_PUBLIC_L1_MULTICALL3_ADDRESS` is set in the next step.
18
16
19
-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
17
+
### Installing `multicall3`
20
18
21
-
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.
19
+
The `withdraw` call uses [`multicall3](https://github.com/mds1/multicall) to batch multiple methods in a single call.
22
20
23
-
## Learn More
21
+
To deploy the contract, first install [Foundry](https://book.getfoundry.sh/cast/):
22
+
23
+
```bash
24
+
curl -L https://foundry.paradigm.xyz | bash
25
+
foundryup
26
+
```
24
27
25
-
To learn more about Next.js, take a look at the following resources:
28
+
Clone the `multicall3` repo and build the contract:
26
29
27
-
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
-
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
30
+
```
31
+
git clone https://github.com/mds1/multicall.git
32
+
cd multicall
33
+
forge build
34
+
```
29
35
30
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
36
+
Deploy the contract, specifying the L1 RPC URL and private key of the funded L1 deployer:
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.
42
+
If the deployment was successful, you should see a similar output as the following:
35
43
36
-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
0 commit comments