Fix seeds script to support new web3 version
This commit is contained in:
parent
d5322530c3
commit
86bbe49c0b
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user