Trying to figure out a method to automate transactions within a private testnet. There are several methods I'm aware of, but I'm not sure what would be the most practical. This is for testing purposes only. For example: automatically send X number of ETH between wallet a and wallet b every x number of seconds.

  • It would help if you listed what methods are you aware of. And are you looking to do it all inside blockchain or trigger the functionality from outside? – Lauri Peltonen Mar 15 '18 at 6:39
  • Currently, I'm doing it via Truffle. One method I was thinking about was Ethereum Alarm Clock and another was the through the use of the Oraclize.it API to initiate smart contracts at later dates. Ideally, it could be implemented within the blockchain, but it doesn't matter, I don't think. Another idea I had was implementing a cronjob to execute a shell script which allowed me to interact with the blockchain via web3. These are all hypothetical implementations though. The only way I've been able to do it so far is using Truffle, but this isn't an ideal method. – zakcole Mar 15 '18 at 15:12
  • I would do this with web3 javascript in geth and a crontab to run it every X number of minutes. Very easy and transparrent way. You can do this with contracts too, but it is too risky to publish a contract code, if there is some bug, you are can lose your funds. – Nulik Mar 15 '18 at 16:20

There is Truffle Tests that allow you to create multiple transactions, for instance within a for loop and employ "await timeout(ms)" to set the interval between each two consecutive transactions.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.