org.fisco.bcos.web3j.protocol.core.methods.response.Log Java Examples

The following examples show how to use org.fisco.bcos.web3j.protocol.core.methods.response.Log. 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: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<RemoveResultEventResponse> removeResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, RemoveResultEventResponse>() {
                        @Override
                        public RemoveResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(REMOVERESULT_EVENT, log);
                            RemoveResultEventResponse typedResponse =
                                    new RemoveResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #2
Source File: MixContract.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<RemoveResultEventResponse> removeResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, RemoveResultEventResponse>() {
                        @Override
                        public RemoveResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(REMOVERESULT_EVENT, log);
                            RemoveResultEventResponse typedResponse =
                                    new RemoveResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #3
Source File: MixContract.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<ReadResultEventResponse> readResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, ReadResultEventResponse>() {
                        @Override
                        public ReadResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(READRESULT_EVENT, log);
                            ReadResultEventResponse typedResponse =
                                    new ReadResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            typedResponse.item_id =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(1).getValue();
                            typedResponse.item_name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(2).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #4
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<CreateResultEventResponse> createResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, CreateResultEventResponse>() {
                        @Override
                        public CreateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(CREATERESULT_EVENT, log);
                            CreateResultEventResponse typedResponse =
                                    new CreateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #5
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<SelectResultEventResponse> selectResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, SelectResultEventResponse>() {
                        @Override
                        public SelectResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(SELECTRESULT_EVENT, log);
                            SelectResultEventResponse typedResponse =
                                    new SelectResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            typedResponse.item_id =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(1).getValue();
                            typedResponse.item_name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(2).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #6
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<InsertResultEventResponse> insertResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, InsertResultEventResponse>() {
                        @Override
                        public InsertResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(INSERTRESULT_EVENT, log);
                            InsertResultEventResponse typedResponse =
                                    new InsertResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #7
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<UpdateResultEventResponse> updateResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, UpdateResultEventResponse>() {
                        @Override
                        public UpdateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(UPDATERESULT_EVENT, log);
                            UpdateResultEventResponse typedResponse =
                                    new UpdateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #8
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<RemoveResultEventResponse> removeResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, RemoveResultEventResponse>() {
                        @Override
                        public RemoveResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(REMOVERESULT_EVENT, log);
                            RemoveResultEventResponse typedResponse =
                                    new RemoveResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #9
Source File: Ok.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<TransEventEventResponse> transEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, TransEventEventResponse>() {
                        @Override
                        public TransEventEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(TRANSEVENT_EVENT, log);
                            TransEventEventResponse typedResponse =
                                    new TransEventEventResponse();
                            typedResponse.log = log;
                            typedResponse.num =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #10
Source File: OkD.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<InsertResultEventResponse> insertResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, InsertResultEventResponse>() {
                        @Override
                        public InsertResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(INSERTRESULT_EVENT, log);
                            InsertResultEventResponse typedResponse =
                                    new InsertResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #11
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<CreateResultEventResponse> createResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, CreateResultEventResponse>() {
                        @Override
                        public CreateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(CREATERESULT_EVENT, log);
                            CreateResultEventResponse typedResponse =
                                    new CreateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #12
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<SelectResultEventResponse> selectResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, SelectResultEventResponse>() {
                        @Override
                        public SelectResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(SELECTRESULT_EVENT, log);
                            SelectResultEventResponse typedResponse =
                                    new SelectResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            typedResponse.item_id =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(1).getValue();
                            typedResponse.item_name =
                                    (byte[])
                                            eventValues.getNonIndexedValues().get(2).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #13
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<InsertResultEventResponse> insertResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, InsertResultEventResponse>() {
                        @Override
                        public InsertResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(INSERTRESULT_EVENT, log);
                            InsertResultEventResponse typedResponse =
                                    new InsertResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #14
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<UpdateResultEventResponse> updateResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, UpdateResultEventResponse>() {
                        @Override
                        public UpdateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(UPDATERESULT_EVENT, log);
                            UpdateResultEventResponse typedResponse =
                                    new UpdateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #15
Source File: MixContract.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<UpdateResultEventResponse> updateResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, UpdateResultEventResponse>() {
                        @Override
                        public UpdateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(UPDATERESULT_EVENT, log);
                            UpdateResultEventResponse typedResponse =
                                    new UpdateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #16
Source File: NewSolTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<OwnershipTransferredEventResponse> ownershipTransferredEventFlowable(
        BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<
                            Log, OwnershipTransferredEventResponse>() {
                        @Override
                        public OwnershipTransferredEventResponse apply(Log log) {
                            EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(
                                            OWNERSHIPTRANSFERRED_EVENT, log);
                            OwnershipTransferredEventResponse typedResponse =
                                    new OwnershipTransferredEventResponse();
                            typedResponse.log = log;
                            typedResponse._from =
                                    (String) eventValues.getIndexedValues().get(0).getValue();
                            typedResponse._to =
                                    (String) eventValues.getIndexedValues().get(1).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #17
Source File: NewSolTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<TransferEventResponse> transferEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, TransferEventResponse>() {
                        @Override
                        public TransferEventResponse apply(Log log) {
                            EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(TRANSFER_EVENT, log);
                            TransferEventResponse typedResponse = new TransferEventResponse();
                            typedResponse.log = log;
                            typedResponse.from =
                                    (String) eventValues.getIndexedValues().get(0).getValue();
                            typedResponse.to =
                                    (String) eventValues.getIndexedValues().get(1).getValue();
                            typedResponse.tokens =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #18
Source File: NewSolTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<ApprovalEventResponse> approvalEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, ApprovalEventResponse>() {
                        @Override
                        public ApprovalEventResponse apply(Log log) {
                            EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(APPROVAL_EVENT, log);
                            ApprovalEventResponse typedResponse = new ApprovalEventResponse();
                            typedResponse.log = log;
                            typedResponse.tokenOwner =
                                    (String) eventValues.getIndexedValues().get(0).getValue();
                            typedResponse.spender =
                                    (String) eventValues.getIndexedValues().get(1).getValue();
                            typedResponse.tokens =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #19
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<CreateResultEventResponse> createResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, CreateResultEventResponse>() {
                        @Override
                        public CreateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(CREATERESULT_EVENT, log);
                            CreateResultEventResponse typedResponse =
                                    new CreateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #20
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<InsertResultEventResponse> insertResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, InsertResultEventResponse>() {
                        @Override
                        public InsertResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(INSERTRESULT_EVENT, log);
                            InsertResultEventResponse typedResponse =
                                    new InsertResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #21
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<UpdateResultEventResponse> updateResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, UpdateResultEventResponse>() {
                        @Override
                        public UpdateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(UPDATERESULT_EVENT, log);
                            UpdateResultEventResponse typedResponse =
                                    new UpdateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #22
Source File: TableTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<RemoveResultEventResponse> removeResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, RemoveResultEventResponse>() {
                        @Override
                        public RemoveResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(REMOVERESULT_EVENT, log);
                            RemoveResultEventResponse typedResponse =
                                    new RemoveResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}
 
Example #23
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<AddSignaturesEventEventResponse> addSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, AddSignaturesEventEventResponse>() {
        @Override
        public AddSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ADDSIGNATURESEVENT_EVENT, log);
            AddSignaturesEventEventResponse typedResponse = new AddSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.info = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(5).getValue();
            return typedResponse;
        }
    });
}
 
Example #24
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<NewSignaturesEventEventResponse> newSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, NewSignaturesEventEventResponse>() {
        @Override
        public NewSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(NEWSIGNATURESEVENT_EVENT, log);
            NewSignaturesEventEventResponse typedResponse = new NewSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.info = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(5).getValue();
            typedResponse.addr = (String) eventValues.getNonIndexedValues().get(6).getValue();
            return typedResponse;
        }
    });
}
 
Example #25
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<ErrorNewSignaturesEventEventResponse> errorNewSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, ErrorNewSignaturesEventEventResponse>() {
        @Override
        public ErrorNewSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ERRORNEWSIGNATURESEVENT_EVENT, log);
            ErrorNewSignaturesEventEventResponse typedResponse = new ErrorNewSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.info = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(5).getValue();
            typedResponse.addr = (String) eventValues.getNonIndexedValues().get(6).getValue();
            return typedResponse;
        }
    });
}
 
Example #26
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<ErrorAddSignaturesEventEventResponse> errorAddSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, ErrorAddSignaturesEventEventResponse>() {
        @Override
        public ErrorAddSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ERRORADDSIGNATURESEVENT_EVENT, log);
            ErrorAddSignaturesEventEventResponse typedResponse = new ErrorAddSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.info = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(5).getValue();
            typedResponse.addr = (String) eventValues.getNonIndexedValues().get(6).getValue();
            return typedResponse;
        }
    });
}
 
Example #27
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<AddRepeatSignaturesEventEventResponse> addRepeatSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, AddRepeatSignaturesEventEventResponse>() {
        @Override
        public AddRepeatSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ADDREPEATSIGNATURESEVENT_EVENT, log);
            AddRepeatSignaturesEventEventResponse typedResponse = new AddRepeatSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.info = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(5).getValue();
            return typedResponse;
        }
    });
}
 
Example #28
Source File: Evidence.java    From evidenceSample with Apache License 2.0 6 votes vote down vote up
public Flowable<ErrorRepeatSignaturesEventEventResponse> errorRepeatSignaturesEventEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter).map(new io.reactivex.functions.Function<Log, ErrorRepeatSignaturesEventEventResponse>() {
        @Override
        public ErrorRepeatSignaturesEventEventResponse apply(Log log) {
            Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ERRORREPEATSIGNATURESEVENT_EVENT, log);
            ErrorRepeatSignaturesEventEventResponse typedResponse = new ErrorRepeatSignaturesEventEventResponse();
            typedResponse.log = log;
            typedResponse.evi = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.id = (String) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.v = (BigInteger) eventValues.getNonIndexedValues().get(2).getValue();
            typedResponse.r = (byte[]) eventValues.getNonIndexedValues().get(3).getValue();
            typedResponse.s = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
            typedResponse.addr = (String) eventValues.getNonIndexedValues().get(5).getValue();
            return typedResponse;
        }
    });
}
 
Example #29
Source File: AbiUtil.java    From WeBASE-Front with Apache License 2.0 6 votes vote down vote up
/**
 * receiptParse.
 * 
 * @param receipt info
 * @param abiList info
 * @return
 */
public static Object receiptParse(TransactionReceipt receipt, List<AbiDefinition> abiList)
    throws FrontException {
    Map<String, Object> resultMap = new HashMap<>();
    List<Log> logList = receipt.getLogs();
    for (AbiDefinition abiDefinition : abiList) {
        String eventName = abiDefinition.getName();
        List<String> funcInputTypes = getFuncInputType(abiDefinition);
        List<TypeReference<?>> finalOutputs = outputFormat(funcInputTypes);
        Event event = new Event(eventName,finalOutputs);
        Object result = null;
        for (Log logInfo : logList) {
            EventValues eventValues = Contract.staticExtractEventParameters(event, logInfo);
            if (eventValues != null) {
                result = callResultParse(funcInputTypes, eventValues.getNonIndexedValues());
                break;
            }
        }
        if (result != null) {
            resultMap.put(eventName, result);
        }
    }
    return resultMap;
}
 
Example #30
Source File: MixContract.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
public Flowable<CreateResultEventResponse> createResultEventFlowable(BcosFilter filter) {
    return web3j.logFlowable(filter)
            .map(
                    new io.reactivex.functions.Function<Log, CreateResultEventResponse>() {
                        @Override
                        public CreateResultEventResponse apply(Log log) {
                            Contract.EventValuesWithLog eventValues =
                                    extractEventParametersWithLog(CREATERESULT_EVENT, log);
                            CreateResultEventResponse typedResponse =
                                    new CreateResultEventResponse();
                            typedResponse.log = log;
                            typedResponse.count =
                                    (BigInteger)
                                            eventValues.getNonIndexedValues().get(0).getValue();
                            return typedResponse;
                        }
                    });
}