umbracle / ethgo

Ethereum Golang API
https://www.ethgoproject.io
Mozilla Public License 2.0
484 stars 134 forks source link

Expose `eth_maxPriorityFeePerGas` JSON RPC function #251

Closed Stefan-Ethernal closed 1 year ago

Stefan-Ethernal commented 1 year ago

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, so gasPrice is not included for dynamic fee transactions anymore.

Also, rename the eth_feeHistory parameters to be aligned with the specification and also provide the rewardPercentiles parameter (https://docs.alchemy.com/reference/eth-feehistory).

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ethgo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 0:45am