| | |
| | | import cc.mrbird.febs.dapp.mapper.DappOnlineTransferDao; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | //import cc.mrbird.febs.job.SystemTradeJob; |
| | | import cc.mrbird.febs.dapp.service.impl.BscCoinContractEvent; |
| | | import cc.mrbird.febs.dapp.service.impl.BscUsdtContractEvent; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.web3j.protocol.core.DefaultBlockParameterName; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.BigInteger; |
| | |
| | | @Autowired |
| | | private BscUsdtContractEvent bscUsdtContractEvent; |
| | | |
| | | @Autowired |
| | | private BscCoinContractEvent bscCoinContractEvent; |
| | | |
| | | @Test |
| | | public void chainListener(){ |
| | | ChainService.contractEventListener(new BigInteger("20767516"), new BigInteger("20767516"), bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); |
| | | // ChainService.contractEventListener(new BigInteger("20895461"), new BigInteger("20895461"), bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); |
| | | ChainService.contractEventListener(new BigInteger("20960373"), new BigInteger("20960373"), bscCoinContractEvent, ChainEnum.BSC_TFC_LISTENER.name()); |
| | | } |
| | | |
| | | @Test |
| | | public void nftTest() { |
| | | ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT("0xdf034cb12a2d42c000a58b582cf61d2b481c42d6"); |
| | | ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT("0x691DEaf9b678Cba6747Eec9a4800a9ad2048E39C"); |
| | | } |
| | | |
| | | @Test |
| | | public void sendMsgTest() { |
| | | // Map<String, String> map = new HashMap<>(); |
| | | // map.put("batchNo", "179"); |
| | | // map.put("type", "flow"); |
| | | // chainProducer.sendOnlineTransfer(JSONObject.toJSONString(map)); |
| | | |
| | | // 发送盲盒消息 |
| | | // chainProducer.sendNftBoxMsg(179L); |
| | | } |
| | | |
| | | @Test |
| | | public void sendCardTest() { |
| | | // ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT("0xbddfb8113ee3871774cb91cf1063cfba2a6becc8"); |
| | | } |
| | | |
| | | @Test |
| | | public void wssTest() { |
| | | ChainService.wssContractEventListener(new BigInteger("20888825"), bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); |
| | | } |
| | | } |