✧ Setting up your local environment

Pre-requisites

Setup

Clone the repository

git clone https://github.com/YourUsername/swaplace-dapp.git

then

git switch develop

Installing dependencies

NOTE When installing dependencies using YARN or NPM, stick to the selected package manager throughout your project. This consistency helps prevent conflicts and ensures smoother management of dependencies in the future.

Run the following commands to install all the dependencies

OR

After, run the development server:

Environment Variables

The project comes with a .env.example file. You must rename it to .env and fill the variables with your values. Most RPC providers offer free testnet nodes. You can use Alchemy or Infura to get a free node. We currently use 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.

If you want to use your own please create your Project ID in the WalletConnect website (not mandatory).

Contributing

Last updated