Allow funding accounts with the seeds script

This commit is contained in:
2018-04-23 13:43:35 +02:00
parent 62a5cefd1a
commit 847f5a251c
2 changed files with 17 additions and 1 deletions

View File

@@ -17,6 +17,18 @@ module.exports = function(callback) {
);
const kredits = await Kredits.setup(provider, provider.getSigner());
let fundingAmount = 2;
each(seeds.funds, (address, next) => {
console.log(`funding ${address} with 2 ETH`);
web3.eth.sendTransaction({
to: address,
value: web3.toWei(fundingAmount),
from: web3.eth.accounts[0]
},
(result) => { next(); }
)
});
each(seeds.contractCalls, (call, next) => {
let [contractName, method, args] = call;
let contractWrapper = kredits[contractName];