@Test public void testExtractEventParametersWithLogGivenATransactionReceipt() { final java.util.function.Function<String, Event> eventFactory = name -> new Event(name, emptyList(), emptyList()); final BiFunction<Integer, Event, Log> logFactory = (logIndex, event) -> new Log(false, "" + logIndex, "0", "0x0", "0x0", "0", "0x" + logIndex, "", "", singletonList(EventEncoder.encode(event))); final Event testEvent1 = eventFactory.apply("TestEvent1"); final Event testEvent2 = eventFactory.apply("TestEvent2"); final List<Log> logs = Arrays.asList( logFactory.apply(0, testEvent1), logFactory.apply(1, testEvent2) ); final TransactionReceipt transactionReceipt = new TransactionReceipt(); transactionReceipt.setLogs(logs); final List<Contract.EventValuesWithLog> eventValuesWithLogs1 = contract.extractEventParametersWithLog(testEvent1, transactionReceipt); assertEquals(eventValuesWithLogs1.size(), 1); assertEquals(eventValuesWithLogs1.get(0).getLog(), logs.get(0)); final List<Contract.EventValuesWithLog> eventValuesWithLogs2 = contract.extractEventParametersWithLog(testEvent2, transactionReceipt); assertEquals(eventValuesWithLogs2.size(), 1); assertEquals(eventValuesWithLogs2.get(0).getLog(), logs.get(1)); }
protected EventValuesWithLog extractEventParametersWithLog(Event event, Log log) { final EventValues eventValues = staticExtractEventParameters(event, log); return (eventValues == null) ? null : new EventValuesWithLog(eventValues, log); }
Contract extends ManagedTransaction { protected EventValuesWithLog extractEventParametersWithLog(Event event, Log log) { final EventValues eventValues = staticExtractEventParameters(event, log); return (eventValues == null) ? null : new EventValuesWithLog(eventValues, log); } }
Contract extends ManagedTransaction { protected EventValuesWithLog extractEventParametersWithLog(Event event, Log log) { final EventValues eventValues = staticExtractEventParameters(event, log); return (eventValues == null) ? null : new EventValuesWithLog(eventValues, log); } protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); }
Contract extends ManagedTransaction { protected EventValuesWithLog extractEventParametersWithLog(Event event, Log log) { final EventValues eventValues = staticExtractEventParameters(event, log); return (eventValues == null) ? null : new EventValuesWithLog(eventValues, log); } protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); void setContractAddress(String contractAddress); String getContractAddress(); void setTransactionReceipt(TransactionReceipt transactionReceipt); String getContractBinary(); void setGasPrice(BigInteger newPrice); BigInteger getGasPrice(); boolean isValid(); Optional<TransactionReceipt> getTransactionReceipt(); void setDefaultBlockParameter(DefaultBlockParameter defaultBlockParameter); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor, BigInteger value); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, TransactionManager transactionManager,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor, BigInteger value); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, TransactionManager transactionManager,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor); static EventValues staticExtractEventParameters(
            Event event, Log log); final void setDeployedAddress(String networkId, String address); final String getDeployedAddress(String networkId); }
Contract extends ManagedTransaction { protected EventValuesWithLog extractEventParametersWithLog(Event event, Log log) { final EventValues eventValues = staticExtractEventParameters(event, log); return (eventValues == null) ? null : new EventValuesWithLog(eventValues, log); } protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); protected  Contract(String contractBinary, String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, TransactionManager transactionManager,
                       BigInteger gasPrice, BigInteger gasLimit); @Deprecated protected  Contract(String contractAddress,
                       Web3j web3j, Credentials credentials,
                       BigInteger gasPrice, BigInteger gasLimit); void setContractAddress(String contractAddress); String getContractAddress(); void setTransactionReceipt(TransactionReceipt transactionReceipt); String getContractBinary(); void setGasPrice(BigInteger newPrice); BigInteger getGasPrice(); boolean isValid(); Optional<TransactionReceipt> getTransactionReceipt(); void setDefaultBlockParameter(DefaultBlockParameter defaultBlockParameter); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor, BigInteger value); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, Credentials credentials,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, TransactionManager transactionManager,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor, BigInteger value); static RemoteCall<T> deployRemoteCall(
            Class<T> type,
            Web3j web3j, TransactionManager transactionManager,
            BigInteger gasPrice, BigInteger gasLimit,
            String binary, String encodedConstructor); static EventValues staticExtractEventParameters(
            Event event, Log log); final void setDeployedAddress(String networkId, String address); final String getDeployedAddress(String networkId); static final BigInteger GAS_LIMIT; }