There was that "smart contract" idea back when immutable distributed ledgers were in fashion. I still struggle to see the approach being workable for anything more complicated (and muddied) than Hello World level contracts.