How to use web3j in java to get the Ethereum new PAIRS event, and get the contract address of the new PAIRS。.
Here is part of my code, I don't know what to do
private static void listenForNewContracts(Web3j web3j) {
try {
web3j.transactionFlowable().subscribe(tx -> {
Transaction transaction = web3j.ethGetTransactionByHash(tx.getHash()).send().getTransaction().get();
}, Throwable::printStackTrace);
} catch (Exception e) {
e.printStackTrace();
}
}