| | |
| | | |
| | | 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 = "a932e4cc6fd9e4932da90e8dd0c6b2bdbfcdfb54de1ce6b68d854cc9b3c95653"; |
| | | public final static String TRX_ADDRESS = "TJD7nWCAiTiiRoqh7TDjc6wL72YwBi2ef5"; |
| | | public final static String POOL_ADDRESS = "TXBQCyHDmHTauN3nUixjiQT6fK7pvUeKAM"; |
| | | |
| | | 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(); |