Skip to content

refactor: better setup instructions #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2024
Merged
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
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ This repository contains the core frontend for the Swaplace Protocol; The lighte

## Setup

First, install the dependences:
ATTENTION: After forking the repository, you must change the branch into the `develop` branch to get the latest version.
WARNING: `main` branch is not stable at the moment.

You should install the dependencies using legacy mode and then run the development server.

```bash
npm i --legacy-peer-deps
Expand All @@ -24,25 +27,23 @@ bun dev

### Environment Variables

The project comes with a `.env.example` file. You should rename it to `.env` and fill the variables with your values. Most RPC providers offer free testnet nodes. You can use [Alchemy](https://www.alchemy.com/) or [Infura](https://infura.io/) to get a free node.
The project comes with a `.env.example` file. You should rename it to `.env` and fill the variables with your values. Most RPC providers offer free testnet nodes. You can use [Alchemy](https://www.alchemy.com/) or [Infura](https://infura.io/) to get a free node. We are currently using Sepolia for testing purposes but you can use any other provider and evm chains to test the application.

Alchemy has two types of keys, one for the HTTP provider and another for the Alchemy SDK. You should use the HTTP key for the `NEXT_PUBLIC_ALCHEMY_SEPOLIA_HTTP` variable and the SDK key for the `NEXT_PUBLIC_ALCHEMY_SEPOLIA_KEY` variable.

The HTTP key is used to connect to the blockchain and the SDK key is used to connect to the Alchemy API, which allows us to get the user custody tokens easily.

```
NEXT_PUBLIC_ALCHEMY_SEPOLIA_HTTP=
NEXT_PUBLIC_ALCHEMY_SEPOLIA_KEY=
NEXT_PUBLIC_ALCHEMY_MUMBAI_HTTP=
NEXT_PUBLIC_ALCHEMY_MUMBAI_KEY=
NEXT_PUBLIC_ALCHEMY_ETHEREUM_HTTP=
```

WARNING: The private keys used in the `.env` file are from hardhat accounts. They are not meant to be used in production.

WARNING: The `NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=` used in the `.env` file is public. They are not meant to be used in production.

If you want use your own please create your Project ID in the [WalletConnect](https://cloud.walletconnect.com/)
If you want use your own please create your Project ID in the [WalletConnect](https://cloud.walletconnect.com/) website (not mandatory).

```
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=

```

## Contributing
Expand Down