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
The work done to add a data-backed ScriptContext has duplicated a lot of the code and tests inside the plutus-ledger-api. Also see #6142 (comment) for some user feedback.
Task list
1. Can the (current, SoP) ledger API be modified, to what extent? What are the requirements?
2. Do other types need to be represented as BuiltinData other than Map, Value and list? Do we want to use asData for all the minor types nested inside the ScriptContext?
I have done an initial investigation, and the current SoP types use makeIndexedData TH to generate From/ToData instances for them. I believe this means there's a runtime cost to go to and from the two representations, but it might be negligible. This needs to be checked. Do we need to worry about anything else here?
3. Design and implement the new API
Once we know which types can be shared, if any, and once we know what changes we can make to the current API we can begin designing the new one. Roman suggested a typeclass-based approach. In any case, the idea is to find a way to abstract the representation away from the API code.
The text was updated successfully, but these errors were encountered:
The work done to add a data-backed
ScriptContext
has duplicated a lot of the code and tests inside theplutus-ledger-api
. Also see #6142 (comment) for some user feedback.Task list
1. Can the (current, SoP) ledger API be modified, to what extent? What are the requirements?
2. Do other types need to be represented as
BuiltinData
other thanMap
,Value
and list? Do we want to useasData
for all the minor types nested inside theScriptContext
?I have done an initial investigation, and the current SoP types use
makeIndexedData
TH to generateFrom/ToData
instances for them. I believe this means there's a runtime cost to go to and from the two representations, but it might be negligible. This needs to be checked. Do we need to worry about anything else here?3. Design and implement the new API
Once we know which types can be shared, if any, and once we know what changes we can make to the current API we can begin designing the new one. Roman suggested a typeclass-based approach. In any case, the idea is to find a way to abstract the representation away from the API code.
The text was updated successfully, but these errors were encountered: