-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarity: try-read-only contract calls? #1630
Comments
The consensus seems to be that, abort or not, we can run any function or any code via the RESTful API. We can abort on mutation, or just not materialize any mutation. |
@jcnelson if by the RESTful API, you mean using |
Right -- what the API should be doing (#1641) is allowing you to call any Clarity function you want (not just the read-only ones) via the RESTful API, but without materializing any writes. |
sounds good! Thank you @jcnelson |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is more of a design question. Should it be possible to call a
define-public
function with a dynamic assertion that it is read-only? My main motivation for this is to provide a way to calldefine-public
functions via the RESTful API that could be read-only, and have them abort with an assertion failure if they try to mutate any state. I could also see us adding something akin to acontract-call?
but that adds a runtime assert that no mutations occur (maybe something likecontract-call-ro?
).The text was updated successfully, but these errors were encountered: