Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
rvullriede committed Aug 1, 2023
1 parent 856cec7 commit 984e617
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/** eth_baseFee. */
public class EthBaseFee extends Response<String> {

public BigInteger getBaseFee() {
return Numeric.decodeQuantity(getResult());
}
Expand Down
7 changes: 7 additions & 0 deletions core/src/test/java/org/web3j/protocol/core/RequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ public void testEthMaxPriorityFeePerGas() throws Exception {
"{\"jsonrpc\":\"2.0\",\"method\":\"eth_maxPriorityFeePerGas\",\"params\":[],\"id\":1}");
}

@Test
public void testEthBaseFee() throws Exception {
web3j.ethBaseFee().send();

verifyResult("{\"jsonrpc\":\"2.0\",\"method\":\"eth_baseFee\",\"params\":[],\"id\":1}");
}

@Test
public void testEthFeeHistory() throws Exception {
web3j.ethFeeHistory(1, DefaultBlockParameterName.LATEST, null).send();
Expand Down

0 comments on commit 984e617

Please sign in to comment.