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

Removing 3 gwei floor on 1559 gas price estimate #8

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

aroralanuk
Copy link

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@aroralanuk aroralanuk changed the base branch from master to hyperlane November 8, 2023 23:29
ethers-core/src/utils/mod.rs Outdated Show resolved Hide resolved
ethers-core/src/utils/mod.rs Outdated Show resolved Hide resolved
ethers-core/src/utils/mod.rs Outdated Show resolved Hide resolved
@@ -434,15 +434,10 @@ pub fn parse_bytes32_string(bytes: &[u8; 32]) -> Result<&str, ConversionError> {

/// The default EIP-1559 fee estimator which is based on the work by [MyCrypto](https://github.com/MyCryptoHQ/MyCrypto/blob/master/src/services/ApiService/Gas/eip1559.ts)
pub fn eip1559_default_estimator(base_fee_per_gas: U256, rewards: Vec<Vec<U256>>) -> (U256, U256) {
let max_priority_fee_per_gas =
if base_fee_per_gas < U256::from(EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER) {
Copy link

Choose a reason for hiding this comment

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

having a hard time understanding why this was fine to remove

@tkporter
Copy link

Reverted the formatting issues and added back the if base_fee_per_gas < U256::from(EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER) { logic. Lmk if this was removed for a strong reason - just need to merge this because I'll be pulling some upstream changes into our for

@tkporter tkporter merged commit 4a4901f into hyperlane Nov 29, 2023
tkporter added a commit to hyperlane-xyz/hyperlane-monorepo that referenced this pull request Nov 29, 2023
### Description

Uses a version of our ethers fork with
hyperlane-xyz/ethers-rs#10, which adds back a
change that I had reverted from
hyperlane-xyz/ethers-rs#8

This is required to fix bsc / bsctestnet txs, where the base fee is 0
and we want to estimate the priority fee

### Drive-by changes

n/a

### Related issues

n/a

### Backward compatibility

ye

### Testing
deployed and saw successful bsc / bsctestnet msgs
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.

3 participants