| | |
| | | |
| | | private final static String FULL_NODE_URL = "https://api.trongrid.io"; |
| | | |
| | | public final static String TRX_PRIVATE_KEY = "ea176fff7ba171154aed643321d1f9ba239e128124d8ffa5d075575ef3b58f81"; |
| | | public final static String TRX_ADDRESS = "TPSPfAZ8UG9WiXDNX6SbYHNpX46oLV6xAs"; |
| | | public final static String POOL_ADDRESS = "TPSPfAZ8UG9WiXDNX6SbYHNpX46oLV6xAs"; |
| | | public final static String TRX_PRIVATE_KEY = "a3f6e445fb7e8b835f84431cc6f4ffc991745338d61d9b2ca1575b822563e1f4"; |
| | | public final static String TRX_ADDRESS = "TUEZxDjAKw6aCwQJVKX9RGWZUKDyzFkunA"; |
| | | public final static String POOL_ADDRESS = "TXeawtLhKDPYKFhET1MnHRMXYVKPo5ThxB"; |
| | | |
| | | public final static String API_KEY="a7b0c96a-cfcd-474d-88c5-75c6277fedbf"; |
| | | |
| | | |
| | | /** |
| | |
| | | public static void sendTrx(String sendPrivateKey,String receiveAddress,BigDecimal amount) { |
| | | TrxService service = new TrxService(); |
| | | try { |
| | | TransactionResult transactionResult = service.testSendTrxTransaction(sendPrivateKey, receiveAddress, amount); |
| | | TransactionResult transactionResult = service.testSendTrxTransaction(sendPrivateKey, receiveAddress, amount,API_KEY); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | public static void sendTrc20(String sendPrivateKey,String receiveAddress,BigDecimal amount){ |
| | | TrxService service = new TrxService(); |
| | | try { |
| | | TransactionResult transactionResult = service.sendTrc20TransactionTest(sendPrivateKey, receiveAddress, amount); |
| | | TransactionResult transactionResult = service.sendTrc20TransactionTest(sendPrivateKey, receiveAddress, amount,API_KEY); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | public static BigDecimal getTrxBalance(String address){ |
| | | TrxService service = new TrxService(); |
| | | try { |
| | | BigDecimal trxBalanceTest = service.getTrxBalanceTest(address); |
| | | BigDecimal trxBalanceTest = service.getTrxBalanceTest(address,API_KEY); |
| | | return trxBalanceTest; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | public static BigDecimal getTrc20Balance(String address){ |
| | | TrxService service = new TrxService(); |
| | | try { |
| | | BigDecimal trxBalanceTest = service.trc20BalanceOfTest(address); |
| | | BigDecimal trxBalanceTest = service.trc20BalanceOfTest(address,API_KEY); |
| | | return trxBalanceTest; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |