-
Notifications
You must be signed in to change notification settings - Fork 4
/
IexecHubContract.java
3251 lines (2712 loc) · 169 KB
/
IexecHubContract.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.iexec.commons.poco.contract.generated;
import io.reactivex.Flowable;
import io.reactivex.functions.Function;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import org.web3j.abi.EventEncoder;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.Address;
import org.web3j.abi.datatypes.Bool;
import org.web3j.abi.datatypes.DynamicArray;
import org.web3j.abi.datatypes.DynamicBytes;
import org.web3j.abi.datatypes.DynamicStruct;
import org.web3j.abi.datatypes.Event;
import org.web3j.abi.datatypes.StaticStruct;
import org.web3j.abi.datatypes.Type;
import org.web3j.abi.datatypes.Utf8String;
import org.web3j.abi.datatypes.generated.Bytes32;
import org.web3j.abi.datatypes.generated.Uint256;
import org.web3j.abi.datatypes.generated.Uint8;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.DefaultBlockParameter;
import org.web3j.protocol.core.RemoteCall;
import org.web3j.protocol.core.RemoteFunctionCall;
import org.web3j.protocol.core.methods.request.EthFilter;
import org.web3j.protocol.core.methods.response.BaseEventResponse;
import org.web3j.protocol.core.methods.response.Log;
import org.web3j.protocol.core.methods.response.TransactionReceipt;
import org.web3j.tuples.generated.Tuple12;
import org.web3j.tuples.generated.Tuple2;
import org.web3j.tuples.generated.Tuple3;
import org.web3j.tuples.generated.Tuple4;
import org.web3j.tuples.generated.Tuple6;
import org.web3j.tuples.generated.Tuple9;
import org.web3j.tx.Contract;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;
/**
* <p>Auto generated code.
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 1.4.2.
*/
@SuppressWarnings("rawtypes")
public class IexecHubContract extends Contract {
public static final String BINARY = "0x";
public static final String FUNC_UNISWAPV2ROUTER = "UniswapV2Router";
public static final String FUNC_ALLOWANCE = "allowance";
public static final String FUNC_APPREGISTRY = "appregistry";
public static final String FUNC_APPROVE = "approve";
public static final String FUNC_APPROVEANDCALL = "approveAndCall";
public static final String FUNC_BALANCEOF = "balanceOf";
public static final String FUNC_BROADCASTAPPORDER = "broadcastAppOrder";
public static final String FUNC_BROADCASTDATASETORDER = "broadcastDatasetOrder";
public static final String FUNC_BROADCASTREQUESTORDER = "broadcastRequestOrder";
public static final String FUNC_BROADCASTWORKERPOOLORDER = "broadcastWorkerpoolOrder";
public static final String FUNC_CALLBACKGAS = "callbackgas";
public static final String FUNC_CLAIM = "claim";
public static final String FUNC_CLAIMARRAY = "claimArray";
public static final String FUNC_CONFIGURE = "configure";
public static final String FUNC_CONTRIBUTE = "contribute";
public static final String FUNC_CONTRIBUTEANDFINALIZE = "contributeAndFinalize";
public static final String FUNC_CONTRIBUTION_DEADLINE_RATIO = "contribution_deadline_ratio";
public static final String FUNC_COUNTCATEGORY = "countCategory";
public static final String FUNC_CREATECATEGORY = "createCategory";
public static final String FUNC_DATASETREGISTRY = "datasetregistry";
public static final String FUNC_DECIMALS = "decimals";
public static final String FUNC_DECREASEALLOWANCE = "decreaseAllowance";
public static final String FUNC_DEPOSIT = "deposit";
public static final String FUNC_DEPOSITETH = "depositEth";
public static final String FUNC_DEPOSITETHFOR = "depositEthFor";
public static final String FUNC_DEPOSITFOR = "depositFor";
public static final String FUNC_DEPOSITFORARRAY = "depositForArray";
public static final String FUNC_DOMAIN = "domain";
public static final String FUNC_EIP712DOMAIN_SEPARATOR = "eip712domain_separator";
public static final String FUNC_ESTIMATEDEPOSITETHSENT = "estimateDepositEthSent";
public static final String FUNC_ESTIMATEDEPOSITTOKENWANTED = "estimateDepositTokenWanted";
public static final String FUNC_ESTIMATEWITHDRAWETHWANTED = "estimateWithdrawEthWanted";
public static final String FUNC_ESTIMATEWITHDRAWTOKENSENT = "estimateWithdrawTokenSent";
public static final String FUNC_FINAL_DEADLINE_RATIO = "final_deadline_ratio";
public static final String FUNC_FINALIZE = "finalize";
public static final String FUNC_FROZENOF = "frozenOf";
public static final String FUNC_GROUPMEMBER_PURPOSE = "groupmember_purpose";
public static final String FUNC_IMPORTSCORE = "importScore";
public static final String FUNC_INCREASEALLOWANCE = "increaseAllowance";
public static final String FUNC_INITIALIZE = "initialize";
public static final String FUNC_INITIALIZEANDCLAIMARRAY = "initializeAndClaimArray";
public static final String FUNC_INITIALIZEARRAY = "initializeArray";
public static final String FUNC_KITTY_ADDRESS = "kitty_address";
public static final String FUNC_KITTY_MIN = "kitty_min";
public static final String FUNC_KITTY_RATIO = "kitty_ratio";
public static final String FUNC_MANAGEAPPORDER = "manageAppOrder";
public static final String FUNC_MANAGEDATASETORDER = "manageDatasetOrder";
public static final String FUNC_MANAGEREQUESTORDER = "manageRequestOrder";
public static final String FUNC_MANAGEWORKERPOOLORDER = "manageWorkerpoolOrder";
public static final String FUNC_MATCHORDERS = "matchOrders";
public static final String FUNC_MATCHORDERSWITHETH = "matchOrdersWithEth";
public static final String FUNC_NAME = "name";
public static final String FUNC_OWNER = "owner";
public static final String FUNC_RECEIVEAPPROVAL = "receiveApproval";
public static final String FUNC_RECOVER = "recover";
public static final String FUNC_RENOUNCEOWNERSHIP = "renounceOwnership";
public static final String FUNC_REOPEN = "reopen";
public static final String FUNC_REQUESTTOKEN = "requestToken";
public static final String FUNC_REQUESTTOKENFOR = "requestTokenFor";
public static final String FUNC_RESULTFOR = "resultFor";
public static final String FUNC_REVEAL = "reveal";
public static final String FUNC_REVEAL_DEADLINE_RATIO = "reveal_deadline_ratio";
public static final String FUNC_SAFEDEPOSITETH = "safeDepositEth";
public static final String FUNC_SAFEDEPOSITETHFOR = "safeDepositEthFor";
public static final String FUNC_SAFEWITHDRAWETH = "safeWithdrawEth";
public static final String FUNC_SAFEWITHDRAWETHTO = "safeWithdrawEthTo";
public static final String FUNC_SETCALLBACKGAS = "setCallbackGas";
public static final String FUNC_SETNAME = "setName";
public static final String FUNC_SETTEEBROKER = "setTeeBroker";
public static final String FUNC_SYMBOL = "symbol";
public static final String FUNC_TEEBROKER = "teebroker";
public static final String FUNC_TOKEN = "token";
public static final String FUNC_TOTALSUPPLY = "totalSupply";
public static final String FUNC_TRANSFER = "transfer";
public static final String FUNC_TRANSFERFROM = "transferFrom";
public static final String FUNC_TRANSFEROWNERSHIP = "transferOwnership";
public static final String FUNC_UPDATEDOMAINSEPARATOR = "updateDomainSeparator";
public static final String FUNC_VERIFYPRESIGNATURE = "verifyPresignature";
public static final String FUNC_VERIFYPRESIGNATUREORSIGNATURE = "verifyPresignatureOrSignature";
public static final String FUNC_VERIFYSIGNATURE = "verifySignature";
public static final String FUNC_VIEWACCOUNT = "viewAccount";
public static final String FUNC_VIEWACCOUNTABILEGACY = "viewAccountABILegacy";
public static final String FUNC_VIEWCATEGORY = "viewCategory";
public static final String FUNC_VIEWCATEGORYABILEGACY = "viewCategoryABILegacy";
public static final String FUNC_VIEWCONFIGABILEGACY = "viewConfigABILegacy";
public static final String FUNC_VIEWCONSUMED = "viewConsumed";
public static final String FUNC_VIEWCONTRIBUTION = "viewContribution";
public static final String FUNC_VIEWCONTRIBUTIONABILEGACY = "viewContributionABILegacy";
public static final String FUNC_VIEWDEAL = "viewDeal";
public static final String FUNC_VIEWDEALABILEGACY_PT1 = "viewDealABILegacy_pt1";
public static final String FUNC_VIEWDEALABILEGACY_PT2 = "viewDealABILegacy_pt2";
public static final String FUNC_VIEWPRESIGNED = "viewPresigned";
public static final String FUNC_VIEWSCORE = "viewScore";
public static final String FUNC_VIEWTASK = "viewTask";
public static final String FUNC_VIEWTASKABILEGACY = "viewTaskABILegacy";
public static final String FUNC_WITHDRAW = "withdraw";
public static final String FUNC_WITHDRAWETH = "withdrawEth";
public static final String FUNC_WITHDRAWETHTO = "withdrawEthTo";
public static final String FUNC_WITHDRAWTO = "withdrawTo";
public static final String FUNC_WORKERPOOL_STAKE_RATIO = "workerpool_stake_ratio";
public static final String FUNC_WORKERPOOLREGISTRY = "workerpoolregistry";
public static final Event ACCURATECONTRIBUTION_EVENT = new Event("AccurateContribution",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Bytes32>(true) {}));
;
public static final Event APPROVAL_EVENT = new Event("Approval",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Address>(true) {}, new TypeReference<Uint256>() {}));
;
public static final Event BROADCASTAPPORDER_EVENT = new Event("BroadcastAppOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<AppOrder>() {}));
;
public static final Event BROADCASTDATASETORDER_EVENT = new Event("BroadcastDatasetOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<DatasetOrder>() {}));
;
public static final Event BROADCASTREQUESTORDER_EVENT = new Event("BroadcastRequestOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<RequestOrder>() {}));
;
public static final Event BROADCASTWORKERPOOLORDER_EVENT = new Event("BroadcastWorkerpoolOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<WorkerpoolOrder>() {}));
;
public static final Event CLOSEDAPPORDER_EVENT = new Event("ClosedAppOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event CLOSEDDATASETORDER_EVENT = new Event("ClosedDatasetOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event CLOSEDREQUESTORDER_EVENT = new Event("ClosedRequestOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event CLOSEDWORKERPOOLORDER_EVENT = new Event("ClosedWorkerpoolOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event CREATECATEGORY_EVENT = new Event("CreateCategory",
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}));
;
public static final Event FAULTYCONTRIBUTION_EVENT = new Event("FaultyContribution",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Bytes32>(true) {}));
;
public static final Event LOCK_EVENT = new Event("Lock",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}));
;
public static final Event ORDERSMATCHED_EVENT = new Event("OrdersMatched",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {}, new TypeReference<Uint256>() {}));
;
public static final Event OWNERSHIPTRANSFERRED_EVENT = new Event("OwnershipTransferred",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Address>(true) {}));
;
public static final Event REWARD_EVENT = new Event("Reward",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Bytes32>() {}));
;
public static final Event SCHEDULERNOTICE_EVENT = new Event("SchedulerNotice",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Bytes32>() {}));
;
public static final Event SEIZE_EVENT = new Event("Seize",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Bytes32>() {}));
;
public static final Event SIGNEDAPPORDER_EVENT = new Event("SignedAppOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event SIGNEDDATASETORDER_EVENT = new Event("SignedDatasetOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event SIGNEDREQUESTORDER_EVENT = new Event("SignedRequestOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event SIGNEDWORKERPOOLORDER_EVENT = new Event("SignedWorkerpoolOrder",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
;
public static final Event TASKCLAIMED_EVENT = new Event("TaskClaimed",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}));
;
public static final Event TASKCONSENSUS_EVENT = new Event("TaskConsensus",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Bytes32>() {}));
;
public static final Event TASKCONTRIBUTE_EVENT = new Event("TaskContribute",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Address>(true) {}, new TypeReference<Bytes32>() {}));
;
public static final Event TASKFINALIZE_EVENT = new Event("TaskFinalize",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<DynamicBytes>() {}));
;
public static final Event TASKINITIALIZE_EVENT = new Event("TaskInitialize",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Address>(true) {}));
;
public static final Event TASKREOPEN_EVENT = new Event("TaskReopen",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}));
;
public static final Event TASKREVEAL_EVENT = new Event("TaskReveal",
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Address>(true) {}, new TypeReference<Bytes32>() {}));
;
public static final Event TRANSFER_EVENT = new Event("Transfer",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>(true) {}, new TypeReference<Address>(true) {}, new TypeReference<Uint256>() {}));
;
public static final Event UNLOCK_EVENT = new Event("Unlock",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}));
;
protected static final HashMap<String, String> _addresses;
static {
_addresses = new HashMap<String, String>();
}
@Deprecated
protected IexecHubContract(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
}
protected IexecHubContract(String contractAddress, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) {
super(BINARY, contractAddress, web3j, credentials, contractGasProvider);
}
@Deprecated
protected IexecHubContract(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
}
protected IexecHubContract(String contractAddress, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) {
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider);
}
public static List<AccurateContributionEventResponse> getAccurateContributionEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(ACCURATECONTRIBUTION_EVENT, transactionReceipt);
ArrayList<AccurateContributionEventResponse> responses = new ArrayList<AccurateContributionEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
AccurateContributionEventResponse typedResponse = new AccurateContributionEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.worker = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.taskid = (byte[]) eventValues.getIndexedValues().get(1).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<AccurateContributionEventResponse> accurateContributionEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, AccurateContributionEventResponse>() {
@Override
public AccurateContributionEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ACCURATECONTRIBUTION_EVENT, log);
AccurateContributionEventResponse typedResponse = new AccurateContributionEventResponse();
typedResponse.log = log;
typedResponse.worker = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.taskid = (byte[]) eventValues.getIndexedValues().get(1).getValue();
return typedResponse;
}
});
}
public Flowable<AccurateContributionEventResponse> accurateContributionEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(ACCURATECONTRIBUTION_EVENT));
return accurateContributionEventFlowable(filter);
}
public static List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(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;
}
public Flowable<ApprovalEventResponse> approvalEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, ApprovalEventResponse>() {
@Override
public ApprovalEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log);
ApprovalEventResponse typedResponse = new ApprovalEventResponse();
typedResponse.log = log;
typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.spender = (String) eventValues.getIndexedValues().get(1).getValue();
typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<ApprovalEventResponse> approvalEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT));
return approvalEventFlowable(filter);
}
public static List<BroadcastAppOrderEventResponse> getBroadcastAppOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(BROADCASTAPPORDER_EVENT, transactionReceipt);
ArrayList<BroadcastAppOrderEventResponse> responses = new ArrayList<BroadcastAppOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
BroadcastAppOrderEventResponse typedResponse = new BroadcastAppOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.apporder = (AppOrder) eventValues.getNonIndexedValues().get(0);
responses.add(typedResponse);
}
return responses;
}
public Flowable<BroadcastAppOrderEventResponse> broadcastAppOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, BroadcastAppOrderEventResponse>() {
@Override
public BroadcastAppOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(BROADCASTAPPORDER_EVENT, log);
BroadcastAppOrderEventResponse typedResponse = new BroadcastAppOrderEventResponse();
typedResponse.log = log;
typedResponse.apporder = (AppOrder) eventValues.getNonIndexedValues().get(0);
return typedResponse;
}
});
}
public Flowable<BroadcastAppOrderEventResponse> broadcastAppOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(BROADCASTAPPORDER_EVENT));
return broadcastAppOrderEventFlowable(filter);
}
public static List<BroadcastDatasetOrderEventResponse> getBroadcastDatasetOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(BROADCASTDATASETORDER_EVENT, transactionReceipt);
ArrayList<BroadcastDatasetOrderEventResponse> responses = new ArrayList<BroadcastDatasetOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
BroadcastDatasetOrderEventResponse typedResponse = new BroadcastDatasetOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.datasetorder = (DatasetOrder) eventValues.getNonIndexedValues().get(0);
responses.add(typedResponse);
}
return responses;
}
public Flowable<BroadcastDatasetOrderEventResponse> broadcastDatasetOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, BroadcastDatasetOrderEventResponse>() {
@Override
public BroadcastDatasetOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(BROADCASTDATASETORDER_EVENT, log);
BroadcastDatasetOrderEventResponse typedResponse = new BroadcastDatasetOrderEventResponse();
typedResponse.log = log;
typedResponse.datasetorder = (DatasetOrder) eventValues.getNonIndexedValues().get(0);
return typedResponse;
}
});
}
public Flowable<BroadcastDatasetOrderEventResponse> broadcastDatasetOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(BROADCASTDATASETORDER_EVENT));
return broadcastDatasetOrderEventFlowable(filter);
}
public static List<BroadcastRequestOrderEventResponse> getBroadcastRequestOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(BROADCASTREQUESTORDER_EVENT, transactionReceipt);
ArrayList<BroadcastRequestOrderEventResponse> responses = new ArrayList<BroadcastRequestOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
BroadcastRequestOrderEventResponse typedResponse = new BroadcastRequestOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.requestorder = (RequestOrder) eventValues.getNonIndexedValues().get(0);
responses.add(typedResponse);
}
return responses;
}
public Flowable<BroadcastRequestOrderEventResponse> broadcastRequestOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, BroadcastRequestOrderEventResponse>() {
@Override
public BroadcastRequestOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(BROADCASTREQUESTORDER_EVENT, log);
BroadcastRequestOrderEventResponse typedResponse = new BroadcastRequestOrderEventResponse();
typedResponse.log = log;
typedResponse.requestorder = (RequestOrder) eventValues.getNonIndexedValues().get(0);
return typedResponse;
}
});
}
public Flowable<BroadcastRequestOrderEventResponse> broadcastRequestOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(BROADCASTREQUESTORDER_EVENT));
return broadcastRequestOrderEventFlowable(filter);
}
public static List<BroadcastWorkerpoolOrderEventResponse> getBroadcastWorkerpoolOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(BROADCASTWORKERPOOLORDER_EVENT, transactionReceipt);
ArrayList<BroadcastWorkerpoolOrderEventResponse> responses = new ArrayList<BroadcastWorkerpoolOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
BroadcastWorkerpoolOrderEventResponse typedResponse = new BroadcastWorkerpoolOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.workerpoolorder = (WorkerpoolOrder) eventValues.getNonIndexedValues().get(0);
responses.add(typedResponse);
}
return responses;
}
public Flowable<BroadcastWorkerpoolOrderEventResponse> broadcastWorkerpoolOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, BroadcastWorkerpoolOrderEventResponse>() {
@Override
public BroadcastWorkerpoolOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(BROADCASTWORKERPOOLORDER_EVENT, log);
BroadcastWorkerpoolOrderEventResponse typedResponse = new BroadcastWorkerpoolOrderEventResponse();
typedResponse.log = log;
typedResponse.workerpoolorder = (WorkerpoolOrder) eventValues.getNonIndexedValues().get(0);
return typedResponse;
}
});
}
public Flowable<BroadcastWorkerpoolOrderEventResponse> broadcastWorkerpoolOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(BROADCASTWORKERPOOLORDER_EVENT));
return broadcastWorkerpoolOrderEventFlowable(filter);
}
public static List<ClosedAppOrderEventResponse> getClosedAppOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(CLOSEDAPPORDER_EVENT, transactionReceipt);
ArrayList<ClosedAppOrderEventResponse> responses = new ArrayList<ClosedAppOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
ClosedAppOrderEventResponse typedResponse = new ClosedAppOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.appHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<ClosedAppOrderEventResponse> closedAppOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, ClosedAppOrderEventResponse>() {
@Override
public ClosedAppOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(CLOSEDAPPORDER_EVENT, log);
ClosedAppOrderEventResponse typedResponse = new ClosedAppOrderEventResponse();
typedResponse.log = log;
typedResponse.appHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<ClosedAppOrderEventResponse> closedAppOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(CLOSEDAPPORDER_EVENT));
return closedAppOrderEventFlowable(filter);
}
public static List<ClosedDatasetOrderEventResponse> getClosedDatasetOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(CLOSEDDATASETORDER_EVENT, transactionReceipt);
ArrayList<ClosedDatasetOrderEventResponse> responses = new ArrayList<ClosedDatasetOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
ClosedDatasetOrderEventResponse typedResponse = new ClosedDatasetOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.datasetHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<ClosedDatasetOrderEventResponse> closedDatasetOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, ClosedDatasetOrderEventResponse>() {
@Override
public ClosedDatasetOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(CLOSEDDATASETORDER_EVENT, log);
ClosedDatasetOrderEventResponse typedResponse = new ClosedDatasetOrderEventResponse();
typedResponse.log = log;
typedResponse.datasetHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<ClosedDatasetOrderEventResponse> closedDatasetOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(CLOSEDDATASETORDER_EVENT));
return closedDatasetOrderEventFlowable(filter);
}
public static List<ClosedRequestOrderEventResponse> getClosedRequestOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(CLOSEDREQUESTORDER_EVENT, transactionReceipt);
ArrayList<ClosedRequestOrderEventResponse> responses = new ArrayList<ClosedRequestOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
ClosedRequestOrderEventResponse typedResponse = new ClosedRequestOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.requestHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<ClosedRequestOrderEventResponse> closedRequestOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, ClosedRequestOrderEventResponse>() {
@Override
public ClosedRequestOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(CLOSEDREQUESTORDER_EVENT, log);
ClosedRequestOrderEventResponse typedResponse = new ClosedRequestOrderEventResponse();
typedResponse.log = log;
typedResponse.requestHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<ClosedRequestOrderEventResponse> closedRequestOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(CLOSEDREQUESTORDER_EVENT));
return closedRequestOrderEventFlowable(filter);
}
public static List<ClosedWorkerpoolOrderEventResponse> getClosedWorkerpoolOrderEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(CLOSEDWORKERPOOLORDER_EVENT, transactionReceipt);
ArrayList<ClosedWorkerpoolOrderEventResponse> responses = new ArrayList<ClosedWorkerpoolOrderEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
ClosedWorkerpoolOrderEventResponse typedResponse = new ClosedWorkerpoolOrderEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.workerpoolHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<ClosedWorkerpoolOrderEventResponse> closedWorkerpoolOrderEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, ClosedWorkerpoolOrderEventResponse>() {
@Override
public ClosedWorkerpoolOrderEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(CLOSEDWORKERPOOLORDER_EVENT, log);
ClosedWorkerpoolOrderEventResponse typedResponse = new ClosedWorkerpoolOrderEventResponse();
typedResponse.log = log;
typedResponse.workerpoolHash = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<ClosedWorkerpoolOrderEventResponse> closedWorkerpoolOrderEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(CLOSEDWORKERPOOLORDER_EVENT));
return closedWorkerpoolOrderEventFlowable(filter);
}
public static List<CreateCategoryEventResponse> getCreateCategoryEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(CREATECATEGORY_EVENT, transactionReceipt);
ArrayList<CreateCategoryEventResponse> responses = new ArrayList<CreateCategoryEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
CreateCategoryEventResponse typedResponse = new CreateCategoryEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.catid = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.name = (String) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.description = (String) eventValues.getNonIndexedValues().get(2).getValue();
typedResponse.workClockTimeRef = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<CreateCategoryEventResponse> createCategoryEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, CreateCategoryEventResponse>() {
@Override
public CreateCategoryEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(CREATECATEGORY_EVENT, log);
CreateCategoryEventResponse typedResponse = new CreateCategoryEventResponse();
typedResponse.log = log;
typedResponse.catid = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.name = (String) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.description = (String) eventValues.getNonIndexedValues().get(2).getValue();
typedResponse.workClockTimeRef = (BigInteger) eventValues.getNonIndexedValues().get(3).getValue();
return typedResponse;
}
});
}
public Flowable<CreateCategoryEventResponse> createCategoryEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(CREATECATEGORY_EVENT));
return createCategoryEventFlowable(filter);
}
public static List<FaultyContributionEventResponse> getFaultyContributionEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(FAULTYCONTRIBUTION_EVENT, transactionReceipt);
ArrayList<FaultyContributionEventResponse> responses = new ArrayList<FaultyContributionEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
FaultyContributionEventResponse typedResponse = new FaultyContributionEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.worker = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.taskid = (byte[]) eventValues.getIndexedValues().get(1).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<FaultyContributionEventResponse> faultyContributionEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, FaultyContributionEventResponse>() {
@Override
public FaultyContributionEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(FAULTYCONTRIBUTION_EVENT, log);
FaultyContributionEventResponse typedResponse = new FaultyContributionEventResponse();
typedResponse.log = log;
typedResponse.worker = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.taskid = (byte[]) eventValues.getIndexedValues().get(1).getValue();
return typedResponse;
}
});
}
public Flowable<FaultyContributionEventResponse> faultyContributionEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(FAULTYCONTRIBUTION_EVENT));
return faultyContributionEventFlowable(filter);
}
public static List<LockEventResponse> getLockEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(LOCK_EVENT, transactionReceipt);
ArrayList<LockEventResponse> responses = new ArrayList<LockEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
LockEventResponse typedResponse = new LockEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<LockEventResponse> lockEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, LockEventResponse>() {
@Override
public LockEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(LOCK_EVENT, log);
LockEventResponse typedResponse = new LockEventResponse();
typedResponse.log = log;
typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
return typedResponse;
}
});
}
public Flowable<LockEventResponse> lockEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(LOCK_EVENT));
return lockEventFlowable(filter);
}
public static List<OrdersMatchedEventResponse> getOrdersMatchedEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(ORDERSMATCHED_EVENT, transactionReceipt);
ArrayList<OrdersMatchedEventResponse> responses = new ArrayList<OrdersMatchedEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
OrdersMatchedEventResponse typedResponse = new OrdersMatchedEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.dealid = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.appHash = (byte[]) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.datasetHash = (byte[]) eventValues.getNonIndexedValues().get(2).getValue();
typedResponse.workerpoolHash = (byte[]) eventValues.getNonIndexedValues().get(3).getValue();
typedResponse.requestHash = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
typedResponse.volume = (BigInteger) eventValues.getNonIndexedValues().get(5).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<OrdersMatchedEventResponse> ordersMatchedEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, OrdersMatchedEventResponse>() {
@Override
public OrdersMatchedEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(ORDERSMATCHED_EVENT, log);
OrdersMatchedEventResponse typedResponse = new OrdersMatchedEventResponse();
typedResponse.log = log;
typedResponse.dealid = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.appHash = (byte[]) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.datasetHash = (byte[]) eventValues.getNonIndexedValues().get(2).getValue();
typedResponse.workerpoolHash = (byte[]) eventValues.getNonIndexedValues().get(3).getValue();
typedResponse.requestHash = (byte[]) eventValues.getNonIndexedValues().get(4).getValue();
typedResponse.volume = (BigInteger) eventValues.getNonIndexedValues().get(5).getValue();
return typedResponse;
}
});
}
public Flowable<OrdersMatchedEventResponse> ordersMatchedEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(ORDERSMATCHED_EVENT));
return ordersMatchedEventFlowable(filter);
}
public static List<OwnershipTransferredEventResponse> getOwnershipTransferredEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(OWNERSHIPTRANSFERRED_EVENT, transactionReceipt);
ArrayList<OwnershipTransferredEventResponse> responses = new ArrayList<OwnershipTransferredEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
OwnershipTransferredEventResponse typedResponse = new OwnershipTransferredEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.previousOwner = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.newOwner = (String) eventValues.getIndexedValues().get(1).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<OwnershipTransferredEventResponse> ownershipTransferredEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, OwnershipTransferredEventResponse>() {
@Override
public OwnershipTransferredEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(OWNERSHIPTRANSFERRED_EVENT, log);
OwnershipTransferredEventResponse typedResponse = new OwnershipTransferredEventResponse();
typedResponse.log = log;
typedResponse.previousOwner = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.newOwner = (String) eventValues.getIndexedValues().get(1).getValue();
return typedResponse;
}
});
}
public Flowable<OwnershipTransferredEventResponse> ownershipTransferredEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(OWNERSHIPTRANSFERRED_EVENT));
return ownershipTransferredEventFlowable(filter);
}
public static List<RewardEventResponse> getRewardEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(REWARD_EVENT, transactionReceipt);
ArrayList<RewardEventResponse> responses = new ArrayList<RewardEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
RewardEventResponse typedResponse = new RewardEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.ref = (byte[]) eventValues.getNonIndexedValues().get(2).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<RewardEventResponse> rewardEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, RewardEventResponse>() {
@Override
public RewardEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(REWARD_EVENT, log);
RewardEventResponse typedResponse = new RewardEventResponse();
typedResponse.log = log;
typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.ref = (byte[]) eventValues.getNonIndexedValues().get(2).getValue();
return typedResponse;
}
});
}
public Flowable<RewardEventResponse> rewardEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(REWARD_EVENT));
return rewardEventFlowable(filter);
}
public static List<SchedulerNoticeEventResponse> getSchedulerNoticeEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(SCHEDULERNOTICE_EVENT, transactionReceipt);
ArrayList<SchedulerNoticeEventResponse> responses = new ArrayList<SchedulerNoticeEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
SchedulerNoticeEventResponse typedResponse = new SchedulerNoticeEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.workerpool = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.dealid = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<SchedulerNoticeEventResponse> schedulerNoticeEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new Function<Log, SchedulerNoticeEventResponse>() {
@Override
public SchedulerNoticeEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(SCHEDULERNOTICE_EVENT, log);
SchedulerNoticeEventResponse typedResponse = new SchedulerNoticeEventResponse();
typedResponse.log = log;
typedResponse.workerpool = (String) eventValues.getIndexedValues().get(0).getValue();
typedResponse.dealid = (byte[]) eventValues.getNonIndexedValues().get(0).getValue();
return typedResponse;
}
});
}
public Flowable<SchedulerNoticeEventResponse> schedulerNoticeEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(SCHEDULERNOTICE_EVENT));
return schedulerNoticeEventFlowable(filter);
}
public static List<SeizeEventResponse> getSeizeEvents(TransactionReceipt transactionReceipt) {
List<Contract.EventValuesWithLog> valueList = staticExtractEventParametersWithLog(SEIZE_EVENT, transactionReceipt);
ArrayList<SeizeEventResponse> responses = new ArrayList<SeizeEventResponse>(valueList.size());
for (Contract.EventValuesWithLog eventValues : valueList) {
SeizeEventResponse typedResponse = new SeizeEventResponse();
typedResponse.log = eventValues.getLog();
typedResponse.owner = (String) eventValues.getNonIndexedValues().get(0).getValue();
typedResponse.amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
typedResponse.ref = (byte[]) eventValues.getNonIndexedValues().get(2).getValue();
responses.add(typedResponse);
}
return responses;
}
public Flowable<SeizeEventResponse> seizeEventFlowable(EthFilter filter) {