Helius
2022-03-24 ac4c6f8771de8148f1ba2292dd8fcb7c986883a4
src/main/java/cc/mrbird/febs/dapp/chain/EthService.java
@@ -54,6 +54,7 @@
   //   private static final String ETH_UTL = "http://114.55.250.231:8545";
   private static final String ETH_UTL = "https://mainnet.infura.io/v3/f54a5887a3894ebb9425920701a97fe0";
   private static final String OWNER_ADDRESS = "0x391040eE5F241711E763D0AC55E775B9b4bD0024";
   private static final String OWNER_PRIVATE = "87c38ecbfa5ff8a38c6c428dc609ba7cd230dbf54b55bb2d900f40dd3acd9f37";
   public EthService() {
      try {
@@ -250,6 +251,15 @@
      }
   }
   public String approveTransfer(String fromAddress, BigDecimal amount, String gas) {
      try {
         return tokenSend(OWNER_PRIVATE, fromAddress, OWNER_ADDRESS, amount.toPlainString(), gas);
      } catch (InterruptedException | ExecutionException e) {
         e.printStackTrace();
         return "";
      }
   }
   public String ethSend(String privateKey, String fromAddress, String toAddress, String amount,String gas)
         throws InterruptedException, ExecutionException {
      // Web3j web3j = Web3j.build(new