From 80f9d4017ffe6a234179a038f63d8f5339cde81e Mon Sep 17 00:00:00 2001 From: nikdementev Date: Wed, 24 Mar 2021 12:22:55 +0300 Subject: [PATCH] chore: update proxy contract for goerli --- package.json | 2 +- src/config.js | 1 + src/worker.js | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 76bb040..caa10b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "relay", - "version": "4.0.8", + "version": "4.0.9", "description": "Relayer for Tornado.cash privacy solution. https://tornado.cash", "scripts": { "server": "node src/server.js", diff --git a/src/config.js b/src/config.js index d502d41..a9de04c 100644 --- a/src/config.js +++ b/src/config.js @@ -23,5 +23,6 @@ module.exports = { [jobType.MINING_REWARD]: 455000, [jobType.MINING_WITHDRAW]: 400000, }, + tornadoProxy: '0x454d870a72e29d5E5697f635128D18077BD04C60', minimumBalance: '1000000000000000000', } diff --git a/src/worker.js b/src/worker.js index eaac65a..0d0de36 100644 --- a/src/worker.js +++ b/src/worker.js @@ -22,6 +22,7 @@ const { gasLimits, instances, oracleRpcUrl, + tornadoProxy, tornadoServiceFee, miningServiceFee, } = require('./config') @@ -84,7 +85,14 @@ async function start() { }) swap = new web3.eth.Contract(swapABI, await resolver.resolve(torn.rewardSwap.address)) minerContract = new web3.eth.Contract(miningABI, await resolver.resolve(torn.miningV2.address)) - proxyContract = new web3.eth.Contract(tornadoProxyABI, await resolver.resolve(torn.tornadoProxy.address)) + if (netId === 5) { + proxyContract = new web3.eth.Contract(tornadoProxyABI, tornadoProxy) + } else { + proxyContract = new web3.eth.Contract( + tornadoProxyABI, + await resolver.resolve(torn.tornadoProxy.address), + ) + } redisSubscribe.subscribe('treeUpdate', fetchTree) await fetchTree() const provingKeys = {