-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: vm.confirmContinue
cheat code
#2399
Comments
Unclear how this should work with |
That's a good point. And now that I think about it, I don't think doing this with What if we scope the cheatcode to only work when invoked with |
It's feasible-ish, but still some edge cases with |
True good call. Personally this is something we always add to our deploy scripts to add assurances around the deploy parameters, and just the other week we deployed something via But happy to hear other opinions / alternative ideas as well and will let others chime in 🙂 |
@mds1 Can we not achieve the same result by having the user confirm before broadcast instead? Possibly also using decoded transaction data? |
One downside is that if you have e.g. a bug in the config for tx 2, you already sent tx 1 by the time you notice. But in general I think it's a good idea. Maybe an upfront summary of all decoded txs, like a partial trace, where only the top-level calls of broadcasted txs are shown (or two levels deep for create2 to show the actual contract creation) |
@mds1 We already have all of the transactions before we broadcast them, so my idea was that we would display them all decoded so you can inspect them if you want before broadcasting any of them? |
Cool, yea I like that idea. So I imagine the UX being something like:
Does that line up with what you're thinking? |
Yep! |
Hey, wondering if there's been any progress on this issue. If no one is actively working/planning to work on this, I could take a crack at it, though this would be my first issue in Foundry so a code pointer or two would be much appreciated. |
Feel free to take a stab at it :) Let me know if you end up not being able to complete it and I will unassign you! |
@Dendrimer I unassigned for you now, but if you do still plan to work on this let me know and I can reassign you |
Hello, just adding my two 2ct here. While this works fine with ppl using ledger (as the flow is stuck till they confirm) we noticed especially ppl using pk mess things up, as there's no confirmation needed. Even if they see sth is wrong it's usually to late (ofc, there's dry run etc, but that's not the point here). Therefore i'm wondering if instead of having a I assume ppl either always or never want this, so using a cheatcode seems a bit overkill to me. |
Yea the title is outdated, the current UX that was agreed on is a flag as described in this comment: #2399 (comment) |
@mds1 should we close this considering that we now have |
Component
Forge
Describe the feature you would like
This cheatcode prints the full string entered and asks you to continue with a Y/N prompt, and reverts if you enter N. The use case here is to confirm deploy parameters in a script in a table or similar before executing the script.
The
vm.toString()
cheatcodes along withstring.concat()
make it simple to put the string together. It should support things like\n
, or some other common syntax used for aligning lines such as rust'sformat!
macro.The benefit to making this a cheatcode instead of putting it in forge-std is to avoid requiring
ffi
for it.Additional context
No response
The text was updated successfully, but these errors were encountered: