| | |
| | | import cc.mrbird.febs.dapp.mapper.DappFundFlowDao; |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | //// if(StrUtil.isEmpty(hash)){ |
| | | //// return; |
| | | //// } |
| | | // BigDecimal balance = ChainService.getInstance(ChainEnum.WBNB.name()).balanceOf(ChainEnum.WBNB.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); |
| | | // 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); |
| | | // System.out.println(balance); |
| | | |
| | | |
| | | dappSystemService.bnbTransferTest(36L); |
| | | |
| | | |
| | | //发送转币消息 |
| | |
| | | |
| | | @Autowired |
| | | private SystemConstants systemConstants; |
| | | @Autowired |
| | | private DappSystemService dappSystemService; |
| | | @Test |
| | | public void balance() { |
| | | /** |
| | | * 从contractAddress合约地址中转移对应发行的代币到address中 |
| | | */ |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer("0x785D5Aa2951Ac4C6f28Dc593AF0b0536Dd3E82Fe",new BigDecimal(100)); |
| | | System.out.println(hash); |
| | | dappSystemService.bnbTransfer(6L); |
| | | } |
| | | |
| | | @Test |