Layer 2 built-in support #976
KtorZ
started this conversation in
Core language features
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Building up on the new V3 syntax:
We could imagine augmenting the syntax to support custom purposes; and use that syntax to define Cardano's purposes themselves. The definition for Cardano would be implicitly provided when unspecified, and would be equivalent to:
The idea would be to have the validator's purpose names be the (lowercased) variants of a defined type + the else branch:
The syntax for defining new purpose should also include ways of specifying the constructor index for the script context corresponding to that purpose (the Cardano ledger currently uses
0
).So for example, if we imagine a layer 2 "Gummiworm" associated with the constructor
1
, we could have:Notice that the names of the validator is the same, such that it compiles to a single program (single hash) across all layers.
Beta Was this translation helpful? Give feedback.
All reactions