Fix seeds script to support new web3 version

This commit is contained in:
bumi 2019-06-13 18:14:21 +02:00
parent d5322530c3
commit 86bbe49c0b

View File

@ -18,14 +18,17 @@ module.exports = async function(callback) {
each(seeds.funds, (address, next) => { each(seeds.funds, (address, next) => {
console.log(`funding ${address} with 2 ETH`); console.log(`funding ${address} with 2 ETH`);
try { try {
web3.eth.sendTransaction({ web3.eth.personal.getAccounts().then(accounts => {
to: address, web3.eth.personal.sendTransaction({
value: web3.toWei(fundingAmount), to: address,
from: web3.eth.accounts[0] from: accounts[0],
}, result => next()) value: web3.utils.toWei(new web3.utils.BN(fundingAmount))
});
});
} catch(e) { } catch(e) {
console.log('FAILED:', e); console.log('FAILED:', e);
} }
next();
}); });
each(seeds.contractCalls, (call, next) => { each(seeds.contractCalls, (call, next) => {