Document helper scripts to interact with the contracts

This commit is contained in:
2018-04-04 21:56:54 +02:00
parent bdd99d58cf
commit 7d52161014
5 changed files with 52 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
module.exports = function(cb) {
module.exports = function(callback) {
let recipient = process.argv[4];
if (!recipient) {
console.log('Please provide a recipient address');
@@ -8,4 +8,6 @@ module.exports = function(cb) {
let amount = parseInt(process.argv[5]) || 1;
console.log(recipient);
web3.eth.sendTransaction({to: recipient, value: web3.toWei(amount), from: web3.eth.accounts[0]}, console.log);
callback();
}