opportunity-service 0.0.657 → 0.0.661

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. package/dist/OpportunityService.js +0 -11
  2. package/dist/OpportunityService.js.map +1 -1
  3. package/dist/api/ethereum/sendAsync.js +0 -4
  4. package/dist/api/ethereum/sendAsync.js.map +1 -1
  5. package/dist/api/exchange/create-dispute.js +0 -39
  6. package/dist/api/exchange/create-dispute.js.map +1 -1
  7. package/dist/api/exchange/create-task.js +3 -15
  8. package/dist/api/exchange/create-task.js.map +1 -1
  9. package/dist/api/exchange/enter-work-relationship.js +0 -60
  10. package/dist/api/exchange/enter-work-relationship.js.map +1 -1
  11. package/dist/api/identity/register-new-user.js +0 -10
  12. package/dist/api/identity/register-new-user.js.map +1 -1
  13. package/dist/api/index.js +2 -16
  14. package/dist/api/index.js.map +1 -1
  15. package/dist/api/internal/abis.js +1 -4
  16. package/dist/api/internal/abis.js.map +1 -1
  17. package/dist/blockchain/abi.json +104 -89
  18. package/dist/blockchain/addresses.json +8 -4
  19. package/dist/blockchain/bytecode.json +0 -1
  20. package/dist/constants.js +0 -10
  21. package/dist/constants.js.map +1 -1
  22. package/dist/events/OpportunityEventEmitter.js +0 -2
  23. package/dist/events/OpportunityEventEmitter.js.map +1 -1
  24. package/dist/events/sync-with-ethereum-node.js +0 -2
  25. package/dist/events/sync-with-ethereum-node.js.map +1 -1
  26. package/dist/sync/process/process-log.js +0 -7
  27. package/dist/sync/process/process-log.js.map +1 -1
  28. package/dist/sync/process/processMarketCreatedLog.js +0 -3
  29. package/dist/sync/process/processMarketCreatedLog.js.map +1 -1
  30. package/dist/sync/process/processUserAssignedTrueIdentification.js +1 -2
  31. package/dist/sync/process/processUserAssignedTrueIdentification.js.map +1 -1
  32. package/dist/sync/process/processUserRegistered.js +1 -3
  33. package/dist/sync/process/processUserRegistered.js.map +1 -1
  34. package/dist/sync/process/processUserSummaryCreated.js +0 -1
  35. package/dist/sync/process/processUserSummaryCreated.js.map +1 -1
  36. package/dist/sync/process/processWorkRelationshipCreated.js +0 -2
  37. package/dist/sync/process/processWorkRelationshipCreated.js.map +1 -1
  38. package/dist/sync/sync-jobs.js +2 -3
  39. package/dist/sync/sync-jobs.js.map +1 -1
  40. package/dist/sync/sync-market-disputes.js +0 -34
  41. package/dist/sync/sync-market-disputes.js.map +1 -1
  42. package/dist/sync/sync-markets.js +2 -5
  43. package/dist/sync/sync-markets.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/OpportunityService.ts +1 -12
  46. package/src/api/ethereum/sendAsync.ts +0 -4
  47. package/src/api/exchange/create-dispute.ts +0 -41
  48. package/src/api/exchange/create-task.ts +3 -15
  49. package/src/api/exchange/enter-work-relationship.ts +0 -61
  50. package/src/api/identity/register-new-user.ts +0 -12
  51. package/src/api/index.ts +2 -16
  52. package/src/api/internal/abis.ts +1 -4
  53. package/src/blockchain/abi.json +104 -89
  54. package/src/blockchain/addresses.json +7 -5
  55. package/src/blockchain/bytecode.json +0 -1
  56. package/src/constants.ts +0 -11
  57. package/src/events/OpportunityEventEmitter.ts +0 -2
  58. package/src/events/sync-with-ethereum-node.ts +0 -2
  59. package/src/sync/process/process-log.ts +0 -6
  60. package/src/sync/process/processMarketCreatedLog.ts +0 -4
  61. package/src/sync/process/processUserAssignedTrueIdentification.ts +1 -3
  62. package/src/sync/process/processUserRegistered.ts +1 -5
  63. package/src/sync/process/processUserSummaryCreated.ts +0 -2
  64. package/src/sync/process/processWorkRelationshipCreated.ts +1 -5
  65. package/src/sync/sync-jobs.ts +2 -3
  66. package/src/sync/sync-market-disputes.ts +0 -27
  67. package/src/sync/sync-markets.ts +3 -5
  68. package/src/types.ts +0 -32
  69. package/dist/sync/process/processDisputeInvolvement.js +0 -33
  70. package/dist/sync/process/processDisputeInvolvement.js.map +0 -1
  71. package/dist/sync/process/processMarketDisputes.js +0 -34
  72. package/dist/sync/process/processMarketDisputes.js.map +0 -1
  73. package/dist/sync/sync-disputes.js +0 -37
  74. package/dist/sync/sync-disputes.js.map +0 -1
  75. package/src/sync/process/processDisputeInvolvement.ts +0 -42
  76. package/src/sync/process/processMarketDisputes.ts +0 -43
  77. package/src/sync/sync-disputes.ts +0 -29
