Coverage Summary for Class: Web3 (org.ethereum.rpc)

Class Method, % Line, %
Web3$BlockInformationResult 100% (1/1) 100% (1/1)
Web3$CallArguments 50% (1/2) 50% (1/2)
Web3$FilterRequest 0% (0/2) 0% (0/3)
Web3$SyncingResult 100% (1/1) 100% (1/1)
Total 50% (3/6) 42.9% (3/7)


1 /* 2  * This file is part of RskJ 3  * Copyright (C) 2017 RSK Labs Ltd. 4  * 5  * This program is free software: you can redistribute it and/or modify 6  * it under the terms of the GNU Lesser General Public License as published by 7  * the Free Software Foundation, either version 3 of the License, or 8  * (at your option) any later version. 9  * 10  * This program is distributed in the hope that it will be useful, 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13  * GNU Lesser General Public License for more details. 14  * 15  * You should have received a copy of the GNU Lesser General Public License 16  * along with this program. If not, see <http://www.gnu.org/licenses/>. 17  */ 18  19 package org.ethereum.rpc; 20  21 import co.rsk.config.InternalService; 22 import co.rsk.rpc.*; 23 import co.rsk.scoring.PeerScoringReputationSummary; 24 import co.rsk.scoring.PeerScoringInformation; 25  26 import java.util.Arrays; 27 import java.util.Map; 28  29 public interface Web3 extends InternalService, Web3TxPoolModule, Web3EthModule, Web3EvmModule, Web3MnrModule, Web3DebugModule, Web3TraceModule, Web3RskModule { 30  class SyncingResult { 31  public String startingBlock; 32  public String currentBlock; 33  public String highestBlock; 34  } 35  36  class CallArguments { 37  public String from; 38  public String to; 39  public String gas; 40  public String gasPrice; 41  public String value; 42  public String data; // compiledCode 43  public String nonce; 44  45  @Override 46  public String toString() { 47  return "CallArguments{" + 48  "from='" + from + '\'' + 49  ", to='" + to + '\'' + 50  ", gasLimit='" + gas + '\'' + 51  ", gasPrice='" + gasPrice + '\'' + 52  ", value='" + value + '\'' + 53  ", data='" + data + '\'' + 54  ", nonce='" + nonce + '\'' + 55  '}'; 56  } 57  } 58  59  class BlockInformationResult { 60  public String hash; 61  public String totalDifficulty; 62  public boolean inMainChain; 63  } 64  65  class FilterRequest { 66  public String fromBlock; 67  public String toBlock; 68  public Object address; 69  public Object[] topics; 70  71  @Override 72  public String toString() { 73  return "FilterRequest{" + 74  "fromBlock='" + fromBlock + '\'' + 75  ", toBlock='" + toBlock + '\'' + 76  ", address=" + address + 77  ", topics=" + Arrays.toString(topics) + 78  '}'; 79  } 80  } 81  82  String web3_clientVersion(); 83  String web3_sha3(String data) throws Exception; 84  String net_version(); 85  String net_peerCount(); 86  boolean net_listening(); 87  String[] net_peerList(); 88  String rsk_protocolVersion(); 89  90  // methods required by dev environments 91  Map<String, String> rpc_modules(); 92  93  void db_putString(); 94  void db_getString(); 95  96  void db_putHex(); 97  void db_getHex(); 98  99  String personal_newAccountWithSeed(String seed); 100  String personal_newAccount(String passphrase); 101  String[] personal_listAccounts(); 102  String personal_importRawKey(String key, String passphrase); 103  String personal_sendTransaction(CallArguments transactionArgs, String passphrase) throws Exception; 104  boolean personal_unlockAccount(String key, String passphrase, String duration); 105  boolean personal_lockAccount(String key); 106  String personal_dumpRawKey(String address) throws Exception; 107  108  void sco_banAddress(String address); 109  void sco_unbanAddress(String address); 110  PeerScoringInformation[] sco_peerList(); 111  String[] sco_bannedAddresses(); 112  PeerScoringReputationSummary sco_reputationSummary(); 113 }