Skip to content

Feat: estimated gas based on tx #209

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Feat: estimated gas based on tx #209

wants to merge 12 commits into from

Conversation

1yam
Copy link
Member

@1yam 1yam commented Mar 31, 2025

When we was checking native token ammount for mananging a flow we was checking based on harcoded value 0.005, on base chain if user have a Payg running but would have only 0.0045 token since base gas fees are lower, the limit should be different,

To resolve this issue we use estimate_gas to estimate the price base on the Tx.

Related ClickUp, GitHub or Jira tickets : ALEPH-496

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
    Changes

This pull request includes several changes to improve transaction handling and validation in the Ethereum and Superfluid connectors. The changes primarily focus on enhancing the accuracy of transaction validation and ensuring that transactions can be simulated before execution.

Enhancements to transaction handling:

  • src/aleph/sdk/chains/ethereum.py: Modified the can_transact method to accept tx parameters and estimate gas for transaction validation. This ensures more accurate validation of whether a transaction can be executed.
  • src/aleph/sdk/chains/ethereum.py: Removed the call to can_transact in _sign_and_send_transaction method, as the validation is now handled elsewhere.

Improvements to Superfluid connector:

@github-actions github-actions bot added the RED This PR is complex and may require more time to review. label Mar 31, 2025
@aleph-im aleph-im deleted a comment from github-actions bot Apr 22, 2025
@1yam 1yam force-pushed the 1yam-fix-estimated-gas branch from 3af3f31 to 6e5e616 Compare April 29, 2025 13:12
nesitor
nesitor previously approved these changes May 7, 2025
@nesitor nesitor force-pushed the 1yam-fix-estimated-gas branch from 6e5e616 to d1920ab Compare May 7, 2025 11:04
@1yam 1yam force-pushed the 1yam-fix-estimated-gas branch from 925d2f8 to b79866b Compare May 27, 2025 13:05
@nesitor nesitor force-pushed the 1yam-fix-estimated-gas branch from b79866b to 2865628 Compare June 11, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RED This PR is complex and may require more time to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants