org.web3j.protocol.core.Request.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(197)

本文整理了Java中org.web3j.protocol.core.Request.<init>方法的一些代码示例,展示了Request.<init>的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.<init>方法的具体详情如下:
包路径:org.web3j.protocol.core.Request
类名称:Request
方法名:<init>

Request.<init>介绍

暂无

代码示例

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, ParityAddressesResponse> parityGetNewDappsAddresses() {
  3. return new Request<>(
  4. "parity_getNewDappsAddresses",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. ParityAddressesResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, BooleanResponse> parityKillAccount(String accountId, String password) {
  3. return new Request<>(
  4. "parity_killAccount",
  5. Arrays.asList(accountId, password),
  6. web3jService,
  7. BooleanResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, ParityListRecentDapps> parityListRecentDapps() {
  3. return new Request<>(
  4. "parity_listRecentDapps",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. ParityListRecentDapps.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, BooleanResponse> minerStop() {
  3. return new Request<>(
  4. "miner_stop",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. BooleanResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, NetVersion> netVersion() {
  3. return new Request<>(
  4. "net_version",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. NetVersion.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthGetBlockTransactionCountByHash> ethGetBlockTransactionCountByHash(
  3. String blockHash) {
  4. return new Request<>(
  5. "eth_getBlockTransactionCountByHash",
  6. Arrays.asList(blockHash),
  7. web3jService,
  8. EthGetBlockTransactionCountByHash.class);
  9. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction>
  3. ethSendTransaction(
  4. Transaction transaction) {
  5. return new Request<>(
  6. "eth_sendTransaction",
  7. Arrays.asList(transaction),
  8. web3jService,
  9. org.web3j.protocol.core.methods.response.EthSendTransaction.class);
  10. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction>
  3. ethSendRawTransaction(
  4. String signedTransactionData) {
  5. return new Request<>(
  6. "eth_sendRawTransaction",
  7. Arrays.asList(signedTransactionData),
  8. web3jService,
  9. org.web3j.protocol.core.methods.response.EthSendTransaction.class);
  10. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthEstimateGas> ethEstimateGas(Transaction transaction) {
  3. return new Request<>(
  4. "eth_estimateGas",
  5. Arrays.asList(transaction),
  6. web3jService,
  7. EthEstimateGas.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthCompileLLL> ethCompileLLL(String sourceCode) {
  3. return new Request<>(
  4. "eth_compileLLL",
  5. Arrays.asList(sourceCode),
  6. web3jService,
  7. EthCompileLLL.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthLog> ethGetLogs(
  3. org.web3j.protocol.core.methods.request.EthFilter ethFilter) {
  4. return new Request<>(
  5. "eth_getLogs",
  6. Arrays.asList(ethFilter),
  7. web3jService,
  8. EthLog.class);
  9. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, BooleanResponse> clicqueDiscard(String address) {
  3. return new Request<>(
  4. "clique_discard",
  5. Arrays.asList(address),
  6. web3jService,
  7. BooleanResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, PantheonFullDebugTraceResponse> debugTraceTransaction(
  3. String transactionHash, Map<String, Boolean> options) {
  4. return new Request<>(
  5. "debug_traceTransaction",
  6. Arrays.asList(transactionHash, options),
  7. web3jService,
  8. PantheonFullDebugTraceResponse.class);
  9. }
  10. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, MinerStartResponse> minerStart() {
  3. return new Request<>(
  4. "miner_start",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. MinerStartResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, PantheonEthAccountsMapResponse> cliqueProposals() {
  3. return new Request<>(
  4. "clique_proposals",
  5. Collections.<String>emptyList(),
  6. web3jService,
  7. PantheonEthAccountsMapResponse.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. public Flowable<PendingTransactionNotification> newPendingTransactionsNotifications() {
  2. return web3jService.subscribe(
  3. new Request<>(
  4. "eth_subscribe",
  5. Arrays.asList("newPendingTransactions"),
  6. web3jService,
  7. EthSubscribe.class),
  8. "eth_unsubscribe",
  9. PendingTransactionNotification.class
  10. );
  11. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthGetBlockTransactionCountByNumber> ethGetBlockTransactionCountByNumber(
  3. DefaultBlockParameter defaultBlockParameter) {
  4. return new Request<>(
  5. "eth_getBlockTransactionCountByNumber",
  6. Arrays.asList(defaultBlockParameter.getValue()),
  7. web3jService,
  8. EthGetBlockTransactionCountByNumber.class);
  9. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, EthLog> ethGetFilterChanges(BigInteger filterId) {
  3. return new Request<>(
  4. "eth_getFilterChanges",
  5. Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
  6. web3jService,
  7. EthLog.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. @Override
  2. public Request<?, ShhMessages> shhGetFilterChanges(BigInteger filterId) {
  3. return new Request<>(
  4. "shh_getFilterChanges",
  5. Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
  6. web3jService,
  7. ShhMessages.class);
  8. }

代码示例来源:origin: web3j/web3j

  1. protected <T extends Response> T deserialiseResponse(Class<T> type) {
  2. T response = null;
  3. try {
  4. response = web3jService.send(new Request(), type);
  5. } catch (IOException e) {
  6. fail(e.getMessage());
  7. }
  8. return response;
  9. }

相关文章