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?
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
This is a big difference between
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.
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. 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.– JaimeApr 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? Apr 22, 2019 at 10:48
yes, that is correct– JaimeApr 22, 2019 at 12:09
Just right a
cron job that will execute a script that will
send transaction to the network and invokes the
function. I think the
Aion are doing the same thing.
sorry, are there any tutorial for smart contract using cron job? Apr 19, 2019 at 8:29
No, There are for cron jobs though Apr 19, 2019 at 11:55