-
Notifications
You must be signed in to change notification settings - Fork 135
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
Expose eth_maxPriorityFeePerGas
JSON RPC function
#251
Expose eth_maxPriorityFeePerGas
JSON RPC function
#251
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
eth_maxPriorityFeePerGas
eth_maxPriorityFeePerGas
JSON RPC function
b504bcd
to
ff3c370
Compare
jsonrpc/eth_test.go
Outdated
@@ -401,3 +401,40 @@ func TestEthFeeHistory(t *testing.T) { | |||
assert.NoError(t, err) | |||
assert.NotNil(t, fee) | |||
} | |||
|
|||
func TestEthMaxPriorityFeePerGas(t *testing.T) { | |||
s := testutil.DeployTestServer(t, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use s := testutil.NewTestServer(t)
instead? I am trying not to deploy a new server for each unit test as it was done before. Otherwise, it taxes too much the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 2be2739
…rameter to the function
3d60565
to
647d932
Compare
This PR exposes the
eth_maxPriorityFeePerGas
endpoint, which is introduced with EIP-1559. It also added a unit test that tests it. However, when such a unit test was introduced, it was realized that with the current implementation, it was impossible to send dynamic fee transactions, because of the following error returned from Geth:both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified
. That is why transaction marshaling and unmarshalling logic needed to be changed, sogasPrice
is not included for dynamic fee transactions anymore.Also, rename the
eth_feeHistory
parameters to be aligned with the specification and also provide therewardPercentiles
parameter (https://docs.alchemy.com/reference/eth-feehistory).