| | |
| | | import cc.mrbird.febs.dapp.chain.ChainEnum; |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import cc.mrbird.febs.dapp.chain.ContractChainService; |
| | | import cc.mrbird.febs.dapp.contract.andao.AndaoContractMain; |
| | | import cc.mrbird.febs.dapp.entity.DappFundFlowEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappOnlineTransferEntity; |
| | | import cc.mrbird.febs.dapp.enumerate.CardPeriod; |
| | |
| | | import org.web3j.protocol.http.HttpService; |
| | | import org.web3j.protocol.websocket.WebSocketClient; |
| | | import org.web3j.protocol.websocket.WebSocketService; |
| | | import org.web3j.utils.Convert; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.BigInteger; |
| | | import java.math.RoundingMode; |
| | | import java.net.URI; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | // |
| | | // @Test |
| | | // public void chainListener(){ |
| | | // ChainService.contractEventListener(new BigInteger("22934633"), new BigInteger("22934633"), bscUsdtContractEvent, ChainEnum.BSC_USDT.name()); |
| | | // String address = "0xA60AaC0da34C76F3f60207ee09e9F75043319ab4"; |
| | | // BigDecimal amount = new BigDecimal("0.01"); |
| | | // |
| | | //// ChainService.contractEventListener(new BigInteger("20860178"), new BigInteger("20860178"), bscCoinContractEvent, ChainEnum.BSC_TFC.name()); |
| | | // String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL_CONTRACT.name()).transferUSDT(address, amount); |
| | | // |
| | | // System.out.println(hash); |
| | | // |
| | | // } |
| | | // |
| | |
| | | // HttpService service = new HttpService("https://bsc-dataseed1.ninicoin.io"); |
| | | // Web3j web3j = Web3j.build(service); |
| | | // |
| | | //// EthFilter filter = getFilter(startBlock, null, "0xd9076245473060dda1a65f5f3d89a4d0598995e6"); |
| | | //// EthFilter filter = getFilter(startBlock, null, "0xA60AaC0da34C76F3f60207ee09e9F75043319ab4"); |
| | | //// |
| | | //// Flowable<Log> eventFlowable = web3j.ethLogFlowable(filter); |
| | | //// Disposable subscribe = eventFlowable.subscribe(log -> { |