Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for the Plutus txinfo translation in the Babbage era #2710

Merged
merged 6 commits into from
Mar 30, 2022

Conversation

JaredCorduan
Copy link
Contributor

@JaredCorduan JaredCorduan commented Mar 29, 2022

Analogously to the Alonzo tests here, this PR adds unit tests for the txinfo translation in the Babbage era.

This PR also fixes two bugs:

  • we were not yielding a translation error for Plutus V1 scripts inside of transactions that used reference inputs.
  • we were returning a very misleading error when translating an input whose corresponding output was from Byron. (It was previously returning ByronOutputInContext for both cases).

These tests cover (at a better level, I would argue) the last two tests in #2471.

Jared Corduan added 3 commits March 29, 2022 15:32
Now properly distinguish between outputs that came from an input in the
transaction and those that were from an output in the transaction.
@JaredCorduan JaredCorduan force-pushed the jc/plutus-tx-info-tests-babbage branch from d76cc5a to 32faff0 Compare March 29, 2022 21:19
Co-authored-by: Zachary Churchill <zacharyachurchill@gmail.com>
Copy link
Contributor

@goolord goolord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@goolord goolord changed the title Unit tests for the Plutus txinfo transation in the Babbage era Unit tests for the Plutus txinfo translation in the Babbage era Mar 29, 2022
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor syntactic suggestions. Otherwise looks great

Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
@JaredCorduan JaredCorduan force-pushed the jc/plutus-tx-info-tests-babbage branch from 904c0cd to d74a0a2 Compare March 30, 2022 00:46
@JaredCorduan JaredCorduan merged commit 15130c8 into master Mar 30, 2022
@iohk-bors iohk-bors bot deleted the jc/plutus-tx-info-tests-babbage branch March 30, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants