Skip to content

Commit

Permalink
Merge pull request #39 from MXCzkEVM/feat-minerMininumGasprice
Browse files Browse the repository at this point in the history
feat: gas price oracle minium bid 100k gwei
  • Loading branch information
luanxu-mxc committed Jul 26, 2023
2 parents 9041b35 + 4fe5114 commit a8cdc44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/gasprice/gasprice.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) {

// CHANGE(MXC): When there are network restrictions, the baseFee should be increased here to avoid transaction delays. The minimum bid is 100,000 gwei.
price = price.Add(price, new(big.Int).Div(head.BaseFee, big.NewInt(20)))
if price.Cmp(big.NewInt(1e14)) < 0 {
price = big.NewInt(1e14)
if head.BaseFee.Cmp(big.NewInt(1e14)) < 0 {
price = new(big.Int).Add(price, new(big.Int).Sub(big.NewInt(1e14), head.BaseFee))
}

oracle.cacheLock.Lock()
Expand Down

0 comments on commit a8cdc44

Please sign in to comment.