Skip to content

improve(Refiller): use ensureConfirmations: true with submitTransaction#3203

Open
nicholaspai wants to merge 2 commits into
masterfrom
ensure-confirmations-refiller
Open

improve(Refiller): use ensureConfirmations: true with submitTransaction#3203
nicholaspai wants to merge 2 commits into
masterfrom
ensure-confirmations-refiller

Conversation

@nicholaspai
Copy link
Copy Markdown
Member

No need to .wait() when using submitTransactions with ensureConfirmations: true

No need to .wait() when using submitTransactions with ensureConfirmations: true
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

transactionHash: blockExplorerLink(txn.transactionHash, chainId),

P2 Badge Use response hash when logging bridge refill tx

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".

@nicholaspai
Copy link
Copy Markdown
Member Author

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/refiller/Refiller.ts
Comment on lines +358 to +362
txn = await submitTransaction(
{
contract: contract,
method: method,
args: args,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant