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
debd40fb
Unverified
Commit
debd40fb
authored
Sep 09, 2022
by
Mark Tyneway
Committed by
GitHub
Sep 09, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3378 from ethereum-optimism/fix/l2-geth-estimate-gas-blocktag
l2geth: add block tag to `eth_estimateGas`
parents
c0c1bea8
bc4a1550
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
brave-garlics-sniff.md
.changeset/brave-garlics-sniff.md
+5
-0
api.go
l2geth/internal/ethapi/api.go
+6
-3
No files found.
.changeset/brave-garlics-sniff.md
0 → 100644
View file @
debd40fb
---
'
@eth-optimism/l2geth'
:
patch
---
Add the gas estimation block tag to
`eth_estimateGas`
to be RPC compliant
l2geth/internal/ethapi/api.go
View file @
debd40fb
...
@@ -1062,9 +1062,12 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
...
@@ -1062,9 +1062,12 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
// EstimateGas returns an estimate of the amount of gas needed to execute the
// EstimateGas returns an estimate of the amount of gas needed to execute the
// given transaction against the current pending block. This is modified to
// given transaction against the current pending block. This is modified to
// encode the fee in wei as gas price is always 1
// encode the fee in wei as gas price is always 1
func
(
s
*
PublicBlockChainAPI
)
EstimateGas
(
ctx
context
.
Context
,
args
CallArgs
)
(
hexutil
.
Uint64
,
error
)
{
func
(
s
*
PublicBlockChainAPI
)
EstimateGas
(
ctx
context
.
Context
,
args
CallArgs
,
blockNrOrHash
*
rpc
.
BlockNumberOrHash
)
(
hexutil
.
Uint64
,
error
)
{
blockNrOrHash
:=
rpc
.
BlockNumberOrHashWithNumber
(
rpc
.
PendingBlockNumber
)
bNrOrHash
:=
rpc
.
BlockNumberOrHashWithNumber
(
rpc
.
PendingBlockNumber
)
return
DoEstimateGas
(
ctx
,
s
.
b
,
args
,
blockNrOrHash
,
s
.
b
.
RPCGasCap
())
if
blockNrOrHash
!=
nil
{
bNrOrHash
=
*
blockNrOrHash
}
return
DoEstimateGas
(
ctx
,
s
.
b
,
args
,
bNrOrHash
,
s
.
b
.
RPCGasCap
())
}
}
// ExecutionResult groups all structured logs emitted by the EVM
// ExecutionResult groups all structured logs emitted by the EVM
...
...
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