Closed jankun4 closed 8 months ago
Note that redeemer must be the same in both cases, so we can predict which branch of OnChain script will be used to validate minting of all of the tokens.
This is your product requirements. But others may want to use different redeemers. In any case, there will be some duplication: be it in the list of tokens or in the number of constraints. I think the current interface follows the "keep it simple" principle quite well (in this specific regard, but generally it's poorly designed)
Your change request is based on the assumption that the same redeemer should be used, which is not true in general for every user. For code clarity, you can trivially define this constraint by yourself.
Currently, if you want to mint two tokens with the same CurrencySymbol but with different TokenNames in one transaction you need to do something like this:
Note that redeemer must be the same in both cases, so we can predict which branch of OnChain script will be used to validate minting of all of the tokens.
It would be much simpler if instead, we could do something like: