Skip to content
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

bug: txrelayer-fails-with-anvil #159

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

uri-lightblocks
Copy link

@uri-lightblocks uri-lightblocks commented Mar 15, 2024

Description

Fix the txrelayer to work with anvil

  • Use DefaultGasLimit if EstimateGas fails. There is open issue in anvil on creating smart contract
  • Fix the call to FeeHistory, passing empty slice instead of nil

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Please complete this section if you ran manual tests for this functionality, otherwise delete it

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@uri-lightblocks
Copy link
Author

The link to the CLA Document is broken

Comment on lines +185 to +187
// TODO: Add Logger and write the err return ethgo.ZeroHash, fmt.Errorf("failed to estimate gas: %w", err)
// return ethgo.ZeroHash, fmt.Errorf("failed to estimate gas: %w", err)
gasLimit = DefaultGasLimit * 2

Choose a reason for hiding this comment

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

I'm afraid that there would be the cases, where even twice the DefaultGasLimit would not help, because it is probably related to SC logic or other transaction parameters, so even if we set gasLimit to some (reasonable) high value, the transaction would still fail afterwards. So IMO I'd prefer to revert the old behavior.

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