-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fees): set tip on Celo from
eth_maxPriorityFeePerGas
(#4444)
### Description We initially got the [recommendation](https://valora-app.slack.com/archives/CNJ7KTHQU/p1697718182062359?thread_ts=1697647756.662059&cid=CNJ7KTHQU) to only set `maxFeePerGas` to the result of `eth_gasPrice` and that the difference between it and the base fee would be the tip distributed to the validator. However after testing, we noticed that if we leave `maxPriorityFeePerGas` to `undefined` (or if we don't specify it), the final serialized tx has is set to `0`. Resulting to `0` tip being effectively distributed to the validator. Which doesn't look right for validators 😄 So here we bring back the original implementation I was originally [proposing](ec11ae7) where we set it to the result of `eth_maxPriorityFeePerGas`. Similar to what [viem does on Ethereum](https://github.com/wagmi-dev/viem/blob/291e9ba2abc1d298d77e5a66f91f85bc54a3d31b/src/actions/public/estimateFeesPerGas.ts#L144-L162). Note: we'll wait for the confirmation from cLabs before merging this though. ### Test plan - Updated tests ### Related issues - N/A ### Backwards compatibility Yes
- Loading branch information
1 parent
b06f1e3
commit b31dfd0
Showing
3 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters