1

Is it possible to have a soldity smart contract perform a function on a predefined date (E.g. perform a payment on 2/12/2018) without requiring an external events to call the function? If yes, how would this look like in solidity?

  • I think it is possible. I have read something about that. If you google it you may find some librairies. – Florian Castelain Nov 12 '17 at 9:40
  • There is not and there's no plan to support such feature. – libertylocked Nov 12 '17 at 9:48
1

There is not and there's no plan to support such feature.

Contracts themselves cannot be the tx.origin, because currently every transaction must be originated from an account. You might want to remodel your application so you don't have constantly update its state.

Some examples:

  • You can make every call to the contract update its state, executing jobs if conditions are met
  • Use withdraw model if you want to send funds to users after a deadline
    • Many contracts use this model, including ENS
  • You can make a function to update the contract state. Then you call this function yourself every n blocks.
    • SmartBillion uses this model to save the block hashes of blocks that are more than 256 blocks behind

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