Skip to content

Conversation

@koslambrou
Copy link
Contributor

Changelog

- description: |
    Add golden test for hash computation of serialised CBOR script read from file
# uncomment types applicable to the change:
  type:
  - test           # fixes/modifies tests
  - documentation  # change in code docs, haddocks...
# uncomment at least one main project this PR is associated with
  projects:
  - cardano-api

Context

Given a serialised Plutus script as CBOR and saved and to a file, there are multiple ways to read it in order to compute the hash. We realised that some ways are correct, and other incorrect ("incorrect" in the sense that the code compiles and runs with no runtime errors, but gives a different script hash).

Therefore, this PR provides some golden tests that serve as documentation on the correct way to achieve this goal.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

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.

2 participants