| | |
| | | } |
| | | |
| | | // 区块链节点地址 TODO |
| | | private static String blockchainNode = "https://bsc-dataseed.binance.org"; |
| | | // private static String blockchainNode = "https://bsc-dataseed.binance.org"; |
| | | private static String blockchainNode = "https://bsc-dataseed1.ninicoin.io"; |
| | | |
| | | // 合约地址 TODO |
| | | private static String contractAddr = "0x7FDD62bA4451ABB40d72C6690088755115bFf9d7"; |
| | |
| | | List<DappFundFlowEntity> dappFundFlowEntities = dappFundFlowDao.selectListByState(DappFundFlowEntity.WITHDRAW_STATUS_ING); |
| | | if(CollUtil.isNotEmpty(dappFundFlowEntities)){ |
| | | for(DappFundFlowEntity dappFundFlowEntity : dappFundFlowEntities){ |
| | | |
| | | //发送转币消息 |
| | | chainProducer.sendBnbTransferMsg(dappFundFlowEntity.getId()); |
| | | // DappMemberEntity dappMember = dappMemberDao.selectById(dappFundFlowEntity.getMemberId()); |
| | | // trans(new BigInteger(dappFundFlowEntity.getAmount().toString()),dappMember.getAddress()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | return transactionHash; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | ContractMain contractMain = new ContractMain(); |
| | | |
| | | String address = "0xd9076245473060dda1a65f5f3d89a4d0598995e6"; |
| | | BigInteger bigInteger = new BigInteger(Convert.toWei("0.0003", Convert.Unit.ETHER).setScale(0).toString()); |
| | | String hash = contractMain.trans(bigInteger,address); |
| | | System.out.println(hash); |
| | | } |
| | | } |