-
Notifications
You must be signed in to change notification settings - Fork 713
Open
Description
duplicated from clarity-lang/reference#88
I suggest the introduction of a new function code-body-of? that returns the code body of the specified contract principal. The function will unlock various new use-cases and will allow other contracts to prove contracts are designed in a specific way. It would replace aspects of the clarity-stacks library.
Signature: (code-body-of? principal)
Return type: (response string-ascii uint)
Return values:
(ok "code body string")on success.(err u0)if the principal is not a contract principal.(err u1)if the specified contract does not exist.(err u2)if the code body does not fit in the string-ascii.
The function would provide the minimum necessary to make it possible to prove code bodies, and can be combined with existing functions such as sha256. It would also be made more useful if Clarity 4 offers more string manipulation and conversion functions. (Suggested in different issues in this repo.)
Metadata
Metadata
Assignees
Type
Projects
Status
Status: 🆕 New