Open jonathangenlambda opened 8 months ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
You can use fromAlonzoData
in this way:
import qualified Cardano.Ledger.Plutus.Data as LPD
import qualified PlutusLedgerApi.V1 as PV1
import qualified Cardano.Api.Shelley as C
toHashableScriptData = C.fromAlonzoData . LPD.Data @ledgerEra . PV1.toData
But I don't think it matters if you're creating the data from scratch (programatically) rather than by deserialisation from a bytestring.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
External
Area Other HashableScriptData
Describe the feature you'd like We have been successfully using
unsafeHashableScriptData
however its description recommends NOT to use it:However it is unclear how to construct a
ScriptRedeemer
fromScriptData
if we shouldn't useunsafeHashableScriptData
- in general, if usage ofunsafeHashableScriptData
is discouraged, it is unclear how to go fromScriptData
toHashableScriptData
.Please either change the description of
unsafeHashableScriptData
or provide other (safe?) means going fromScriptData
toHashableScriptData
.