Here’s a simple CIP idea: make datums optional when sending an output to a Plutus script. When datum is not present, Plutus script must use the default value:
Unit in Haskell.
This would enable better user experience when sending funds to smart contracts. Especially those which
() as their datum argument.
This can probably be done starting with Plutus V3 (or higher), because, even though this mostly happens by mistake, existing script behavior must be preserved.
On the other hand, for scripts where the datum argument
is supposed to be
(), why not unlock these outputs sent by mistake?
Unless I’ve misunderstood your idea, there
has been a CIP for this which has been generally rejected after being considered repeatedly. The reasons why are explained here, also with a suggestion in the last month that an official Cardano Problem Statement (CPS) will be written about the issue:
01:30PM - 25 Oct 22 UTC
This CIP is a simple quality of life change. It defines a default interpretation
… of a utxo with no datum (defaulting to `()`) for the purposes of scripts that were either erroneously created or make no use of datums.
([draft proposal in branch](https://github.com/zygomeb/CIPs/tree/empty/CIP-NoDatumIsDatum))
@COSDpool! I’m glad I posted here instead of trying to write it up.