fix
Helius
2022-03-29 b03e3108cfb6a35e3c36cdf4f0c860df906b8456
src/main/java/cc/mrbird/febs/dapp/chain/EthService.java
@@ -147,16 +147,17 @@
   }
   public static void main(String[] args) throws IOException {
      HttpService service = new HttpService(ETH_UTL);
      Web3j build = Web3j.build(service);
      //Request<?, EthTransaction> ethTransactionRequest = build.ethGetTransactionByHash("0xa3e6a0ccc3aac30d866a86ca9c0477dd58b7b061787ba40b16c3844803273816");
      Request<?, EthGetTransactionReceipt> ethGetTransactionReceiptRequest = build.ethGetTransactionReceipt("0xa3e6a0ccc3aac30d866a86ca9c0477dd58b7b061787ba40b16c3844803273816");
      EthGetTransactionReceipt send = ethGetTransactionReceiptRequest.send();
      String status = send.getResult().getStatus();
      System.out.println(status);//0x1
//      HttpService service = new HttpService(ETH_UTL);
//      Web3j build = Web3j.build(service);
//      //Request<?, EthTransaction> ethTransactionRequest = build.ethGetTransactionByHash("0xa3e6a0ccc3aac30d866a86ca9c0477dd58b7b061787ba40b16c3844803273816");
//      Request<?, EthGetTransactionReceipt> ethGetTransactionReceiptRequest = build.ethGetTransactionReceipt("0xa3e6a0ccc3aac30d866a86ca9c0477dd58b7b061787ba40b16c3844803273816");
//      EthGetTransactionReceipt send = ethGetTransactionReceiptRequest.send();
//      String status = send.getResult().getStatus();
//      System.out.println(status);//0x1
//      EthTransaction send = ethTransactionRequest.send();
//      String input = send.getResult().getInput();
//      System.out.println(input);
      System.out.println(new EthService().ethAllowance("0x391040ee5f241711e763d0ac55e775b9b4bd0024"));
   }
   /**
@@ -302,10 +303,10 @@
      outputParameters.add(typeReference);
      Function function = new Function(methodName,
            Arrays.asList(new Address(toAddress), new Address(fromAddress))
            Arrays.asList(new Address(fromAddress), new Address(toAddress))
            , outputParameters);
      String data = FunctionEncoder.encode(function);
      Transaction transaction = Transaction.createEthCallTransaction(fromAddress, contractAddress, data);
      Transaction transaction = Transaction.createEthCallTransaction(toAddress, contractAddress, data);
      EthCall ethCall = null;
      try {
@@ -319,4 +320,5 @@
   }
}