Welcome to Soroswap, a decentralized exchange (DEX) that draws inspiration from the Uniswap V2 protocol and is specifically tailored for the Soroban network.
Before you begin, ensure you have met the following requirements:
- docker >= v24.0.2
- Freighter Wallet v5.2.3
- Clone the Repository
git clone https://github.com/soroswap/frontend.git
cd frontend
- Set Up Environment Variables
Copy the .env.example file to create a new .env file:
cp .env.local.example .env
Now, edit the .env
file and provide the NEXT_PUBLIC_BACKEND_URL
variable.
This will tell the frontend where to look for:
- the list of known tokens
- the SoroswapFactory address
- the tokens admin's private key (in order to mint tokens)
If you are following the instructions in https://github.com/soroswap/core
in order to deploy the smart contacts in your local environment and serve the API, your .env should look like this:
NEXT_PUBLIC_BACKEND_URL=http://localhost:8010
If you are ready for production, you can take Futurenet Contracts information from https://api.soroswap.finance
and just do
cp .env.production.example .env
โ๏ธโ๏ธ Note that some Futurenet RPC's might not have the same version, so we recomend you to connect to a local quickstart node following the instructions in https://github.com/soroswap/core
; and setting up your Freighter Wallet as in step 6.
- Start Docker
Navigate to the docker folder and execute the run.sh script:
cd docker
bash run.sh
This script will set up and start the Docker containers required for Soroswap.
- Install the Dependencies
After the Docker container is up, you will be inside the root folder on the container. Then, install the dependencies using Yarn:
yarn install
- Run the Development Instance
Now you are ready to start the development instance. Run the following command:
yarn dev
This will start the Soroswap development instance.
- Configure your Freigher Wallet
For a local Futurenet node:
Name | Futurenet Local RPC |
URL | http://localhost:8000/soroban/rpc |
Passphrase | Test SDF Future Network ; October 2022 |
Allow HTTP connection | Enabled |
Switch to this network | Enabled |
For a local Standalone node:
Name | Standalone |
URL | http://localhost:8000/soroban/rpc |
Passphrase | Standalone Network ; February 2017 |
Allow HTTP connection | Enabled |
Switch to this network | Enabled |
-
Last, but not least, add some lumens to your Freighter wallet!
For Standalone:
http://localhost:8000/friendbot?addr=<your address>
For Futurenet, visit: https://laboratory.stellar.org/#create-account
๐ Congrats! ๐
You have successfully set up Soroswap on your local machine! Start swapping, pooling, and exploring the possibilities of decentralized finance (DeFi) on the Soroban network.
If you find a bug or have a feature request, please create an issue or submit a pull request. Contributions are always welcome!
License: MIT
Special thanks to the Uniswap team for providing the base protocol on which Soroswap is built.
Thank you to the Stellar Community for the continuous support.
Made with โค๏ธ by the Soroswap Team.