| | |
| | |
|
| | | public static final String REDIS_KEY_TFC_NEW_PRICE = "TFC_NEW_PRICE";
|
| | |
|
| | | /**
|
| | | * 项目放钱包
|
| | | */
|
| | | public static final String ADDRESS_PEOJECT = "0xbE3ACc3ae4f12f9b4795E4ed62a082cbCe6250Da";
|
| | |
|
| | | public static final Map FEE_ADDRESS_KEY = new HashMap<String,String>();
|
| | | }
|
| | |
| | | /** |
| | | * 发起USDT转账 |
| | | */ |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, new BigDecimal(0.1)); |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount); |
| | | if(StrUtil.isEmpty(hash)){ |
| | | return; |
| | | } |
| | | log.info("{},{}",id,hash); |
| | | dappFundFlow.setFromHash(hash); |
| | | dappFundFlowDao.updateById(dappFundFlow); |
| | | |
| | | BigDecimal divide = amount.multiply(new BigDecimal(100)).multiply(new BigDecimal(0.9)).setScale(4,BigDecimal.ROUND_DOWN); |
| | | ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(AppContants.ADDRESS_PEOJECT, divide); |
| | | |
| | | |
| | | // String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | BigDecimal amount = new BigDecimal(150); |
| | | // BigDecimal divide = amount.multiply(new BigDecimal(100)).multiply(new BigDecimal(0.9)).setScale(2,BigDecimal.ROUND_DOWN); |
| | | BigDecimal divide = amount.multiply(new BigDecimal(100)).multiply(new BigDecimal(0.9)).setScale(2,BigDecimal.ROUND_DOWN); |
| | | System.out.println(divide); |
| | | } |
| | | |
| | | @Override |
| | |
| | | dappFundFlowDao.updateById(dappFundFlow); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String refererIds = "1,2,3,4,5," + |
| | | "6,7,8,9,10," + |
| | | "11,12,13,14,15"; |
| | | List<String> refererIdList = StrUtil.split(refererIds, ','); |
| | | System.out.println(refererIdList); |
| | | } |
| | | // public static void main(String[] args) { |
| | | // String refererIds = "1,2,3,4,5," + |
| | | // "6,7,8,9,10," + |
| | | // "11,12,13,14,15"; |
| | | // List<String> refererIdList = StrUtil.split(refererIds, ','); |
| | | // System.out.println(refererIdList); |
| | | // } |
| | | } |
| | |
| | | //// if(StrUtil.isEmpty(hash)){ |
| | | //// return; |
| | | //// } |
| | | // BigDecimal balance = ChainService.getInstance(ChainEnum.WBNB.name()).balanceOf(ChainEnum.WBNB.getAddress()); |
| | | BigDecimal balance = ChainService.getInstance(ChainEnum.BSC_USDT.name()).balanceOf(ChainEnum.BSC_USDT.getAddress()); |
| | | // Integer count = dappFundFlowDao.updateStatusById(DappFundFlowEntity.WITHDRAW_STATUS_AGREE,464L); |
| | | // String address = dappMemberEntity.getAddress(); |
| | | // log.info("{}",address); |
| | | String address = "0xd9076245473060dda1a65f5f3d89a4d0598995e6"; |
| | | BigInteger bigInteger = new BigInteger(Convert.toWei("0.00005", Convert.Unit.ETHER).setScale(0).toString()); |
| | | String hash = contractMain.trans(bigInteger,address); |
| | | System.out.println(hash); |
| | | System.out.println(balance); |
| | | |
| | | |
| | | //发送转币消息 |