You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the coin selection process it is crucial to create the change output and calculate it's min ada every time you add an input. This min ada needs to be added to the target ada in the coin selection.
Example of a broken case:
Let's say you pick a utxo with 30 ada + 150 NFTs, the current algorithm thinks: great! 30 ada! My target was 10 ada, I have triple: I am done here. And the tx breaks when building the change output.
CML would need to implement something similar so that it doesn't break on the example I explained at the beginning. A test could easily be added to ensure the fix works. That would be during the CIP-2 (ish) implementations, after you get all your Assets and during the loop that gathers Ada.
The text was updated successfully, but these errors were encountered:
During the coin selection process it is crucial to create the change output and calculate it's min ada every time you add an input. This min ada needs to be added to the target ada in the coin selection.
Example of a broken case:
Let's say you pick a utxo with 30 ada + 150 NFTs, the current algorithm thinks: great! 30 ada! My target was 10 ada, I have triple: I am done here. And the tx breaks when building the change output.
CTL does that correctly lines 240:249 of :
https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/src/Internal/BalanceTx/BalanceTx.purs
CML would need to implement something similar so that it doesn't break on the example I explained at the beginning. A test could easily be added to ensure the fix works. That would be during the CIP-2 (ish) implementations, after you get all your Assets and during the loop that gathers Ada.
The text was updated successfully, but these errors were encountered: