Check minAda for initial payments
Closed this issue · 1 comments
mmontin commented
While initial payments in initial distribution are part of a transaction that is not properly validated, we should still ensure that the resulting utxos have the required minimal amount of ada, otherwise we can work with a mockchain state that would not be correct.
florentc commented
- I agree this should fail, we should not allow to generate an initial state that violates the min ada invariant.
- I am not sure there should be a silent autofix by default on intitial distributions. I think it is interesting that you get an error because there might be something unintended (a typo or copypasting accident) in your initial distribution that is worth getting your attention as a user, while a silent correction would make it unnoticed.
- I think we could provide an optional autofix (that adds lovelace in UTxOs where they miss) in a dedicated function to compose over the inititial distribution, or dedicated smart constructor, for cases where the user knows everything is right or doesn't care about lovalaces, but is just lazy.
- Or maybe by default but with a warning when the autofix is triggered.