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

[Submitter] Arbitrum Variable Gas Estimation #1757

Open
trajan0x opened this issue Jan 7, 2024 · 1 comment
Open

[Submitter] Arbitrum Variable Gas Estimation #1757

trajan0x opened this issue Jan 7, 2024 · 1 comment

Comments

@trajan0x
Copy link
Contributor

trajan0x commented Jan 7, 2024

Do correct gas limit estimation based on #1116

@trajan0x trajan0x mentioned this issue Jan 7, 2024
33 tasks
@trajan0x trajan0x added the small label Jun 24, 2024
@trajan0x trajan0x reopened this Jun 24, 2024
@trajan0x trajan0x removed the small label Jun 24, 2024
Copy link

greptile-apps bot commented Jun 24, 2024

To address the issue of correct gas limit estimation for Arbitrum in the Submitter module, follow these steps:

  1. Update getGasEstimate Method in submitter.go:

    • Modify the getGasEstimate method to handle Arbitrum-specific gas estimation logic.
    func (t *txSubmitterImpl) getGasEstimate(ctx context.Context, chainClient client.EVM, chainID int, tx *types.Transaction) (gasEstimate uint64, err error) {
        if chainID == <ArbitrumChainID> {
            // Add Arbitrum-specific gas estimation logic here
            // Example: Use a different method or API to get the gas estimate
        }
        // Existing logic
    }
  2. Update applyGasFromOracle Method in gas_price.go:

    • Ensure that the gas price estimation logic considers Arbitrum-specific requirements.
    func (t *txSubmitterImpl) applyGasFromOracle(ctx context.Context, transactor *bind.TransactOpts, client client.EVM, useDynamic bool) (err error) {
        if chainID == <ArbitrumChainID> {
            // Add Arbitrum-specific gas price logic here
            // Example: Use a different method or API to get the gas price
        }
        // Existing logic
    }
  3. Add Tests in gas_price_test.go:

    • Add tests to ensure the new gas estimation logic for Arbitrum works correctly.
    func (s GasSuite) TestArbitrumGasPriceEstimator() {
        // Add test logic for Arbitrum gas price estimation
    }

Replace <ArbitrumChainID> with the actual chain ID for Arbitrum.

References

/ethergo/submitter/submitter.go
/ethergo/chain/gas/gas_price.go
/ethergo/chain/gas/gas_price_test.go
/ethergo/submitter/README.md
/packages/contracts-core/script/configs

Ask Greptile

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

No branches or pull requests

1 participant