Allows "executors" to process limit orders on UniSwap.
- Node.JS v12.11.1 or greater
- Yarn is preferred as a package manager
- Docker (optional)
Pull the repository and install dependencies:
$ git clone https://github.com/UniTradeApp/unitrade-service.git
$ cd unitrade-service
$ yarn
Creating an environment configuration file is a required step for both local and Docker usage.
- Duplicate the
.env.example
file in the repository root - Rename it to
.env
- Add your values for each environment variable
See the "Environment Variables" section below for more information on each variable.
Use the start
script to build and run the service.
$ yarn start
- Make sure Docker is installed
- Create and fill out a
.env
file as described by the "Create Config" section above.
To run the container, use:
$ docker run --env-file=.env unitrade/executor-service:latest
- If you're running the above command from outside the repository root, substitute the correct path for
.env
. - To run a specific container version, replace
latest
with the version number.
Images for the Executor service can be found on DockerHub.
If, after modifying the code, you don't see your changes after running yarn start
(or yarn build
by itself), re-build the service from scratch:
$ yarn build:fresh
Uses Nodemon to automatically restart the service after code changes.
$ yarn dev
Fees collected for processing orders will be deposited to this account.
Points to an Ethereum network or node.
The address of the UniTrade smart contract on your chosen network.
The address of the UniSwap Router02 smart contract.
The address of the UniSwap Factory smart contract.
Default gas limit to use for transactions.