Allow funding accounts with the seeds script
This commit is contained in:
parent
62a5cefd1a
commit
847f5a251c
@ -6,4 +6,8 @@ let contractCalls = [
|
||||
['Operator', 'addProposal', [{contributorId: 3, amount: 100, kind: 'code', description: 'hacks on kredits', url: '' }, {gasLimit: 350000}]],
|
||||
['Operator', 'vote', ['1', {gasLimit: 250000}]]
|
||||
];
|
||||
module.exports = { contractCalls };
|
||||
let funds = [
|
||||
'0x7e8f313c56f809188313aa274fa67ee58c31515d',
|
||||
'0xa502eb4021f3b9ab62f75b57a94e1cfbf81fd827'
|
||||
];
|
||||
module.exports = { contractCalls, funds };
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user