Skip to content
Heiswap Relayer for gasless withdrawals
JavaScript Dockerfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
codedeploy-scripts
contracts
utils
.eslintrc
.gitignore
.travis.yml
Dockerfile
LICENSE
README.md
app.js
appspec.yml
docker-compose.yml
package.json
yarn.lock

README.md

heiswap-relayer

Heiswap Relayer for gasless withdrawals


Branch Status URL
Master https://relayer.heiswap.exchange

Usage

Send a payload to https://relayer.heiswap.exchange (or whatever URL you've deployed it to) with the following structure:

{
    "message": string,
    "signedMessage": string,
    "receiver": address, // ethereum address
    "ethAmount": number,
    "ringIdx": number,
    "c0": string,
    "keyImage": (string, string),
    "s": Array<string>
}

DIY (Deploy-it-yourself)

Dependencies

sudo apt-get update -y
sudo apt install docker.io -y
sudo systemctl start docker

# So you don't need sudo to run docker
sudo groupadd docker
sudo usermod -aG docker $USER

# Now relogin
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Running the relayer

  1. Clone the project and cd into it's root directory
git clone git@github.com:kendricktan/heiswap-relayer.git
cd heiswap-relayer
  1. Edit docker-compose.yml and edit the following environment variables to suit your site Note 1: Make sure the Ethereum address associated with ETH_SK has some funds to start with (~0.5 ETH) Note 2: You'll need to purchase a domain name if you want an SSL connection
INFURA_PROJECT_ID='project-id'
ETH_SK='ethereum-secret-key'

ALLOWED_DOMAINS: 'yourdomain.com'
SITES: '*.yourdomain.com=yourapp:3000'
  1. Choose deployment method

SSL Enabled Load Balancer (need custom domain) + multiple relayer backend

# Change  relayer=2 to how many instances you want to run
docker-compose up --build --scale relayer=2 -d

Single relayer (runs on port 3000)

docker build -t heiswap-relayer .
docker run -e INFURA_PROJECT_ID=<> -e ETH_SK=<> heiswap-relayer
You can’t perform that action at this time.