0

Is there a way to do something at each time interval in solidity without having to write and sign a transaction (paying gas) each time the interval passed.

For example. Say I have a glass of eWater on the blockchain that has 1L of eWater in it but every time 4 hours pass, it loses 100ml.

Is there a way to do this so every single hour the Volume will update on chain without human intervention.

AvocadoChocolate
  • 995
  • 5
  • 14
  • I guess the Node: geth option does yes, But I was wondering if there is something like this in solidity itself. But I guess not due it it needing gas to execute. Perhaps the contract itself can use ETH inside of it? – AvocadoChocolate Aug 04 '22 at 06:56
  • Solidity doesn't have functionality like this. There isn't a way to have a fully on chain, scheduled/recurrent transaction. An EOA (Externally Owned account, i.e. a private key) needs to sign and and pay for all transactions. The best you can do is have a backend that schedules transactions. There is Keep3r (https://keep3r.network/), which handles some of this for you – natewelch_ Aug 04 '22 at 14:45

0 Answers0