Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
172c3d74
Unverified
Commit
172c3d74
authored
Mar 16, 2022
by
Conner Fromknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: use SuggestGasTipCap fallback when not using Alchemy
parent
99021e29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
blue-carrots-vanish.md
.changeset/blue-carrots-vanish.md
+5
-0
server.go
go/teleportr/api/server.go
+11
-1
No files found.
.changeset/blue-carrots-vanish.md
0 → 100644
View file @
172c3d74
---
'
@eth-optimism/teleportr'
:
patch
---
Add SuggestGasTipCap fallback
go/teleportr/api/server.go
View file @
172c3d74
...
...
@@ -17,6 +17,7 @@ import (
bsscore
"github.com/ethereum-optimism/optimism/go/bss-core"
"github.com/ethereum-optimism/optimism/go/bss-core/dial"
"github.com/ethereum-optimism/optimism/go/bss-core/drivers"
"github.com/ethereum-optimism/optimism/go/bss-core/txmgr"
"github.com/ethereum-optimism/optimism/go/teleportr/bindings/deposit"
"github.com/ethereum-optimism/optimism/go/teleportr/db"
...
...
@@ -346,7 +347,16 @@ func (s *Server) HandleEstimate(
gasTipCap
,
err
:=
s
.
l1Client
.
SuggestGasTipCap
(
ctx
)
if
err
!=
nil
{
rpcErrorsTotal
.
WithLabelValues
(
"suggest_gas_tip_cap"
)
.
Inc
()
return
err
// If the request failed because the backend does not support
// eth_maxPriorityFeePerGas, fallback to using the default constant.
// Currently Alchemy is the only backend provider that exposes this
// method, so in the event their API is unreachable we can fallback to a
// degraded mode of operation. This also applies to our test
// environments, as hardhat doesn't support the query either.
if
!
drivers
.
IsMaxPriorityFeePerGasNotFoundError
(
err
)
{
return
err
}
gasTipCap
=
drivers
.
FallbackGasTipCap
}
header
,
err
:=
s
.
l1Client
.
HeaderByNumber
(
ctx
,
nil
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment