0

I know currently, we can use the Ethereum Alarm Clock and Aion scheduling system to execute the function automatically, but according to what I know, it only can work in Main Net and Test Net(Rposten). My question is, Is that possible to work in the private chain by using one of these two solutions(EAC or Aion). If both ways can't work in a private chain, Are there any solution to execute the function automatically in the private chain?

2 Answers 2

1

In the case of Aion, you have the smart contract available on the Aion's GitHub page, so you can just deploy it in your private network. However, you will need to develop the script that executes the transactions as this has not been made available in the Aion page. But this basically read the logs of the ScheduleCallEvent, the parameters of this event are all you need for your script to be able to call the executeCall function.

This is a big difference between EAC and Aion. EAC saves a lot of data in the network. All this causes a huge difference in gas consumption for scheduling transactions, EAC uses about 500K gas for a single transaction, Aion uses only about 80K.

Hope this helps.

4
  • so, if I deploy in the private chain, can I avoid this line of code? [aion = Aion(0xFcFB45679539667f7ed55FA59A15c8Cad73d9a4E);] because the address is use in MainNet and Ropsten.
    – leojail
    Commented Apr 22, 2019 at 1:33
  • You will change that by the address or your deployed Aion contract. Notice that this line is in the examples of how to use Aion, not in the main Aion contract.
    – Jaime
    Commented Apr 22, 2019 at 5:51
  • I'm not sure whether I misunderstand or not, the example in Aion's GitHub page the contract Aion and contract MyContract is a different smart contract, and in my case, after I deploy the contract Aion then get the address, and put the address at here [aion = Aion(here);](MyContract),am I correct?
    – leojail
    Commented Apr 22, 2019 at 10:48
  • yes, that is correct
    – Jaime
    Commented Apr 22, 2019 at 12:09
0

Just right a cron job that will execute a script that will send transaction to the network and invokes the function. I think the EAC and Aion are doing the same thing.

2
  • sorry, are there any tutorial for smart contract using cron job?
    – leojail
    Commented Apr 19, 2019 at 8:29
  • No, There are for cron jobs though Commented Apr 19, 2019 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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