@@ -126,7 +126,7 @@
126
126
  "inputs": [
127
127
  {
128
128
  "internalType": "address",
129
- "name": "_owner",
129
+ "name": "_registrar",
130
130
  "type": "address"
131
131
  },
132
132
  {
@@ -148,32 +148,6 @@
148
148
  "stateMutability": "nonpayable",
149
149
  "type": "constructor"
150
150
  },
151
- {
152
- "inputs": [],
153
- "name": "HIGH_MEDIAN_EVALUATION_THRESHOLD",
154
- "outputs": [
155
- {
156
- "internalType": "uint8",
157
- "name": "",
158
- "type": "uint8"
159
- }
160
- ],
161
- "stateMutability": "view",
162
- "type": "function"
163
- },
164
- {
165
- "inputs": [],
166
- "name": "LOW_MEDIAN_EVALUATION_THRESHOLD",
167
- "outputs": [
168
- {
169
- "internalType": "uint8",
170
- "name": "",
171
- "type": "uint8"
172
- }
173
- ],
174
- "stateMutability": "view",
175
- "type": "function"
176
- },
177
151
  {
178
152
  "inputs": [],
179
153
  "name": "REVIEW_TYPEHASH",
@@ -216,7 +190,7 @@
216
190
  {
217
191
  "inputs": [
218
192
  {
219
- "internalType": "address payable",
193
+ "internalType": "address",
220
194
  "name": "_newWorker",
221
195
  "type": "address"
222
196
  },
@@ -272,48 +246,9 @@
272
246
  "type": "function"
273
247
  },
274
248
  {
275
- "inputs": [
276
- {
277
- "internalType": "address",
278
- "name": "workerUniversalAddress",
279
- "type": "address"
280
- },
281
- {
282
- "components": [
283
- {
284
- "internalType": "address",
285
- "name": "market",
286
- "type": "address"
287
- },
288
- {
289
- "internalType": "uint256",
290
- "name": "marketReputation",
291
- "type": "uint256"
292
- },
293
- {
294
- "internalType": "uint256",
295
- "name": "universalReputation",
296
- "type": "uint256"
297
- }
298
- ],
299
- "internalType": "struct Evaluation.EvaluationState",
300
- "name": "evaluationState",
301
- "type": "tuple"
302
- },
303
- {
304
- "internalType": "address",
305
- "name": "_market",
306
- "type": "address"
307
- }
308
- ],
309
- "name": "checkWorkerEvaluation",
310
- "outputs": [
311
- {
312
- "internalType": "bool",
313
- "name": "",
314
- "type": "bool"
315
- }
316
- ],
249
+ "inputs": [],
250
+ "name": "claimStalledContract",
251
+ "outputs": [],
317
252
  "stateMutability": "nonpayable",
318
253
  "type": "function"
319
254
  },
@@ -369,6 +304,19 @@
369
304
  "stateMutability": "view",
370
305
  "type": "function"
371
306
  },
307
+ {
308
+ "inputs": [],
309
+ "name": "daiToken",
310
+ "outputs": [
311
+ {
312
+ "internalType": "contract DaiToken",
313
+ "name": "",
314
+ "type": "address"
315
+ }
316
+ ],
317
+ "stateMutability": "view",
318
+ "type": "function"
319
+ },
372
320
  {
373
321
  "inputs": [],
374
322
  "name": "domain_separator",
@@ -408,6 +356,19 @@
408
356
  "stateMutability": "view",
409
357
  "type": "function"
410
358
  },
359
+ {
360
+ "inputs": [],
361
+ "name": "market",
362
+ "outputs": [
363
+ {
364
+ "internalType": "address",
365
+ "name": "",
366
+ "type": "address"
367
+ }
368
+ ],
369
+ "stateMutability": "view",
370
+ "type": "function"
371
+ },
411
372
  {
412
373
  "inputs": [],
413
374
  "name": "owner",
@@ -421,6 +382,20 @@
421
382
  "stateMutability": "view",
422
383
  "type": "function"
423
384
  },
385
+ {
386
+ "inputs": [],
387
+ "name": "refundUnclaimedContract",
388
+ "outputs": [],
389
+ "stateMutability": "nonpayable",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [],
394
+ "name": "releaseJob",
395
+ "outputs": [],
396
+ "stateMutability": "nonpayable",
397
+ "type": "function"
398
+ },
424
399
  {
425
400
  "inputs": [
426
401
  {
@@ -570,20 +545,23 @@
570
545
  ],
571
546
  "UserRegistration": [
572
547
  {
548
+ "anonymous": false,
573
549
  "inputs": [
574
550
  {
551
+ "indexed": true,
575
552
  "internalType": "address",
576
- "name": "userSummaryFactoryAddress",
553
+ "name": "universalAddress",
577
554
  "type": "address"
578
555
  },
579
556
  {
557
+ "indexed": true,
580
558
  "internalType": "address",
581
- "name": "_juryParticipationAddress",
559
+ "name": "userSummaryContractAddress",
582
560
  "type": "address"
583
561
  }
584
562
  ],
585
- "stateMutability": "nonpayable",
586
- "type": "constructor"
563
+ "name": "UserAssignedTrueIdentification",
564
+ "type": "event"
587
565
  },
588
566
  {
589
567
  "anonymous": false,
@@ -593,29 +571,73 @@
593
571
  "internalType": "address",
594
572
  "name": "universalAddress",
595
573
  "type": "address"
574
+ }
575
+ ],
576
+ "name": "UserRegistered",
577
+ "type": "event"
578
+ },
579
+ {
580
+ "anonymous": false,
581
+ "inputs": [
582
+ {
583
+ "indexed": true,
584
+ "internalType": "address",
585
+ "name": "_userSummary",
586
+ "type": "address"
587
+ },
588
+ {
589
+ "indexed": true,
590
+ "internalType": "uint256",
591
+ "name": "index",
592
+ "type": "uint256"
596
593
  },
597
594
  {
598
595
  "indexed": true,
599
596
  "internalType": "address",
600
- "name": "userSummaryContractAddress",
597
+ "name": "universalAddress",
601
598
  "type": "address"
602
599
  }
603
600
  ],
604
- "name": "UserAssignedTrueIdentification",
601
+ "name": "UserSummaryCreated",
605
602
  "type": "event"
606
603
  },
607
604
  {
608
- "anonymous": false,
609
605
  "inputs": [
610
606
  {
611
- "indexed": true,
607
+ "internalType": "uint256",
608
+ "name": "",
609
+ "type": "uint256"
610
+ }
611
+ ],
612
+ "name": "_userSummaries",
613
+ "outputs": [
614
+ {
615
+ "internalType": "contract UserSummary",
616
+ "name": "",
617
+ "type": "address"
618
+ }
619
+ ],
620
+ "stateMutability": "view",
621
+ "type": "function"
622
+ },
623
+ {
624
+ "inputs": [
625
+ {
612
626
  "internalType": "address",
613
627
  "name": "universalAddress",
614
628
  "type": "address"
615
629
  }
616
630
  ],
617
- "name": "UserRegistered",
618
- "type": "event"
631
+ "name": "createUserSummary",
632
+ "outputs": [
633
+ {
634
+ "internalType": "address",
635
+ "name": "",
636
+ "type": "address"
637
+ }
638
+ ],
639
+ "stateMutability": "nonpayable",
640
+ "type": "function"
619
641
  },
620
642
  {
621
643
  "inputs": [
@@ -636,13 +658,6 @@
636
658
  "stateMutability": "view",
637
659
  "type": "function"
638
660
  },
639
- {
640
- "inputs": [],
641
- "name": "redeemJuryParticipation",
642
- "outputs": [],
643
- "stateMutability": "nonpayable",
644
- "type": "function"
645
- },
646
661
  {
647
662
  "inputs": [],
648
663
  "name": "registerNewUser",
@@ -735,7 +750,7 @@
735
750
  "inputs": [
736
751
  {
737
752
  "internalType": "address",
738
- "name": "taskOwner",
753
+ "name": "_registrar",
739
754
  "type": "address"
740
755
  },
741
756
  {
@@ -780,7 +795,7 @@
780
795
  },
781
796
  {
782
797
  "inputs": [],
783
- "name": "getNumJobs",
798
+ "name": "getNumRelationshipsCreated",
784
799
  "outputs": [
785
800
  {
786
801
  "internalType": "uint256",
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "rinkeby": {
3
3
  "MarketFactory": "0x850cADCF43FB7a40F8aD0C09e7F4B4A649598298",
4
- "UserRegistration": "0x31799946e72a44273515556e366e059064Df8ca2",
4
+ "UserRegistration": "",
5
5
  "Dai": "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea"
6
6
  },
7
7
  "mainnet": {
8
- "MarketFactory": "0x9fd244e5972F28e2F133bd3dAA5A6691C8E6d1c7",
9
- "UserRegistration": "0xA31Ea4553E82e08b3F411B29C009ECd45AE1738B",
8
+ "MarketFactory": "0xA31Ea4553E82e08b3F411B29C009ECd45AE1738B",
9
+ "UserRegistration": "0x0534B3647623EB050541700810A070C2Df06F977",
10
10
  "Dai": "0x6b175474e89094c44da98b954eedeac495271d0f"
11
11
  },
12
- "xdai": {
13
-
12
+ "arbitrum": {
13
+ "MarketFactory": "",
14
+ "UserRegistration": "",
15
+ "Dai": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"
14
16
  }
15
17
  }
@@ -1,4 +1,3 @@
1
1
  {
2
- "Dispute": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638e93d1d511610097578063d8025a8011610066578063d8025a801461027b578063eeabb1251461028e578063fc0e3d90146102a1578063ffe1ee9d146102a957600080fd5b80638e93d1d51461019e57806391b0d39a1461023a578063a3bef4d714610243578063a6430cc01461025057600080fd5b80633a4b66f1116100d35780633a4b66f11461015c5780634a60e34f1461016557806377e8fd9c1461016f5780637e291d851461017757600080fd5b80630b97bc86146100fa578063146ca531146101345780631712546614610153575b600080fd5b6101217f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6003546101419060ff1681565b60405160ff909116815260200161012b565b61012160065481565b61012160025481565b61016d6102d0565b005b61016d61037e565b6101217f000000000000000000000000000000000000000000000000000000000000000081565b6101f76101ac366004610bfc565b6000602081905290815260409020805460018201546002909201546001600160a01b03909116919067ffffffffffffffff81169060ff600160401b8204811691600160481b90041685565b604080516001600160a01b039096168652602086019490945267ffffffffffffffff9092169284019290925290151560608301521515608082015260a00161012b565b61012160045481565b6005546101419060ff1681565b61026361025e366004610d24565b6103b7565b6040516001600160a01b03909116815260200161012b565b610121610289366004610cee565b6103e1565b61016d61029c366004610c3d565b610890565b61016d610b1d565b6101217f000000000000000000000000000000000000000000000000000000000000000081565b6004546102e09062093a80610e06565b600454141561037c5761037c600880546102f990610e43565b80601f016020809104026020016040519081016040528092919081815260200182805461032590610e43565b80156103725780601f1061034757610100808354040283529160200191610372565b820191906000526020600020905b81548152906001019060200180831161035557829003601f168201915b5050505050610b36565b565b60095460009060ff16600381111561039857610398610e8e565b8160038111156103aa576103aa610e8e565b146103b457600080fd5b50565b600181815481106103c757600080fd5b6000918252602090912001546001600160a01b0316905081565b600954600090819060ff1660038111156103fd576103fd610e8e565b81600381111561040f5761040f610e8e565b1461041957600080fd5b60015460051161042857600080fd5b60075460408051632fe4c87f60e21b815290516001600160a01b0390921691600091839163bf9321fc9160048082019260209290919082900301818787803b15801561047357600080fd5b505af1158015610487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ab9190610c20565b9050806001600160a01b0316638fcbaf0c836001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f557600080fd5b505afa158015610509573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052d9190610c20565b30893560208b0135600161054760608e0160408f01610d3d565b8d606001358e608001356040518963ffffffff1660e01b8152600401610574989796959493929190610d60565b600060405180830381600087803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b50505050806001600160a01b031663f2d5d56b836001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105ee57600080fd5b505afa158015610602573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106269190610c20565b6002546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561066f57600080fd5b505af1158015610683573d6000803e3d6000fd5b50505050806001600160a01b0316638fcbaf0c836001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106cf57600080fd5b505afa1580156106e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107079190610c20565b306107148a356001610e06565b60208a0135600061072b60608d0160408e01610d3d565b8c606001358d608001356040518963ffffffff1660e01b8152600401610758989796959493929190610d60565b600060405180830381600087803b15801561077257600080fd5b505af1158015610786573d6000803e3d6000fd5b5050505061087e336040805160a0810182526000808252602080830182815283850183815260608501848152608086018581526001600160a01b03988916808752948690529685209551865498166001600160a01b03199889161786559151600186810191909155905160029095018054925196511515600160481b0269ff00000000000000000019971515600160401b0268ffffffffffffffffff1990941667ffffffffffffffff9790971696909617929092179590951693909317909255825480840184559290527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69091018054909216179055565b610886610bc5565b5050505092915050565b60095460019060ff1660038111156108aa576108aa610e8e565b8160038111156108bc576108bc610e8e565b146108c657600080fd5b60035460ff166001141561096f57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109625760405162461bcd60e51b815260206004820152602860248201527f54686520616767726573736f72206d757374207375626d6974207468652070726044820152671bd8d95cdcc81a5960c21b60648201526084015b60405180910390fd5b61096b82610b36565b5050565b60045461097f9062093a80610e06565b4210610989575050565b60075460408051638da5cb5b60e01b815290516001600160a01b03909216918291638da5cb5b916004808301926020929190829003018186803b1580156109cf57600080fd5b505afa1580156109e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a079190610c20565b6001600160a01b0316336001600160a01b03161480610aa75750806001600160a01b0316634d547ada6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5a57600080fd5b505afa158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a929190610c20565b6001600160a01b0316336001600160a01b0316145b610b0f5760405162461bcd60e51b815260206004820152603360248201527f5468652070726f63657373206964206d75737420636f6d652066726f6d206f6e604482015272329037b3103a3432903234b9b83aba32b9399760691b6064820152608401610959565b610b1883610b36565b505050565b60095460039060ff168181111561039857610398610e8e565b6009805460ff1916905560405130907f46fc1bd3ab8e7cd05a86c7dcc134023832df6d2dc518df189e63b27c386673ad90600090a2600354610b7c9060ff166001610e1e565b60ff16306001600160a01b03167f21f2e1db10f4df2a0f1fc876844286ccb4dde456aeaf56b34084fe757c10192f8342604051610bba929190610da9565b60405180910390a350565b60015460009060051415610be1576009805460ff191660021790555b90565b600060a08284031215610bf657600080fd5b50919050565b600060208284031215610c0e57600080fd5b8135610c1981610eba565b9392505050565b600060208284031215610c3257600080fd5b8151610c1981610eba565b600060208284031215610c4f57600080fd5b813567ffffffffffffffff80821115610c6757600080fd5b818401915084601f830112610c7b57600080fd5b813581811115610c8d57610c8d610ea4565b604051601f8201601f19908116603f01168101908382118183101715610cb557610cb5610ea4565b81604052828152876020848701011115610cce57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806101408385031215610d0257600080fd5b610d0c8484610be4565b9150610d1b8460a08501610be4565b90509250929050565b600060208284031215610d3657600080fd5b5035919050565b600060208284031215610d4f57600080fd5b813560ff81168114610c1957600080fd5b6001600160a01b039889168152969097166020870152604086019490945260608501929092521515608084015260ff1660a083015260c082015260e08101919091526101000190565b604081526000835180604084015260005b81811015610dd75760208187018101516060868401015201610dba565b81811115610de9576000606083860101525b50602083019390935250601f91909101601f191601606001919050565b60008219821115610e1957610e19610e78565b500190565b600060ff821660ff84168060ff03821115610e3b57610e3b610e78565b019392505050565b600181811c90821680610e5757607f821691505b60208210811415610bf657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146103b457600080fdfea2646970667358221220e36760deb035eff2130e8ab72946509dd52d437feb2fb887714059c90eaa82e764736f6c63430008070033",
3
2
  "WorkRelationship": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80637f755043116100de578063bfce14ea11610097578063ec3a479011610071578063ec3a4790146103c5578063ed8454fb146103d8578063f240f7c3146103eb578063f2a09497146103fe57600080fd5b8063bfce14ea14610363578063c6ee20d21461038a578063cb2ef6f7146103a457600080fd5b80637f755043146102e257806385209ee0146102f55780638da5cb5b146103075780639240a1001461031a57806396118e4414610334578063bf9321fc1461035b57600080fd5b80634d547ada1161014b57806353318a871161012557806353318a871461029b5780635db28c66146102ae57806363c852c9146102b65780637df38c5b146102d957600080fd5b80634d547ada146102365780634e12aa961461026157806350365be91461028857600080fd5b80630b73a87f14610193578063188bbbf3146101a85780631ed4b49e146101d157806331613fdb146101e657806339987e52146101ee5780633c86f6f314610201575b600080fd5b6101a66101a13660046117bf565b610406565b005b6007546101bb9062010000900460ff1681565b6040516101c89190611b80565b60405180910390f35b6101d96104ef565b6040516101c89190611bbb565b6101a661057d565b6101a66101fc366004611a99565b6106a4565b6102287ffa5e0016fb62b8dffda8fd95249d438edcffd3689b40ac3b4281d4cf710609ae81565b6040519081526020016101c8565b600054610249906001600160a01b031681565b6040516001600160a01b0390911681526020016101c8565b6102287fc35792dec8ea736e1a3478771b1f14a7472fd98ca01a9c9077ac63917f87f64981565b6101a6610296366004611961565b6107d5565b6101a66102a93660046119a7565b6108fe565b610228610a2c565b6102c96102c43660046118a9565b610a8a565b60405190151581526020016101c8565b61022860025481565b6101a66102f03660046117e3565b610b33565b6007546101bb90610100900460ff1681565b600154610249906001600160a01b031681565b610322600681565b60405160ff90911681526020016101c8565b6102287f62b607caa4d4e7fcbd31bf4c033cd30888b536567fadc83710fdf15f8d5cfc9e81565b610249610deb565b6102287f000000000000000000000000000000000000000000000000000000000000000081565b6007546103979060ff1681565b6040516101c89190611b93565b6007546103b8906301000000900460ff1681565b6040516101c89190611ba7565b6101a66103d33660046119cf565b610e56565b6101a66103e6366004611874565b610ed0565b600454610249906001600160a01b031681565b610322600481565b600754339060ff16600581111561041f5761041f611ec6565b600514801561043b57506004546001600160a01b038281169116145b6104605760405162461bcd60e51b815260040161045790611dd0565b60405180910390fd5b60035460025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482019290925291169063a9059cbb906044015b602060405180830381600087803b1580156104b257600080fd5b505af11580156104c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ea9190611944565b505050565b600580546104fc90611e75565b80601f016020809104026020016040519081016040528092919081815260200182805461052890611e75565b80156105755780601f1061054a57610100808354040283529160200191610575565b820191906000526020600020905b81548152906001019060200180831161055857829003601f168201915b505050505081565b600754339060ff16600581111561059657610596611ec6565b60051480156105b257506004546001600160a01b038281169116145b6105ce5760405162461bcd60e51b815260040161045790611dd0565b6000600280546105de9190611e53565b60035460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561063057600080fd5b505af1158015610644573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106689190611944565b5060035460005460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb90604401610498565b6001546001600160a01b031633146106ce5760405162461bcd60e51b815260040161045790611c10565b60038060075460ff1660058111156106e8576106e8611ec6565b146107055760405162461bcd60e51b815260040161045790611c93565b604080517ffa5e0016fb62b8dffda8fd95249d438edcffd3689b40ac3b4281d4cf710609ae602080830191909152871580158385015283518084038501815260608401855280519083012061190160f01b60808501527f0000000000000000000000000000000000000000000000000000000000000000608285015260a2808501919091528451808503909101815260c29093019093528151910120906107b5576107b08789610f1a565b6107cb565b600780546002919060ff19166001835b02179055505b5050505050505050565b6000546001600160a01b031633146107ff5760405162461bcd60e51b815260040161045790611c63565b600180600754610100900460ff16600281111561081e5761081e611ec6565b1461083b5760405162461bcd60e51b815260040161045790611d67565b60018060075460ff16600581111561085557610855611ec6565b146108725760405162461bcd60e51b815260040161045790611c93565b60018060075462010000900460ff16600281111561089257610892611ec6565b146108af5760405162461bcd60e51b815260040161045790611cfd565b600187151514156108d0576007805462ff00ff1916620200021790556108f5565b600080546001600160a01b03191690556108e8610f76565b6007805462ff00ff191690555b50505050505050565b6000546001600160a01b031633146109285760405162461bcd60e51b815260040161045790611c63565b60028060075460ff16600581111561094257610942611ec6565b1461095f5760405162461bcd60e51b815260040161045790611c93565b604080517f62b607caa4d4e7fcbd31bf4c033cd30888b536567fadc83710fdf15f8d5cfc9e60208083019190915281830188905282518083038401815260608301845280519082012061190160f01b60808401527f0000000000000000000000000000000000000000000000000000000000000000608284015260a2808401919091528351808403909101815260c290920190925280519101206000546001600160a01b0316610a0e57600080fd5b610a1786600655565b50506007805460ff1916600317905550505050565b6001546000906001600160a01b03163314610a595760405162461bcd60e51b815260040161045790611c10565b6000546001600160a01b03163314610a835760405162461bcd60e51b815260040161045790611c63565b5060065490565b6040805160016232dea960e11b0319815283516001600160a01b03908116600483015260208501516024830152918401516044820152828216606482015260009182919086169063ff9a42ae9060840160206040518083038186803b158015610af257600080fd5b505afa158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190611944565b95945050505050565b6001546001600160a01b03163314610b5d5760405162461bcd60e51b815260040161045790611c10565b600080600754610100900460ff166002811115610b7c57610b7c611ec6565b14610b995760405162461bcd60e51b815260040161045790611d67565b60008060075460ff166005811115610bb357610bb3611ec6565b14610bd05760405162461bcd60e51b815260040161045790611c93565b6001600160a01b038c16610c4c5760405162461bcd60e51b815260206004820152603760248201527f576f726b65722061646472657373206d757374206e6f7420626520302077686560448201527f6e2061737369676e696e67206e657720776f726b65722e0000000000000000006064820152608401610457565b8a610c995760405162461bcd60e51b815260206004820181905260248201527f44616920616d6f756e742063616e6e6f7420626520657175616c20746f20302e6044820152606401610457565b6003546001546040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a082319060240160206040518083038186803b158015610ce557600080fd5b505afa158015610cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1d9190611a80565b90508b811015610d2c57600080fd5b610d3c8b8b8b8b8b8b8b8b6110b8565b60028c9055600080546001600160a01b038f166001600160a01b031991821617909155600480549091169055600780546001919062ff0000191662010000830217905550600780546001919060ff1916828002179055506000546001600160a01b038e8116911614610db057610db0611eb0565b600160075462010000900460ff166002811115610dcf57610dcf611ec6565b14610ddc57610ddc611eb0565b50505050505050505050505050565b6003546000906001600160a01b0316610e465760405162461bcd60e51b815260206004820152601a60248201527f52657761726420616464726573732063616e6e6f7420626520300000000000006044820152606401610457565b506003546001600160a01b031690565b6001546001600160a01b03163314610e805760405162461bcd60e51b815260040161045790611c10565b60008060075462010000900460ff166002811115610ea057610ea0611ec6565b14610ebd5760405162461bcd60e51b815260040161045790611cfd565b81516104ea906005906020850190611726565b60028060075460ff166005811115610eea57610eea611ec6565b14610f075760405162461bcd60e51b815260040161045790611c93565b50506007805460ff191660051790555050565b6001546001600160a01b03163314610f445760405162461bcd60e51b815260040161045790611c10565b6000546001600160a01b0316610f5957600080fd5b610f638282611235565b50506007805461ffff1916610204179055565b6000546001600160a01b03163314610fa05760405162461bcd60e51b815260040161045790611c63565b60018060075462010000900460ff166002811115610fc057610fc0611ec6565b14610fdd5760405162461bcd60e51b815260040161045790611cfd565b60018060075460ff166005811115610ff757610ff7611ec6565b146110145760405162461bcd60e51b815260040161045790611c93565b6002546110795760405162461bcd60e51b815260206004820152602d60248201527f5468657265206973206e6f2044414920746f207472616e73666572206261636b60448201526c103a37903a34329037bbb732b960991b6064820152608401610457565b60035460015460025460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb90604401610498565b600354600180546040516323f2ebc360e21b81526001600160a01b0393841693638fcbaf0c936110fb939091169130918e918e91908e908e908e90600401611b1b565b600060405180830381600087803b15801561111557600080fd5b505af1158015611129573d6000803e3d6000fd5b505060035460015460025460405163f2d5d56b60e01b81526001600160a01b03928316600482015260248101919091529116925063f2d5d56b9150604401600060405180830381600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b5050600354600180546001600160a01b039283169450638fcbaf0c93509091169030906111c3908d90611e2d565b8b60008989896040518963ffffffff1660e01b81526004016111ec989796959493929190611b1b565b600060405180830381600087803b15801561120657600080fd5b505af115801561121a573d6000803e3d6000fd5b5050600780546001935090915061ff001916610100836107c5565b60035460005460025460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb90604401602060405180830381600087803b15801561128957600080fd5b505af115801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c19190611944565b50600154600080546001600160a01b03928316921690600660ff86161115611349576040516376267fd760e11b81526001600160a01b0383169063ec4cffae90611312903090600190600401611b64565b600060405180830381600087803b15801561132c57600080fd5b505af1158015611340573d6000803e3d6000fd5b505050506116c6565b600660ff86161115806113605750600460ff861610155b1561136a576116c6565b600460ff86161180159061138b5750611384846001611e2d565b8160ff1610155b15611649576000826001600160a01b031663c897d6956040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114059190611afe565b905060018160ff161161147857604051630668e3b760e41b81526001600160a01b0384169063668e3b7090611441903090600190600401611b64565b600060405180830381600087803b15801561145b57600080fd5b505af115801561146f573d6000803e3d6000fd5b50505050611643565b8060ff16600214156114ed57604051630668e3b760e41b81526000906001600160a01b0385169063668e3b70906114b59030908590600401611b64565b600060405180830381600087803b1580156114cf57600080fd5b505af11580156114e3573d6000803e3d6000fd5b5050505050611643565b8060ff166003141561158757604051630668e3b760e41b81526001600160a01b0384169063668e3b7090611528903090600090600401611b64565b600060405180830381600087803b15801561154257600080fd5b505af1158015611556573d6000803e3d6000fd5b50506040516332053e6960e01b8152600060048201526001600160a01b03861692506332053e699150602401611441565b6040516332053e6960e01b8152600160048201526001600160a01b038416906332053e6990602401600060405180830381600087803b1580156115c957600080fd5b505af11580156115dd573d6000803e3d6000fd5b5050604051630668e3b760e41b81526001600160a01b038616925063668e3b709150611610903090600190600401611b64565b600060405180830381600087803b15801561162a57600080fd5b505af115801561163e573d6000803e3d6000fd5b505050505b506116c6565b600460ff86161180159061165f5750838160ff16105b156116c657604051630668e3b760e41b81526001600160a01b0383169063668e3b7090611693903090600190600401611b64565b600060405180830381600087803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b505050505b604051633336dad960e21b81523060048201526001600160a01b0384169063ccdb6b6490602401600060405180830381600087803b15801561170757600080fd5b505af115801561171b573d6000803e3d6000fd5b505050505050505050565b82805461173290611e75565b90600052602060002090601f016020900481019282611754576000855561179a565b82601f1061176d57805160ff191683800117855561179a565b8280016001018555821561179a579182015b8281111561179a57825182559160200191906001019061177f565b506117a69291506117aa565b5090565b5b808211156117a657600081556001016117ab565b6000602082840312156117d157600080fd5b81356117dc81611f05565b9392505050565b6000806000806000806000806000806101408b8d03121561180357600080fd5b8a3561180e81611f05565b995060208b0135985060408b0135975060608b0135965060808b013561183381611f28565b955060a08b0135945060c08b0135935060e08b013561185181611f28565b809350506101008b013591506101208b013590509295989b9194979a5092959850565b60008060006060848603121561188957600080fd5b833561189481611f05565b95602085013595506040909401359392505050565b600080600083850360a08112156118bf57600080fd5b84356118ca81611f05565b93506060601f19820112156118de57600080fd5b506040516060810181811067ffffffffffffffff8211171561190257611902611edc565b604052602085013561191381611f05565b815260408581013560208301526060860135908201529150608084013561193981611f05565b809150509250925092565b60006020828403121561195657600080fd5b81516117dc81611f1a565b6000806000806080858703121561197757600080fd5b843561198281611f1a565b9350602085013561199281611f28565b93969395505050506040820135916060013590565b600080600080608085870312156119bd57600080fd5b84359350602085013561199281611f28565b6000602082840312156119e157600080fd5b813567ffffffffffffffff808211156119f957600080fd5b818401915084601f830112611a0d57600080fd5b813581811115611a1f57611a1f611edc565b604051601f8201601f19908116603f01168101908382118183101715611a4757611a47611edc565b81604052828152876020848701011115611a6057600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208284031215611a9257600080fd5b5051919050565b60008060008060008060c08789031215611ab257600080fd5b863595506020870135611ac481611f28565b94506040870135611ad481611f1a565b93506060870135611ae481611f28565b9598949750929560808101359460a0909101359350915050565b600060208284031215611b1057600080fd5b81516117dc81611f28565b6001600160a01b039889168152969097166020870152604086019490945260608501929092521515608084015260ff1660a083015260c082015260e08101919091526101000190565b6001600160a01b0392909216825260ff16602082015260400190565b60208101611b8d83611ef2565b91905290565b6020810160068310611b8d57611b8d611ec6565b6020810160028310611b8d57611b8d611ec6565b600060208083528351808285015260005b81811015611be857858101830151858201604001528201611bcc565b81811115611bfa576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526033908201527f576f726b52656c6174696f6e736869703a206f6e6c794f776e65722063616e2060408201527231b0b636103a3434b990333ab731ba34b7b71760691b606082015260800190565b602080825260169082015275576f726b52656c6174696f6e736869703a206f6e6c7960501b604082015260600190565b60208082526044908201527f5468697320616374696f6e2063616e6e6f742062652063617272696564206f7560408201527f7420756e646572207468652063757272656e7420636f6e7472616374207374616060820152633a3ab99760e11b608082015260a00190565b60208082526044908201527f43616e6e6f7420696e766f6b65207468697320657363726f772066756e63746960408201527f6f6e2077697468207468652063757272656e7420636f6e7472616374207374616060820152633a3ab99760e11b608082015260a00190565b60208082526043908201527f43616e6e6f7420696e766f6b65207468697320657363726f772066756e63746960408201527f6f6e2077697468207468652063757272656e7420636f6e7472616374207374616060820152623a329760e91b608082015260a00190565b60208082526037908201527f54686520636f6e74726163742063616e6e6f74206265207265736f6c7665642060408201527f756e64657220746865736520636f6e646974696f6e732e000000000000000000606082015260800190565b60008219821115611e4e57634e487b7160e01b600052601160045260246000fd5b500190565b600082611e7057634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680611e8957607f821691505b60208210811415611eaa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60038110611f0257611f02611ec6565b50565b6001600160a01b0381168114611f0257600080fd5b8015158114611f0257600080fd5b60ff81168114611f0257600080fdfea264697066735822122027624e7f435ac760348d3a66c1ed21ccd7fdfb4824992c920caddc2c2483c8b764736f6c63430008070033"
4
3
  }
package/src/constants.ts CHANGED
@@ -12,7 +12,6 @@ export const ABI_LIST = [
12
12
 
13
13
  export enum Contracts {
14
14
  CONTROL='Control',
15
- DISPUTE='Dispute',
16
15
  DAI='Dai',
17
16
  WORK_RELATIONSHIP='WorkRelationship',
18
17
  MARKET='Market',
@@ -35,13 +34,6 @@ export enum ContractType {
35
34
  FLASH
36
35
  }
37
36
 
38
- enum DisputeStatus {
39
- AWAITING_ARBITRATORS,
40
- PENDING_DECISION,
41
- RESOLVED
42
- }
43
-
44
-
45
37
  /* Web3 */
46
38
 
47
39
  export const enum Networks {
@@ -88,9 +80,6 @@ export enum UserEvents {
88
80
 
89
81
  export enum ExchangeEvents {
90
82
  WorkRelationshipCreated='WorkRelationshipCreated',
91
- DisputeCreated='DisputeCreated',
92
- DisputeInvolvement='MarketDispute',
93
- MarketDispute='MarketDispute'
94
83
  }
95
84
 
96
85
  export enum StorageEvents {
@@ -15,8 +15,6 @@ class OpportunityEventEmitter extends EventEmitter{
15
15
  }
16
16
 
17
17
  emit(eventName : string, ...args: Array<any>) : boolean {
18
- console.log('emitting event name: ' + eventName)
19
- console.log('args: ' + args)
20
18
  return super.emit(eventName, ...args);
21
19
  }
22
20
 
@@ -8,11 +8,9 @@ import syncMarkets from '../sync/sync-markets';
8
8
  import syncJobs from '../sync/sync-jobs';
9
9
 
10
10
  async function syncWithEthereumNode(): Promise<void> {
11
- console.log('Syncing with ethereum node..');
12
11
  const highestBlockNumber = 1//blockMap[Contracts.MARKET_FACTORY]; //get highest block number form db
13
12
 
14
13
  syncMarkets()
15
- //syncJobs()
16
14
  }
17
15
 
18
16
  export { syncWithEthereumNode };
@@ -7,7 +7,6 @@ import { ethers, utils } from "ethers";
7
7
  import { hexZeroPad } from "@ethersproject/bytes";
8
8
  import { decode } from "node:punycode";
9
9
  import { processWorkRelationshipCreatedEvent } from "./processWorkRelationshipCreated";
10
- import { processDisputeInvolvement } from "./processDisputeInvolvement";
11
10
  /**
12
11
  * Retrieves topics and process the approppriate log
13
12
  * @param log
@@ -24,7 +23,6 @@ import { processDisputeInvolvement } from "./processDisputeInvolvement";
24
23
  * },{...}]
25
24
  */
26
25
  function processLog(log) {
27
- console.log(log)
28
26
  processLogEvents(log);
29
27
  }
30
28
 
@@ -56,12 +54,8 @@ function processLogEvents(log) {
56
54
  case "WorkRelationshipCreated":
57
55
  processWorkRelationshipCreatedEvent(log);
58
56
  break;
59
- case "DisputeInvolvement":
60
- processDisputeInvolvement(log)
61
57
  default:
62
58
  }
63
- } else {
64
- console.log('Event is null.. exiting processing.')
65
59
  }
66
60
  }
67
61
 
@@ -23,10 +23,6 @@ function processMarketCreatedEvent(log) {
23
23
  const marketName = args[3];
24
24
  const marketType = args[4];
25
25
 
26
- console.log('Processing ' + signature + ' with args: '
27
- + 'Market Address: ' + marketAddress + ', Index: '
28
- + marketIndex + ', Owner: ' + marketOwner, ', Market Name: ' + marketName, + ', and Market Type: ' + marketType);
29
-
30
26
  let marketData = {
31
27
  marketAddress,
32
28
  marketIndex,
@@ -15,12 +15,10 @@ function processAssignedTrueIdentification(log) {
15
15
  const registeredUniversalAddress = args[0];
16
16
  const userSummaryContractAddress = args[1];
17
17
 
18
- console.log('Processing: ' + 'processAssignedTrueIdentification event with args: ' + registeredUniversalAddress + ' and ' + userSummaryContractAddress);
19
-
20
18
  const trueIdentificationData = { registeredUniversalAddress, userSummaryContractAddress }
21
19
  opportunityEventEmitter.emit(UserEvents.UserAssignedTrueIdentification, trueIdentificationData);
22
20
  } catch(error) {
23
- console.log('processAssignedTrueIdentification: ' + error);
21
+ console.log(error);
24
22
  }
25
23
  }
26
24
 
@@ -13,13 +13,9 @@ function processUserRegistered(log) {
13
13
  const { args, signature } = decodedLog;
14
14
 
15
15
  const registeredUniversalAddress = args[0];
16
-
17
- console.log('Processing: ' + 'UserRegistered event with args: ' + registeredUniversalAddress);
18
-
19
- console.log('Successfully processedUserRegistered');
20
16
  opportunityEventEmitter.emit(UserEvents.UserRegistered, registeredUniversalAddress);
21
17
  } catch(error) {
22
- console.log('processUserRegistered: ' + error);
18
+ console.log(error)
23
19
  }
24
20
  }
25
21
 
@@ -15,8 +15,6 @@ function processUserSummaryCreated(log) {
15
15
  const userSummaryContractAddress = args[0];
16
16
  const userRegistrationNumber = args[1];
17
17
  const registeredUniversalAddress = args[2]
18
-
19
- console.log('Processing: ' + 'processUserSummaryCreated event with args: ' + registeredUniversalAddress + ' and ' + userSummaryContractAddress);
20
18
  const userSummaryData = { userSummaryContractAddress, userRegistrationNumber, registeredUniversalAddress }
21
19
  opportunityEventEmitter.emit(UserEvents.UserSummaryCreated, userSummaryData);
22
20
  } catch(error) {
@@ -21,11 +21,7 @@ function processWorkRelationshipCreatedEvent(log) {
21
21
 
22
22
  const relationshipOwner = args[0];
23
23
  const relationshipAddress = args[1];
24
- const relationshipMarketAddress = args[2];
25
-
26
- console.log('Processing ' + signature + ' with args: '
27
- + 'Owner: ' + relationshipOwner + ', Address: ' + relationshipAddress + ', and Market Address: ' + relationshipAddress);
28
-
24
+ const relationshipMarketAddress = args[2]
29
25
  const relationshipContractInstance = new ethers.Contract(relationshipAddress, abiMap[Contracts.WORK_RELATIONSHIP], opportunityService.getSignersInterface())
30
26
  const relationshipStatus = 0 //relationshipContractInstance.get_contractStatus();
31
27
  const relationshipType = 0;
@@ -12,15 +12,14 @@ async function syncJobs(marketAddress) {
12
12
  toBlock: 'latest',
13
13
  topics: ['WorkRelationshipCreated(address,address,address)']
14
14
  }).then((logs) => {
15
- console.log('Found logs.. Processing sync Jobs')
16
15
  logs.forEach(log => {
17
16
  if (log && Array.isArray(log.topics) && log.topics.length) {
18
17
  processLog(log); // keccashinside here
19
18
  }
20
19
  })
21
20
  })
22
- .catch(err => {
23
- console.log('Err on fetching logs from blockchain: ' + err)
21
+ .catch(error => {
22
+ console.log(error)
24
23
  })
25
24
  }
26
25
  }
@@ -1,27 +0,0 @@
1
- import opportunityService from "../OpportunityService";
2
- import { processLog } from './process/process-log';
3
- import * as addressMap from '../blockchain/addresses.json';
4
- import { Contracts } from '../constants';
5
-
6
- async function syncMarketDisputes(marketAddress) {
7
- if (opportunityService.getProviderInterface()) {
8
- await opportunityService.getProviderInterface().getLogs({
9
- address: marketAddress,
10
- fromBlock: 1,
11
- toBlock: 'latest',
12
- topics: ['MarketDispute(address,address,address,address,address)']
13
- }).then((logs) => {
14
- console.log('Found logs.. Processing sync market disputes')
15
- logs.forEach(log => {
16
- if (log && Array.isArray(log.topics) && log.topics.length) {
17
- processLog(log); // keccashinside here
18
- }
19
- })
20
- })
21
- .catch(err => {
22
- console.log('Err on fetching logs from blockchain: ' + err)
23
- })
24
- }
25
- }
26
-
27
- export default syncMarketDisputes;
@@ -4,7 +4,6 @@ import { Contracts } from '../constants';
4
4
  import { processLog } from './process/process-log';
5
5
 
6
6
  async function syncMarkets() {
7
- console.log('syncMarkets: ' + addressMap[opportunityService.getEthNetwork()][Contracts.MARKET_FACTORY])
8
7
  if (opportunityService.getProviderInterface()) {
9
8
  //sync Markets
10
9
  await opportunityService.getProviderInterface().getLogs({
@@ -12,16 +11,15 @@ async function syncMarkets() {
12
11
  fromBlock: 1,
13
12
  toBlock: 'latest'
14
13
  }).then((logs) => {
15
- console.log('Found logs.. Processing...')
16
- console.log(logs)
14
+
17
15
  logs.forEach(log => {
18
16
  if (log && Array.isArray(log.topics) && log.topics.length) {
19
17
  processLog(log); // keccashinside here
20
18
  }
21
19
  })
22
20
  })
23
- .catch(err => {
24
- console.log('Err on fetching logs from blockchain: ' + err)
21
+ .catch(error => {
22
+ console.log(error)
25
23
  })
26
24
  }
27
25
  }
package/src/types.ts CHANGED
@@ -38,36 +38,4 @@ export type FilterParams = {
38
38
  fromBlock: string | number,
39
39
  toBlock: string | number,
40
40
  address: string
41
- }
42
-
43
- /* Contracts */
44
-
45
- export type WorkRelationshipMetadata = {
46
- solution: any,
47
- attachments: Array<string>,
48
- definitionOfDone: string,
49
- desiredDuration: string,
50
- description: string,
51
- }
52
-
53
- export interface EventCallbackDictionary { [eventName : string]: () => any }
54
-
55
-
56
- export type DisputeDoc = {
57
- _id: string,
58
- collection: string, //dispute
59
- disputeAddress: string,
60
- vocdoniProcessId: string
61
- }
62
-
63
- export type WorkRelationshipDoc = {
64
- _id: string,
65
- collection: string //relationship
66
- }
67
-
68
- export type UserSummaryDoc = {
69
- _id: string,
70
- collection: string, //summary
71
- universalAddress: string,
72
- userSummaryAddress: string
73
41
  }