| | |
| | | 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.rabbit.producer.ChainProducer; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.junit.jupiter.api.Test; |
| | |
| | | |
| | | @Autowired |
| | | private DappFundFlowDao dappFundFlowDao; |
| | | |
| | | @Autowired |
| | | private ChainProducer chainProducer; |
| | | // String address = dappMemberEntity.getAddress(); |
| | | // String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount); |
| | | // if(StrUtil.isEmpty(hash)){ |
| | |
| | | // } |
| | | @Test |
| | | public void tranfer(){ |
| | | String address = "0xD9076245473060DDa1a65f5f3D89a4D0598995E6"; |
| | | BigDecimal amount = new BigDecimal("0.0009"); |
| | | String address = "0xd9076245473060dda1a65f5f3d89a4d0598995e6"; |
| | | BigDecimal amount = new BigDecimal("0.00005000"); |
| | | String hash = ChainService.getInstance(ChainEnum.BNB.name()).transferBaseToken(address, amount); |
| | | //// 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); |
| | | System.out.println(hash); |
| | | |
| | | //发送转币消息 |
| | | // chainProducer.sendBnbTransferMsg(93L); |
| | | // chainProducer.sendBnbTransferMsg(94L); |
| | | // chainProducer.sendBnbTransferMsg(95L); |
| | | // chainProducer.sendBnbTransferMsg(96L); |
| | | } |
| | | |
| | | @Test |