| | |
| | | } |
| | | |
| | | private static String blockchainNode = "http://120.55.86.146:8545"; |
| | | //private static String blockchainNode = "http://47.75.209.83:10098"; |
| | | |
| | | private static String contractAddr = "0xdac17f958d2ee523a2206206994597c13d831ec7"; |
| | | |
| | |
| | | // 获取最新区块 |
| | | String string = redisUtils.getString(USDT_BLOCK_NUM_GOLDEN); |
| | | if(string==null){ |
| | | string = "11014249"; |
| | | string = "11090000"; |
| | | } |
| | | BigInteger blockNum = new BigInteger(string); |
| | | Credentials credentials = Credentials.create(privateKey); |
| | |
| | | map.put("blockNum",blockNum); |
| | | contract.transferEventFlowable(filter).subscribe(e->{ |
| | | if(e!=null && StringUtils.isNotBlank(e.to) && e.log.getBlockNumber()!=null){ |
| | | System.out.println("扫快:"+e); |
| | | String transactionHash = e.log.getTransactionHash(); |
| | | BigInteger blockNumber1 = e.log.getBlockNumber(); |
| | | String toAddress = e.to; |