Java Code Examples for org.web3j.tx.Contract#EventValuesWithLog

The following examples show how to use org.web3j.tx.Contract#EventValuesWithLog . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetaCoin.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 2
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 3
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt);
    ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ApprovalEventResponse typedResponse = new ApprovalEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._spender = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 4
Source File: HumanStandardToken.java    From web3j-quorum with Apache License 2.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 5
Source File: MetaCoin.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 6
Source File: PublicResolver.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<ABIChangedEventResponse> getABIChangedEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(ABICHANGED_EVENT, transactionReceipt);
    ArrayList<ABIChangedEventResponse> responses = new ArrayList<ABIChangedEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ABIChangedEventResponse typedResponse = new ABIChangedEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.node = (byte[]) eventValues.getIndexedValues().get(0).getValue();
        typedResponse.contentType = (BigInteger) eventValues.getIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 7
Source File: EventEmitter.java    From eventeum with Apache License 2.0 5 votes vote down vote up
public List<DummyEventArrayEventResponse> getDummyEventArrayEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(DUMMYEVENTARRAY_EVENT, transactionReceipt);
    ArrayList<DummyEventArrayEventResponse> responses = new ArrayList<DummyEventArrayEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        DummyEventArrayEventResponse typedResponse = new DummyEventArrayEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.uintArray = (List<BigInteger>) eventValues.getNonIndexedValues().get(0).getValue();
        typedResponse.bytesArray = (List<byte[]>) eventValues.getNonIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 8
Source File: BlindAuction.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<AuctionEndedEventResponse> getAuctionEndedEvents(TransactionReceipt transactionReceipt) {
    List<EventValuesWithLog> valueList = extractEventParametersWithLog(AUCTIONENDED_EVENT, transactionReceipt);
    ArrayList<AuctionEndedEventResponse> responses = new ArrayList<AuctionEndedEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        AuctionEndedEventResponse typedResponse = new AuctionEndedEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.winner = (String) eventValues.getNonIndexedValues().get(0).getValue();
        typedResponse.highestBid = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 9
Source File: Fibonacci.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<NotifyEventResponse> getNotifyEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(NOTIFY_EVENT, transactionReceipt);
    ArrayList<NotifyEventResponse> responses = new ArrayList<NotifyEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        NotifyEventResponse typedResponse = new NotifyEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.input = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        typedResponse.result = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 10
Source File: EventEmitter.java    From eventeum with Apache License 2.0 5 votes vote down vote up
public List<DummyEventBytes16EventResponse> getDummyEventBytes16Events(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(DUMMYEVENTBYTES16_EVENT, transactionReceipt);
    ArrayList<DummyEventBytes16EventResponse> responses = new ArrayList<DummyEventBytes16EventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        DummyEventBytes16EventResponse typedResponse = new DummyEventBytes16EventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.indexedBytes16 = (byte[]) eventValues.getIndexedValues().get(0).getValue();
        typedResponse.bytes16Value = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 11
Source File: HumanStandardToken.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt);
    ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ApprovalEventResponse typedResponse = new ApprovalEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._spender = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 12
Source File: Fibonacci.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public List<NotifyEventResponse> getNotifyEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(NOTIFY_EVENT, transactionReceipt);
    ArrayList<NotifyEventResponse> responses = new ArrayList<NotifyEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        NotifyEventResponse typedResponse = new NotifyEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.input = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        typedResponse.result = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 13
Source File: HumanStandardToken.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt);
    ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ApprovalEventResponse typedResponse = new ApprovalEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._spender = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 14
Source File: HumanStandardToken.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 15
Source File: SimpleAuction.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<HighestBidIncreasedEventResponse> getHighestBidIncreasedEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(HIGHESTBIDINCREASED_EVENT, transactionReceipt);
    ArrayList<HighestBidIncreasedEventResponse> responses = new ArrayList<HighestBidIncreasedEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        HighestBidIncreasedEventResponse typedResponse = new HighestBidIncreasedEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.bidder = (String) eventValues.getNonIndexedValues().get(0).getValue();
        typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 16
Source File: ENS.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
    ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        TransferEventResponse typedResponse = new TransferEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.node = (byte[]) eventValues.getIndexedValues().get(0).getValue();
        typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 17
Source File: ENS.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<NewResolverEventResponse> getNewResolverEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(NEWRESOLVER_EVENT, transactionReceipt);
    ArrayList<NewResolverEventResponse> responses = new ArrayList<NewResolverEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        NewResolverEventResponse typedResponse = new NewResolverEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse.node = (byte[]) eventValues.getIndexedValues().get(0).getValue();
        typedResponse.resolver = (String) eventValues.getNonIndexedValues().get(0).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 18
Source File: HumanStandardToken.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) {
	List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);
	ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());
	for (Contract.EventValuesWithLog eventValues : valueList) {
		TransferEventResponse typedResponse = new TransferEventResponse();
		typedResponse.log = eventValues.getLog();
		typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue();
		typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue();
		typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
		responses.add(typedResponse);
	}
	return responses;
}
 
Example 19
Source File: ERC721.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
    List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt);
    ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ApprovalEventResponse typedResponse = new ApprovalEventResponse();
        typedResponse.log = eventValues.getLog();
        typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue();
        typedResponse._approved = (String) eventValues.getIndexedValues().get(1).getValue();
        typedResponse._tokenId = (BigInteger) eventValues.getIndexedValues().get(2).getValue();
        responses.add(typedResponse);
    }
    return responses;
}
 
Example 20
Source File: Purchase.java    From web3j with Apache License 2.0 5 votes vote down vote up
public List<ItemReceivedEventResponse> getItemReceivedEvents(TransactionReceipt transactionReceipt) {
    List<EventValuesWithLog> valueList = extractEventParametersWithLog(ITEMRECEIVED_EVENT, transactionReceipt);
    ArrayList<ItemReceivedEventResponse> responses = new ArrayList<ItemReceivedEventResponse>(valueList.size());
    for (Contract.EventValuesWithLog eventValues : valueList) {
        ItemReceivedEventResponse typedResponse = new ItemReceivedEventResponse();
        typedResponse.log = eventValues.getLog();
        responses.add(typedResponse);
    }
    return responses;
}