Cleanup scripts and use helper to get the networkid
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
const path = require('path');
|
||||
const each = require('async-each-series');
|
||||
const ethers = require('ethers');
|
||||
|
||||
const Kredits = require('../lib/kredits');
|
||||
const getNetworkId = require('./helpers/networkid.js')
|
||||
|
||||
const seeds = require(path.join(__dirname, '..', '/config/seeds.js'));
|
||||
|
||||
const ethers = require('ethers');
|
||||
const Kredits = require('../lib/kredits');
|
||||
|
||||
const each = require('async-each-series');
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const networkId = parseInt(web3.version.network);
|
||||
const networkId = await getNetworkId(web3)
|
||||
const provider = new ethers.providers.Web3Provider(
|
||||
web3.currentProvider, { chainId: networkId }
|
||||
web3.currentProvider, { chainId: parseInt(networkId) }
|
||||
);
|
||||
const kredits = await new Kredits(provider, provider.getSigner()).init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user