Skip to content

use CallContract to detect tx failure early if gasLimit is specified#13117

Merged
Inphi merged 2 commits intoethereum-optimism:developfrom
zhiqiangxu:opt_craftTx
Nov 29, 2024
Merged

use CallContract to detect tx failure early if gasLimit is specified#13117
Inphi merged 2 commits intoethereum-optimism:developfrom
zhiqiangxu:opt_craftTx

Conversation

@zhiqiangxu
Copy link
Copy Markdown
Contributor

@zhiqiangxu zhiqiangxu commented Nov 27, 2024

Currently if gasLimit is specified in TxCandidate, EstimateGas will be called, which does 2 jobs in one shot:

  1. estimate the gas usage.
  2. detect tx failure before actually sending it onchain.

But if gasLimit is specified, there's no such checking.

This PR adds a checking by CallContract if gasLimit is specified.

@zhiqiangxu zhiqiangxu requested a review from a team as a code owner November 27, 2024 08:25
@zhiqiangxu zhiqiangxu requested a review from Inphi November 27, 2024 08:25
Copy link
Copy Markdown
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

Nice!

@Inphi
Copy link
Copy Markdown
Contributor

Inphi commented Nov 27, 2024

/ci authorize 4a539aa

@zhiqiangxu
Copy link
Copy Markdown
Contributor Author

@Inphi Looks like the CI failure is unrelated to this PR?

@Inphi
Copy link
Copy Markdown
Contributor

Inphi commented Nov 27, 2024

@zhiqiangxu Could you try merging from the latest develop?

@zhiqiangxu
Copy link
Copy Markdown
Contributor Author

@zhiqiangxu Could you try merging from the latest develop?

Done.

@Inphi
Copy link
Copy Markdown
Contributor

Inphi commented Nov 29, 2024

/ci authorize 9c010a7

@Inphi Inphi added this pull request to the merge queue Nov 29, 2024
Merged via the queue into ethereum-optimism:develop with commit 8118fff Nov 29, 2024
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.

2 participants