@CIYAM Open I have read the spec document now.
Some suggestions from me:
I would rather like to see some event handling than this blocking with Sleep_Until_Creator or Sleep_For_Blocks or when the script is running out of coins.
The AT running out of coins should be the exception, and not a regular used mechanism. Otherwise in some usecases you don't know how long the script will actually run, so you have to send more coins to it just to keep it in a loop later.
If event handling is used then there also is no need to keep all data persistent, remember that all persistent data will need to be copied about a dozen times with every new block creation.
Here's a example AT with event handling.:
register event handler "block 1000 apeared" :block1000
register event handler "AT received coins" :newcoins
end
:block1000
'do what needs to be done when block 1000 appears
end
:newcoins
'do what needs to be done when at the AT account gets new coins
end