-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat: add --send
to contract invoke
and default to only sending transaction if there are writes in the ledger footprint
#1518
Conversation
--send
to invoke and default to send if there are writes--send
to contract invoke
and default to only sending transaction if there are writes in the ledger footprint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! |
Co-authored-by: Leigh McCulloch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took another look, one fix needed, and otherwise just needs events 👏🏻
Co-authored-by: Leigh McCulloch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One thing missing, an env var for the option, otherwise lgtm.
Co-authored-by: Leigh McCulloch <[email protected]>
I think we need a follow up change to this change prior to this change being released. (cc @janewang @fnando). In this change we didn't take into the account the implication of txs that are read-only (no storage writes, no events), but that require auth. Auth checks are never run, and auth code is not executed. It's not obvious what the behavior should be. Simulating and considering the tx as read-only may be appropriate. Or it maybe surprising. Maybe we at least need a warning outputted that the tx is not being sent because simulation indicated that the tx was read-only. Or maybe we need to treat any tx with an auth as a read-write. Folks can still force it not to submit with Thoughts anyone? |
What
See initial discussion here: #225
Why
Currently users must opt in to not sending a transaction with
--is-view
. This deprecates--is-view
and flips the default to only send if there are writes in the ledger footprint returned by the simulation.It improves UX because now when making a view call a user must wait for the transaction be complete vs viewing the simulation result.
Close #225
Known limitations
[TODO or N/A]