Constant reference to script hash / currency symbol #676
Quantumplation
started this conversation in
Core language features
Replies: 2 comments 13 replies
-
@KtorZ I might try to implement this this weekend if I have some free time; Can we have a discussion about what the preferred syntax would be if it could magically be implemented?
|
Beta Was this translation helpful? Give feedback.
7 replies
-
Is the idea still alive? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Often, all but the most trivial contracts need to refer to another contract, for example:
Right now, the only way (that I know of) to achieve this in Aiken is:
Given how prevalent this is, it'd be really nice to have built in language support for this, exposing these script hashes as compile time constants to the contract so long as there is no circular dependencies.
For example, this could be achieved via a compiler time built-in:
Use of these variables would impose a topological ordering on the validators, and cycle detection could throw a helpful error with some suggested design patterns to unravel the circular dependency.
What are the teams thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions