improve(Refiller): use ensureConfirmations: true with submitTransaction#3203
improve(Refiller): use ensureConfirmations: true with submitTransaction#3203nicholaspai wants to merge 2 commits into
Conversation
No need to .wait() when using submitTransactions with ensureConfirmations: true
There was a problem hiding this comment.
💡 Codex Review
relayer/src/refiller/Refiller.ts
Line 385 in d356d9d
After switching this path to submitTransaction(...) without .wait(), txn is a TransactionResponse, but the log still reads txn.transactionHash in the same function. TransactionResponse uses hash, so this now feeds an undefined tx id into blockExplorerLink, resulting in incorrect transaction references for refill operations.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac40be4b06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| txn = await submitTransaction( | ||
| { | ||
| contract: contract, | ||
| method: method, | ||
| args: args, |
There was a problem hiding this comment.
Wait for receipt before marking refill as completed
This refactor removes the explicit .wait() and now assumes submitTransaction(..., ensureConfirmation: true) guarantees finality, but TransactionClient#_submit can still return a TransactionResponse without a receipt when confirmation polling exhausts retries (it logs and returns around src/clients/TransactionClient.ts lines 146-183). In that scenario this function will log success and set the Redis refill:* key, suppressing retries for refillPeriod even though the bridge transaction may still be unconfirmed or dropped.
Useful? React with 👍 / 👎.
No need to .wait() when using submitTransactions with ensureConfirmations: true