| | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.dapp.chain.ChainEnum; |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import cc.mrbird.febs.dapp.entity.DappFundFlowEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.mapper.DappFundFlowDao; |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | |
| | | @Autowired |
| | | private DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | @Autowired |
| | | private DappFundFlowDao dappFundFlowDao; |
| | | // 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"; |
| | | String address = "0xc27a91615d9fe5b7e18daae0a6d1cbd1a9e77b81"; |
| | | BigDecimal amount = new BigDecimal("0.0009"); |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount); |
| | | if(StrUtil.isEmpty(hash)){ |
| | | return; |
| | | } |
| | | 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); |
| | | } |
| | | |
| | | @Test |
| | | public void balance() { |
| | | BigDecimal hash = ChainService.getInstance(ChainEnum.BNB.name()).balanceOfBaseToken(ChainEnum.BNB.getAddress()); |
| | | System.out.println(hash); |
| | | } |
| | | |