new miner address; getInstances fix

This commit is contained in:
Alexey 2020-10-01 19:37:25 +03:00
parent a59fdcb2d5
commit 69a528795e
2 changed files with 3 additions and 2 deletions

View file

@ -1,10 +1,11 @@
const { instances, netId } = require('../config')
const { poseidon } = require('circomlib')
const { toBN } = require('web3-utils')
const { toBN, toChecksumAddress } = require('web3-utils')
const sleep = (ms) => new Promise((res) => setTimeout(res, ms))
function getInstance(address) {
address = toChecksumAddress(address)
const inst = instances[`netId${netId}`]
for (const currency of Object.keys(inst)) {
for (const amount of Object.keys(inst[currency].instanceAddress)) {