-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add the eth_baseFee call #1920
add the eth_baseFee call #1920
Conversation
@rvullriede Can you add some tests for your feature? |
@NickSneo I've added a basic test for this. I also looked at the TransactionDecoderTests but that would require adding the baseFee also to the Transaction1559 (which it technically is) and I'm not sure if you'd support such a bigger change since I assume your main focus is Ethereum, right? |
I think this is good enough, as eth_baseFee api is exclusive to some evm-clients like Avalanche only |
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.
LGTM
@rvullriede Plz add one more test in ResponseTest.java file, just like this - https://github.com/web3j/web3j/blob/99fb8f7512a110a61a1ca4ac6d3a9563c7ccbc46/core/src/test/java/org/web3j/protocol/core/ResponseTest.java#L191 |
Thx for the hint! Done :-) |
pipeline is failing, plz run spotlessApply. Thanks |
Sorry for the noise. Done. |
What does this PR do?
Add another RPC call call "eth_baseFee".
Where should the reviewer start?
Ethereum.java
Why is it needed?
Some EVM-Chains (e.g. Avalanche, see https://docs.avax.network/quickstart/transaction-fees) provide a dedicated RPC call that returns the current base fee. This allows web3j to use such networks as a evm-compatible client that is not restricted to Ethereum alone.