feat: enhance manual-exec to cycle through multiple messages#124
feat: enhance manual-exec to cycle through multiple messages#124thinktanktom wants to merge 2 commits intosmartcontractkit:mainfrom
Conversation
Enhances manual-exec command to allow users to cycle through and execute multiple failed CCIP messages in a single session. Changes: - Wrapped message selection and execution in while(true) loop - Added exit handling when user selects 'Exit' option - Added error handling to prevent loop crashes on execution failures - Moved message fetching outside loop for efficiency Closes smartcontractkit#111
|
@thinktanktom is attempting to deploy a commit to the Chainlink Labs Team on Vercel. A member of the Team first needs to authorize it. |
selectRequest auto-returns when only one message exists, which would cause the loop to execute the same message repeatedly. Added check to exit after executing single-message transactions.
|
Found and fixed a bug: single-message transactions would loop infinitely because Fixed in commit: f1151f5 |
Optional EnhancementWhile implementing this, I considered adding execution tracking to help users keep track of which messages they've already executed in the current session. Would add:
I kept the initial implementation minimal, but happy to add this enhancement if it would improve the UX. Let me know what you think! |
Description
Closes #111
This PR enhances the
manual-execcommand to allow users to cycle through multiple failed CCIP messages in a single session, eliminating the need to run the command multiple times for transactions with multiple messages.Problem
Currently, when a transaction contains multiple CCIP messages (e.g., 6 failed messages), users must run
ccip manual-exec <tx>six separate times—once for each message. This is tedious and time-consuming.Solution
Added a
while(true)loop around message selection and execution that:Changes
while(true)loopCCIPErrorthrown when user selects "Exit"getMessagesInTx()call outside loop to avoid redundant blockchain queriesTesting
npm run build)npm run lint)CCIPErrorinfrastructure)User Experience
Before:
After:
Implementation Notes
selectRequest()utility functionmanual-exec.tsCCIPError, no genericErrorobjects)Checklist
feat:)