Skip to content

Commit

Permalink
Merge pull request #1930 from thinkAfCod/feature/eth_getProof
Browse files Browse the repository at this point in the history
add the eth_getProof call
  • Loading branch information
NickSneo authored Aug 3, 2023
2 parents c88d5fa + 9e6009b commit 6e98ad6
Show file tree
Hide file tree
Showing 6 changed files with 534 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/src/main/java/org/web3j/protocol/core/Ethereum.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber;
import org.web3j.protocol.core.methods.response.EthGetCode;
import org.web3j.protocol.core.methods.response.EthGetCompilers;
import org.web3j.protocol.core.methods.response.EthGetProof;
import org.web3j.protocol.core.methods.response.EthGetStorageAt;
import org.web3j.protocol.core.methods.response.EthGetTransactionCount;
import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt;
Expand Down Expand Up @@ -205,6 +206,8 @@ Request<?, EthBlock> ethGetUncleByBlockNumberAndIndex(

Request<?, EthLog> ethGetLogs(org.web3j.protocol.core.methods.request.EthFilter ethFilter);

Request<?, EthGetProof> ethGetProof(String address, List<String> storageKeys, String quantity);

Request<?, EthGetWork> ethGetWork();

Request<?, EthSubmitWork> ethSubmitWork(String nonce, String headerPowHash, String mixDigest);
Expand Down
11 changes: 11 additions & 0 deletions core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.web3j.protocol.core.methods.response.EthGetBlockTransactionCountByNumber;
import org.web3j.protocol.core.methods.response.EthGetCode;
import org.web3j.protocol.core.methods.response.EthGetCompilers;
import org.web3j.protocol.core.methods.response.EthGetProof;
import org.web3j.protocol.core.methods.response.EthGetStorageAt;
import org.web3j.protocol.core.methods.response.EthGetTransactionCount;
import org.web3j.protocol.core.methods.response.EthGetTransactionReceipt;
Expand Down Expand Up @@ -575,6 +576,16 @@ public Request<?, EthLog> ethGetLogs(
return new Request<>("eth_getLogs", Arrays.asList(ethFilter), web3jService, EthLog.class);
}

@Override
public Request<?, EthGetProof> ethGetProof(
String address, List<String> storageKeys, String quantity) {
return new Request<>(
"eth_getProof",
Arrays.asList(address, storageKeys, quantity),
web3jService,
EthGetProof.class);
}

@Override
public Request<?, EthGetWork> ethGetWork() {
return new Request<>(
Expand Down
Loading

0 comments on commit 6e98ad6

Please sign in to comment.