tokenbridge/monitor/getShortEventStats.js

23 lines
605 B
JavaScript
Raw Normal View History

2019-05-08 16:12:02 +03:00
require('dotenv').config()
const eventsInfo = require('./utils/events')
2019-05-08 16:12:02 +03:00
async function main(bridgeMode) {
const { foreignDeposits, homeDeposits, homeWithdrawals, foreignWithdrawals } = await eventsInfo(
bridgeMode
)
2019-05-08 16:12:02 +03:00
2019-05-30 21:05:36 +03:00
return {
depositsDiff: homeDeposits.length - foreignDeposits.length,
withdrawalDiff: homeWithdrawals.length - foreignWithdrawals.length,
home: {
deposits: homeDeposits.length,
withdrawals: homeWithdrawals.length
},
foreign: {
deposits: foreignDeposits.length,
withdrawals: foreignWithdrawals.length
2019-05-08 16:12:02 +03:00
}
}
}
module.exports = main