This is an example of how to build a full stack application on Arweave with smart contracts running on Smarweave via Warp Protocol
To run this app, you should have:
- Node.js installed on your machine
- ArConnect wallet extension
- Retreive Arweave tokens (available from the faucet here or from an exchange)
- Install ArConnect wallet
- Download and save wallet in a file named
wallet.json
To run the app, follow these steps:
- Clone the project
git clone [email protected]:dabit3/full-stack-warp-arweave.git
- Change into the directory and install the dependencies
cd full-stack-warp-arweave
npm install
# or
yarn
- Deploy the contract to testnet
From the warp
directory, run the following command:
node deploy
- Run the Next.js app
From the root directory, run the following command:
npm run dev
- Set local environment variable to mainnet in the terminal session you will be deploying from:
export WARPENV=mainnet
- Create
.env.local
file in the root of the app and add the following environment variable:
NEXT_PUBLIC_WARPENV=mainnet
- Deploy the contract to testnet
From the warp
directory, run the following command:
node deploy
- Run the Next.js app
From the root directory, run the following command:
npm run dev