Repository navigation
refactor(wallets): decode CIP-30 UTxOs with TxOut - #730
Open
emmanuel-musau wants to merge 1 commit into
Open
emmanuel-musau wants to merge 1 commit into
emmanuel-musau wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #712, which deprecates
TransactionOutput.cip30UtxoFromCBORHexwas its last user insrc.It decoded the CIP-30 output into the old model and converted each field by hand: the
AddressErasaddress re-encoded and decoded again as anAddress,Assetsrebuilt from theValue, and a Shelley/Babbage branch for the datum and script ref.TxOut.fromCBORBytesalready returns anAddress,Assetsand onedatumOptionfor both eras, so theUTxOis built straight from its fields. Only the script ref still goes throughScript.fromCBOR, as inSignBuilderImpl.The
UTxOs it returns are unchanged. Run side by side on 2,000 random outputs, half encoded byTxOutand half byTransactionOutput, the old and new decoders returned equalUTxOs for every one, 1,238 of them with a reference script.The test fixtures now build outputs with
TxOut. No test covered a reference script, so one is added; it fails with the script-ref line removed.Closes #729