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?
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.
- 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
- SmartBillion uses this model to save the block hashes of blocks that are more than 256 blocks behind