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
Function export defined in Plutus.Contract.Wallet does not update txValidRange of the transaction with unBalancedTxValidityRange before calling mkPartailTx. Script validation may therefore fail when balancing is performed using a local wallet configuration, especially when a restricted txRange is expected. To rectify this bug, export must be parameterized with SlotConfig and txValidRange must be updated as follows before the call to mkPartialTx:
The default slotconfig should be avoided when calling export in Cardano.Wallet.LocalClient and Cardano.Wallet.RemoteClient.
Another more straight forward solution is to directly update txValidRange in mkTxConstraints, but again we need to specify the slotConfig.
This bug may also impact browser-based wallets, especially when exporting a partial tx to be balanced and signed externally.
Steps to reproduce the behavior
A validator script expecting a restricted txValidityRange.
Specify the corresponding off-chain code using Constraints.mustValidateIn
Submit the transaction within a PAB context (e.g., via the invocation of an endpoint) using a local wallet configuration.
Actual Result
The validator script fails during balancing as txValidityRange is unspecified
Expected Result
Validator must evaluate successfully if txValidityRange is properly set.
Describe the approach you would take to fix this
See above.
A current workaround is to call mkTxConstraints and explicitly update txValidityRange of the unBalancedTx (as specified above) before calling submitUnbalancedTx.
Summary
Function
export
defined inPlutus.Contract.Wallet
does not updatetxValidRange
of the transaction withunBalancedTxValidityRange
before callingmkPartailTx
. Script validation may therefore fail when balancing is performed using a local wallet configuration, especially when a restricted txRange is expected. To rectify this bug,export
must be parameterized withSlotConfig
andtxValidRange
must be updated as follows before the call tomkPartialTx
:The default slotconfig should be avoided when calling
export
inCardano.Wallet.LocalClient
andCardano.Wallet.RemoteClient
.Another more straight forward solution is to directly update txValidRange in
mkTxConstraints
, but again we need to specify the slotConfig.This bug may also impact browser-based wallets, especially when exporting a partial tx to be balanced and signed externally.
Steps to reproduce the behavior
Actual Result
The validator script fails during balancing as txValidityRange is unspecified
Expected Result
Validator must evaluate successfully if txValidityRange is properly set.
Describe the approach you would take to fix this
See above.
A current workaround is to call mkTxConstraints and explicitly update txValidityRange of the unBalancedTx (as specified above) before calling submitUnbalancedTx.
System info
plutus-apps commit: 51da951
The text was updated successfully, but these errors were encountered: