Skip to content

fix(redeemers): encode datums with the given codec options in toScriptDataHash - #599

Merged
solidsnakedev merged 2 commits into
mainfrom
fix/script-data-hash-codec-options
Oct 7, 2026
Merged

solidsnakedev merged 2 commits into
mainfrom
fix/script-data-hash-codec-options

Conversation

@solidsnakedev

Copy link
Copy Markdown
Collaborator

Redeemers.toScriptDataHash applied its codec options to the redeemers but always encoded the datums with the default Plutus data options, so a hash requested with CBOR.CANONICAL_OPTIONS did not match a witness set holding canonical datums and the node rejected the transaction with 3113.

The datums are now encoded with the options the caller passes. Calls without options keep today's datum encoding, so existing hashes do not change.

Closes #579

@solidsnakedev
solidsnakedev merged commit b9d1d5e into main Oct 7, 2026
10 checks passed
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.

Redeemers: toScriptDataHash ignores the codec options when encoding datums

1 participant