diff --git a/README.md b/README.md new file mode 100644 index 0000000..87a5459 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## Installation +``` +npm install +``` + +Update config file: +``` +cp ./config/default.json ./config/local.json +// edit local.json file +``` + +## Run + +Make a lot TXs to send TOMO: +``` +node cmd.js sendTomo -n 10 your_private_key +``` + +- `-n`: number of TXs +- `your_private_key`: the wallet, make sure you have some TOMO in the wallet to make TXs + diff --git a/commands/sendTomo.js b/commands/sendTomo.js index 3fb93ac..2b8208e 100644 --- a/commands/sendTomo.js +++ b/commands/sendTomo.js @@ -6,7 +6,7 @@ let sleep = (time) => new Promise((resolve) => setTimeout(resolve, time)) var nonce = 0 async function run (pkey, number) { - const account = web3Rpc.eth.accounts.privateKeyToAccount(pkey) + const account = web3Rpc.eth.accounts.privateKeyToAccount('0x' + pkey) let coinbase = account.address web3Rpc.eth.accounts.wallet.add(account) web3Rpc.eth.defaultAccount = coinbase