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)