From 4bdd6b25c0e662cb7df241a7eed43957254331be Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 18 Dec 2019 22:35:25 +0300 Subject: [PATCH] add version --- config.js | 1 + src/index.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 695ab59..0ac3336 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,7 @@ require('dotenv').config() module.exports = { + version: '1.0', netId: Number(process.env.NET_ID) || 42, redisUrl: process.env.REDIS_URL, rpcUrl: process.env.RPC_URL || 'https://kovan.infura.io/v3/a3f4d001c1fc4a359ea70dd27fd9cb51', diff --git a/src/index.js b/src/index.js index 22f47cb..2e67b15 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ const express = require('express') -const { netId, port, relayerServiceFee } = require('../config') +const { netId, port, relayerServiceFee, version } = require('../config') const relayController = require('./relayController') const { fetcher, web3 } = require('./instances') const { getMixers } = require('./utils') @@ -31,7 +31,16 @@ app.get('/', function (req, res) { app.get('/status', async function (req, res) { let nonce = await redisClient.get('nonce') const { ethPrices, gasPrices } = fetcher - res.json({ relayerAddress: web3.eth.defaultAccount, mixers, gasPrices, netId, ethPrices, relayerServiceFee, nonce }) + res.json({ + relayerAddress: web3.eth.defaultAccount, + mixers, + gasPrices, + netId, + ethPrices, + relayerServiceFee, + nonce, + version + }) }) app.post('/relay', relayController)