This commit is contained in:
poma 2020-10-03 10:02:38 +03:00
parent 00e17b1687
commit 5328178d65
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
4 changed files with 24 additions and 22 deletions

@ -1,10 +1,11 @@
FROM node:12
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install && npm cache clean --force
COPY package.json yarn.lock ./
RUN yarn && yarn cache clean --force
COPY . .
EXPOSE 8000
HEALTHCHECK CMD curl -f http://localhost:8000/status
CMD ["npm", "run", "start"]
# HEALTHCHECK CMD curl -f http://localhost:8000/status
ENTRYPOINT ["yarn"]
CMD ["server"]

@ -4,6 +4,7 @@ services:
kovan:
image: tornadocash/relayer
restart: always
command: server
environment:
VIRTUAL_HOST: example.duckdns.org
LETSENCRYPT_HOST: example.duckdns.org
@ -20,24 +21,26 @@ services:
depends_on:
- redis
mainnet:
tree-monitor:
image: tornadocash/relayer
restart: always
command: tree-monitor
environment:
VIRTUAL_HOST: example2.duckdns.org
LETSENCRYPT_HOST: example2.duckdns.org
NET_ID: 1
RPC_URL: https://mainnet.infura.io
# ORACLE_RPC_URL should always point to the mainnet
ORACLE_RPC_URL: https://mainnet.infura.io
# without 0x prefix
PRIVATE_KEY:
# 2.5 means 2.5%
RELAYER_FEE: 2.5
REDIS_URL: redis://redis/1
nginx_proxy_read_timeout: 600
depends_on:
- redis
qwe: ads
worker1:
image: tornadocash/relayer
restart: always
command: worker
environment:
PRIVATE_KEY: qwe
worker2:
image: tornadocash/relayer
restart: always
command: worker
environment:
PRIVATE_KEY: qwe
redis:
image: redis

@ -24,14 +24,12 @@
"gas-price-oracle": "^0.1.5",
"ioredis": "^4.14.1",
"node-fetch": "^2.6.0",
"snarkjs": "git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5",
"tornado-cash-anonymity-mining": "git+https://github.com/tornadocash/tornado-anonymity-mining.git#e3ae8b98b14eb7fee7cb8c93221920a20b1e0cd8",
"tx-manager": "git+https://github.com/tornadocash/tx-manager.git#df118be318b007e597e157504d105dfa3e6322a1",
"uuid": "^8.3.0",
"web3": "^1.3.0",
"web3-core-promievent": "^1.3.0",
"web3-utils": "^1.2.2",
"websnark": "git+https://github.com/tornadocash/websnark.git#86a526718cd6f6f5d31bdb1fe26a9ec8819f633e",
"why-is-node-running": "^2.2.0"
},
"devDependencies": {

@ -89,7 +89,7 @@ async function checkTornadoFee({ args, contract }) {
async function checkMiningFee({ args }) {
const swap = new web3.eth.Contract(swapABI, swapAddress)
const TornAmount = await swap.getExpectedReturn(args.fee).call()
const TornAmount = await swap.methods.getExpectedReturn(args.fee).call()
console.log('TornAmount', TornAmount)
// todo: use desired torn/eth rate and compute the same way as in tornado