Skip to content

Commit

Permalink
Merge pull request #147 from 0xneves/main
Browse files Browse the repository at this point in the history
refactor: better setup instructions
  • Loading branch information
0xneves authored Feb 23, 2024
2 parents 8c85a84 + 788acdd commit 873c1a4
Showing 1 changed file with 10 additions and 9 deletions.
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

0 comments on commit 873c1a4

Please sign in to comment.