tx manager as package

This commit is contained in:
Alexey 2020-10-02 13:16:43 +03:00
parent 90ed6cbe91
commit 17d48f9508
5 changed files with 23 additions and 382 deletions

View file

@ -10,6 +10,7 @@ const contract = new web3.eth.Contract(require('../abis/mining.abi.json'), miner
let tree, eventSubscription, blockSubscription
// todo handle the situation when we have two rewards in one block
async function fetchEvents(from = 0, to = 'latest') {
const events = await contract.getPastEvents('NewAccount', {
fromBlock: from,