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
I opened this issue under the cardano-hw-cli repo, but it looks like this library is used to actually transform the transaction (here). So the bug is actually here. If I am wrong about this, feel free to close this issue.
The TLDR is that transforming a transaction using a redeemer with internal fields will result in an invalid transformation. Submitting this transaction results in a ScriptIntegrity mismatch error. For example, transforming a transaction using the unit redeemer:
{"constructor":0,"fields":[]}
is fine, but transforming a transaction using this more complicated redeemer:
This bug makes it impossible to use cardano-hw-cli to verify transactions involving smart contracts that use more complicated redeemers.
This is just a guess, but I am assuming the transformation is changing the redeemer's internal constructor index from 1 to 0 in order to comply with "integers must be as small as possible" (spec). The transformation should not touch the redeemer since the constructor index specifies which action is being taken.
EDIT: My guess was wrong. I tried using the complex redeemer with an internal constructor index of 0 and it still failed with a ScriptIntegrity error.
The text was updated successfully, but these errors were encountered:
I opened this issue under the
cardano-hw-cli
repo, but it looks like this library is used to actually transform the transaction (here). So the bug is actually here. If I am wrong about this, feel free to close this issue.The TLDR is that transforming a transaction using a redeemer with internal fields will result in an invalid transformation. Submitting this transaction results in a
ScriptIntegrity
mismatch error. For example, transforming a transaction using the unit redeemer:is fine, but transforming a transaction using this more complicated redeemer:
results in the
ScriptIntegrity
mismatch error upon submission.You can verify this bug by trying to mint test tokens using the always succeeding minting policy which can be used with any redeemer:
When I tested it, I got these results:
This bug makes it impossible to use
cardano-hw-cli
to verify transactions involving smart contracts that use more complicated redeemers.This is just a guess, but I am assuming the transformation is changing the redeemer's internal constructor index from
1
to0
in order to comply with "integers must be as small as possible" (spec). The transformation should not touch the redeemer since the constructor index specifies which action is being taken.EDIT: My guess was wrong. I tried using the complex redeemer with an internal constructor index of
0
and it still failed with aScriptIntegrity
error.The text was updated successfully, but these errors were encountered: