Skip to content

Commit

Permalink
add the eth_getProof call
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Jul 19, 2023
1 parent 4372a5b commit 7df3b68
Show file tree
Hide file tree
Showing 6 changed files with 535 additions and 0 deletions.
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 @@ -39,6 +39,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 @@ -202,6 +203,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 @@ -51,6 +51,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 @@ -568,6 +569,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 7df3b68

Please sign in to comment.