opportunity-service 0.0.655 → 0.0.659

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,7 @@ function createTask(data) {
24
24
  const taskMarket = parsedData["taskMarket"];
25
25
  const taskBounty = Number(parsedData["taskBounty"]);
26
26
  const taskMetadataPointer = parsedData["taskMetadataPointer"];
27
+ const registrar = addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION];
27
28
  console.log('b');
28
29
  console.log(taskOwner);
29
30
  console.log(taskMarket);
@@ -38,7 +39,7 @@ function createTask(data) {
38
39
  console.log('d');
39
40
  const contract = yield new ethers.Contract(taskMarket, abi).connect(opportunityService.getSignersInterface());
40
41
  console.log('e');
41
- const txResponse = yield contract.functions.createJob(ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI]);
42
+ const txResponse = yield contract.functions.createJob(registrar, ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI]);
42
43
  const txReceipt = yield txResponse.wait();
43
44
  console.log(txReceipt);
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../src/api/exchange/create-task.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI1D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,UAAU,MAAM,iCAAiC,CAAA;AAExD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC;AAEhD,SAAe,UAAU,CAAC,IAAI;;QAC1B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,GAAG,GAAG,MAAM,CAAC,S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OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;SACrB;QAAC,OAAM,KAAK,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,0CAA0C,GAAG,KAAK,CAAC,CAAC;SACnE;IACL,CAAC;CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB;;;;;;;;;;;;;;;;;;EAkBE"}
@@ -27,10 +27,12 @@ function registerNewUser() {
27
27
  console.log('The true identificaiton is: ' + id);
28
28
  if (id == '0x0000000000000000000000000000000000000000') {
29
29
  console.log('Registering new user: ' + msgSender);
30
- const tx = new Contract(addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION], abiMap[Contracts.USER_REGISTRATION]).connect(opportunityService.getSignersInterface())
30
+ const tx = yield new Contract(addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION], abiMap[Contracts.USER_REGISTRATION])
31
+ .connect(opportunityService.getSignersInterface())
31
32
  .registerNewUser({
32
33
  from: msgSender
33
34
  });
35
+ console.log(tx);
34
36
  const receipt = yield tx.wait();
35
37
  console.log('the receipt');
36
38
  console.log(receipt);
@@ -1 +1 @@
1
- {"version":3,"file":"register-new-user.js","sourceRoot":"","sources":["../../../src/api/identity/register-new-user.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AACvD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,UAAU,MAAM,iCAAiC,CAAA;AACxD,OAAO,MAAM,MAAM,2BAA2B,CAAA;AAG9C,SAAe,eAAe;;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI;gBACA,MAAM,uBAAuB,GAAG,UAAU,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;gB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qBACjB;iBACJ;qBAAM;oBACH,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;oBACtC,OAAO,CAAC,KAAK,CAAC,CAAA;iBACjB;aAGJ;YAAC,OAAM,KAAK,EAAE;gBACX,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBAClB,MAAM,CAAC,8DAA8D,CAAC,CAAA;aACzE;QACL,CAAC,CAAA,CAAC,CAAA;IACN,CAAC;CAAA;AAED,eAAe,eAAe,CAAC"}
@@ -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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opportunity-service",
3
- "version": "0.0.655",
3
+ "version": "0.0.659",
4
4
  "description": "A service layer that connects all services between the blockchain and ui.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,12 +24,14 @@ async function createTask(data) : Promise<void> {
24
24
  const taskMarket = parsedData["taskMarket"]
25
25
  const taskBounty = Number(parsedData["taskBounty"])
26
26
  const taskMetadataPointer = parsedData["taskMetadataPointer"]
27
+ const registrar = addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION]
27
28
  console.log('b')
28
29
  console.log(taskOwner)
29
30
  console.log(taskMarket)
30
31
  console.log('h')
31
32
  console.log(taskBounty)
32
33
  console.log(taskMetadataPointer)
34
+
33
35
 
34
36
  if (taskOwner == null || taskMarket == 0 || taskBounty == 0 || taskMetadataPointer == '' ) {
35
37
  throw new Error('Null value in data')
@@ -40,7 +42,7 @@ async function createTask(data) : Promise<void> {
40
42
  console.log('d')
41
43
  const contract = await new ethers.Contract(taskMarket, abi).connect(opportunityService.getSignersInterface());
42
44
  console.log('e')
43
- const txResponse = await contract.functions.createJob(ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI])
45
+ const txResponse = await contract.functions.createJob(registrar, ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI])
44
46
  const txReceipt = await txResponse.wait()
45
47
  console.log(txReceipt)
46
48
  } catch(error) {
@@ -5,6 +5,7 @@ import { Contracts } from '../../constants';
5
5
  import addressMap from '../../blockchain/addresses.json'
6
6
  import abiMap from '../../blockchain/abi.json'
7
7
  import { Result } from 'ethers/lib/utils';
8
+ import { TransactionResponse } from '@ethersproject/providers';
8
9
 
9
10
  async function registerNewUser() {
10
11
  return new Promise(async (resolve, reject) => {
@@ -20,17 +21,19 @@ async function registerNewUser() {
20
21
  console.log('Checking true identificaiton of msgSender: ' + msgSender)
21
22
  const id = await userRegistrationInstance.getTrueIdentification(msgSender)
22
23
  console.log('The true identificaiton is: ' + id)
23
-
24
+
24
25
  if (id == '0x0000000000000000000000000000000000000000')
25
26
  {
26
27
  console.log('Registering new user: ' + msgSender)
27
- const tx = new Contract(
28
- addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION],
29
- abiMap[Contracts.USER_REGISTRATION]).connect(opportunityService.getSignersInterface())
28
+ const tx : TransactionResponse = await new Contract(
29
+ addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION], abiMap[Contracts.USER_REGISTRATION])
30
+ .connect(opportunityService.getSignersInterface())
30
31
  .registerNewUser({
31
32
  from: msgSender
32
33
  })
33
34
 
35
+ console.log(tx)
36
+
34
37
  const receipt = await tx.wait()
35
38
  console.log('the receipt')
36
39
  console.log(receipt)
@@ -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",