add version

This commit is contained in:
Alexey 2019-12-18 22:35:25 +03:00
parent d063bc266b
commit 4bdd6b25c0
2 changed files with 12 additions and 2 deletions

View File

@ -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',

View File

@ -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)