I want my smart contract to offer a refund service. It must periodically check the start date of a reservation stored in a list of strucutures and if it coincides with the current date, a control mechanism starts.Is it possible in solidity?
Asked
Active
Viewed 68 times
1 Answers
1
No.
Smart contract cannot do any work on their own. They have to be always triggered by some transaction.
How this kind of things are usually done is that you offer a withdraw function which users can call and it will calculate whether they should be sent something. Or, if you prefer pushing the assets, you can create a function which anyone can call which pushes the assets to all required participants - but this doesn't probably scale well (may run out of gas).
Lauri Peltonen
- 29,391
- 3
- 20
- 57
-
thanks, now I understand. I asked another more specific question and I was wondering if you could help me link – Mario Roma Jan 28 '21 at 21:58