opportunity-service 0.0.530 → 0.0.536
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/identity/register-new-user.js +13 -5
- package/dist/api/identity/register-new-user.js.map +1 -1
- package/dist/api/index.js +10 -0
- package/dist/api/index.js.map +1 -1
- package/dist/blockchain/abi.json +123 -230
- package/package.json +1 -1
- package/src/api/identity/register-new-user.ts +16 -5
- package/src/api/index.ts +10 -0
- package/src/blockchain/abi.json +123 -230
- package/src/blockchain/addresses.json +5 -5
@@ -9,13 +9,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
};
|
10
10
|
import { Contract } from 'ethers';
|
11
11
|
import opportunityService from '../../OpportunityService';
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import * as abiMap from '../../blockchain/abi.json';
|
12
|
+
import addressMap from '../internal/addresses';
|
13
|
+
import abiMap from '../internal/abis';
|
15
14
|
function registerNewUser() {
|
16
15
|
return __awaiter(this, void 0, void 0, function* () {
|
17
|
-
|
18
|
-
.
|
16
|
+
try {
|
17
|
+
const msgSender = yield opportunityService.getSignersInterface()._address;
|
18
|
+
console.log('Registering new user: ' + msgSender);
|
19
|
+
const txResult = new Contract(addressMap['UserRegistration'], abiMap['UserRegistration']).connect(opportunityService.getSignersInterface())
|
20
|
+
.registerNewUser({
|
21
|
+
from: msgSender
|
22
|
+
});
|
23
|
+
}
|
24
|
+
catch (error) {
|
25
|
+
console.log(error);
|
26
|
+
}
|
19
27
|
});
|
20
28
|
}
|
21
29
|
export default registerNewUser;
|
@@ -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,QAAQ,CAAC;AAC/C,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;
|
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,QAAQ,CAAC;AAC/C,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAA;AAGrC,SAAe,eAAe;;QAC1B,IAAI;YACR,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAA;YACzE,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAA;YAIjD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CACzB,UAAU,CAAC,kBAAkB,CAAC,EAC9B,MAAM,CAAC,kBAAkB,CAAC,CACzB,CAAC,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,CAAC;iBAClD,eAAe,CAAC;gBACb,IAAI,EAAE,SAAS;aAClB,CAAC,CAAA;SACD;QAAC,OAAM,KAAK,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;SACrB;IACL,CAAC;CAAA;AAED,eAAe,eAAe,CAAC"}
|
package/dist/api/index.js
CHANGED
@@ -6,6 +6,8 @@ import { createTask } from "./exchange/create-task";
|
|
6
6
|
import { enterWorkRelationship } from "./exchange/enter-work-relationship";
|
7
7
|
import registerNewUser from "./identity/register-new-user";
|
8
8
|
import { createMarket } from "./market/create-market";
|
9
|
+
import { registerEntity } from "./voting/entity";
|
10
|
+
import { createVotingProcess } from "./voting/process";
|
9
11
|
import { abis, addresses } from './internal/index';
|
10
12
|
import { sendAsync } from './ethereum/sendAsync';
|
11
13
|
function generateAPI() {
|
@@ -14,6 +16,14 @@ function generateAPI() {
|
|
14
16
|
abis: abis,
|
15
17
|
addresses,
|
16
18
|
},
|
19
|
+
voting: {
|
20
|
+
entity: {
|
21
|
+
registerEntity
|
22
|
+
},
|
23
|
+
process: {
|
24
|
+
createVotingProcess
|
25
|
+
}
|
26
|
+
},
|
17
27
|
exchange: {
|
18
28
|
completeRelationship,
|
19
29
|
createTask,
|
package/dist/api/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAU,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,SAAS,WAAW;IAChB,OAAO;QACH,QAAQ,EAAE;YACN,IAAI,EAAE,IAAI;YACV,SAAS;SACZ;QACD,MAAM,EAAE;YACJ,MAAM,EAAE;gBACJ,cAAc;aACjB;YACD,OAAO,EAAE;gBACL,mBAAmB;aACtB;SACJ;QACD,QAAQ,EAAE;YACN,oBAAoB;YACpB,UAAU;YACV,qBAAqB;SACxB;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE;YACN,eAAe;SAClB;QACD,OAAO,EAAE;YACL,YAAY;SACf;QACD,OAAO,EAAE;YACL,IAAI,EAAE;gBACF,gBAAgB,EAAE,oBAAoB;gBACtC,WAAW;gBACX,QAAQ;aACX;SACJ;QACD,QAAQ,EAAE;YACN,SAAS;SACZ;KACJ,CAAA;AACL,CAAC;AAED,MAAM,cAAc,GAAG,WAAW,EAAE,CAAC;AAErC,eAAe,cAAc,CAAC"}
|
package/dist/blockchain/abi.json
CHANGED
@@ -111,21 +111,37 @@
|
|
111
111
|
"internalType": "address",
|
112
112
|
"name": "_daiTokenAddress",
|
113
113
|
"type": "address"
|
114
|
-
},
|
115
|
-
{
|
116
|
-
"internalType": "address",
|
117
|
-
"name": "_cDaiTokenAddress",
|
118
|
-
"type": "address"
|
119
|
-
},
|
120
|
-
{
|
121
|
-
"internalType": "address",
|
122
|
-
"name": "_banker",
|
123
|
-
"type": "address"
|
124
114
|
}
|
125
115
|
],
|
126
116
|
"stateMutability": "nonpayable",
|
127
117
|
"type": "constructor"
|
128
118
|
},
|
119
|
+
{
|
120
|
+
"inputs": [],
|
121
|
+
"name": "HIGH_MEDIAN_EVALUATION_THRESHOLD",
|
122
|
+
"outputs": [
|
123
|
+
{
|
124
|
+
"internalType": "uint8",
|
125
|
+
"name": "",
|
126
|
+
"type": "uint8"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"stateMutability": "view",
|
130
|
+
"type": "function"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"inputs": [],
|
134
|
+
"name": "LOW_MEDIAN_EVALUATION_THRESHOLD",
|
135
|
+
"outputs": [
|
136
|
+
{
|
137
|
+
"internalType": "uint8",
|
138
|
+
"name": "",
|
139
|
+
"type": "uint8"
|
140
|
+
}
|
141
|
+
],
|
142
|
+
"stateMutability": "view",
|
143
|
+
"type": "function"
|
144
|
+
},
|
129
145
|
{
|
130
146
|
"inputs": [],
|
131
147
|
"name": "REVIEW_TYPEHASH",
|
@@ -233,24 +249,29 @@
|
|
233
249
|
{
|
234
250
|
"components": [
|
235
251
|
{
|
236
|
-
"internalType": "
|
237
|
-
"name": "
|
238
|
-
"type": "
|
252
|
+
"internalType": "address",
|
253
|
+
"name": "market",
|
254
|
+
"type": "address"
|
239
255
|
},
|
240
256
|
{
|
241
257
|
"internalType": "uint256",
|
242
|
-
"name": "
|
258
|
+
"name": "marketReputation",
|
243
259
|
"type": "uint256"
|
244
260
|
},
|
245
261
|
{
|
246
262
|
"internalType": "uint256",
|
247
|
-
"name": "
|
263
|
+
"name": "universalReputation",
|
248
264
|
"type": "uint256"
|
249
265
|
}
|
250
266
|
],
|
251
267
|
"internalType": "struct Evaluation.EvaluationState",
|
252
268
|
"name": "evaluationState",
|
253
269
|
"type": "tuple"
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"internalType": "address",
|
273
|
+
"name": "_market",
|
274
|
+
"type": "address"
|
254
275
|
}
|
255
276
|
],
|
256
277
|
"name": "checkWorkerEvaluation",
|
@@ -295,7 +316,7 @@
|
|
295
316
|
"name": "contractStatus",
|
296
317
|
"outputs": [
|
297
318
|
{
|
298
|
-
"internalType": "enum
|
319
|
+
"internalType": "enum Relationship.ContractStatus",
|
299
320
|
"name": "",
|
300
321
|
"type": "uint8"
|
301
322
|
}
|
@@ -316,6 +337,42 @@
|
|
316
337
|
"stateMutability": "view",
|
317
338
|
"type": "function"
|
318
339
|
},
|
340
|
+
{
|
341
|
+
"inputs": [],
|
342
|
+
"name": "dispute",
|
343
|
+
"outputs": [
|
344
|
+
{
|
345
|
+
"internalType": "address",
|
346
|
+
"name": "",
|
347
|
+
"type": "address"
|
348
|
+
}
|
349
|
+
],
|
350
|
+
"stateMutability": "view",
|
351
|
+
"type": "function"
|
352
|
+
},
|
353
|
+
{
|
354
|
+
"inputs": [
|
355
|
+
{
|
356
|
+
"internalType": "address",
|
357
|
+
"name": "_scheduler",
|
358
|
+
"type": "address"
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"internalType": "bytes32",
|
362
|
+
"name": "_complaintMetadataPointer",
|
363
|
+
"type": "bytes32"
|
364
|
+
},
|
365
|
+
{
|
366
|
+
"internalType": "bytes32",
|
367
|
+
"name": "_complaintResponseMetadataPointer",
|
368
|
+
"type": "bytes32"
|
369
|
+
}
|
370
|
+
],
|
371
|
+
"name": "disputeRelationship",
|
372
|
+
"outputs": [],
|
373
|
+
"stateMutability": "nonpayable",
|
374
|
+
"type": "function"
|
375
|
+
},
|
319
376
|
{
|
320
377
|
"inputs": [],
|
321
378
|
"name": "domain_separator",
|
@@ -329,6 +386,19 @@
|
|
329
386
|
"stateMutability": "view",
|
330
387
|
"type": "function"
|
331
388
|
},
|
389
|
+
{
|
390
|
+
"inputs": [],
|
391
|
+
"name": "getRewardAddress",
|
392
|
+
"outputs": [
|
393
|
+
{
|
394
|
+
"internalType": "address",
|
395
|
+
"name": "",
|
396
|
+
"type": "address"
|
397
|
+
}
|
398
|
+
],
|
399
|
+
"stateMutability": "nonpayable",
|
400
|
+
"type": "function"
|
401
|
+
},
|
332
402
|
{
|
333
403
|
"inputs": [],
|
334
404
|
"name": "getTaskSolutionPointer",
|
@@ -357,6 +427,36 @@
|
|
357
427
|
},
|
358
428
|
{
|
359
429
|
"inputs": [
|
430
|
+
{
|
431
|
+
"internalType": "address",
|
432
|
+
"name": "_beneficiary",
|
433
|
+
"type": "address"
|
434
|
+
}
|
435
|
+
],
|
436
|
+
"name": "resolveDisputedReward",
|
437
|
+
"outputs": [],
|
438
|
+
"stateMutability": "nonpayable",
|
439
|
+
"type": "function"
|
440
|
+
},
|
441
|
+
{
|
442
|
+
"inputs": [],
|
443
|
+
"name": "resolveTiedDisputedReward",
|
444
|
+
"outputs": [],
|
445
|
+
"stateMutability": "nonpayable",
|
446
|
+
"type": "function"
|
447
|
+
},
|
448
|
+
{
|
449
|
+
"inputs": [
|
450
|
+
{
|
451
|
+
"internalType": "uint256",
|
452
|
+
"name": "averageMarketWorkerRep",
|
453
|
+
"type": "uint256"
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"internalType": "uint8",
|
457
|
+
"name": "_evaluationScore",
|
458
|
+
"type": "uint8"
|
459
|
+
},
|
360
460
|
{
|
361
461
|
"internalType": "bool",
|
362
462
|
"name": "_approve",
|
@@ -556,13 +656,7 @@
|
|
556
656
|
"type": "function"
|
557
657
|
},
|
558
658
|
{
|
559
|
-
"inputs": [
|
560
|
-
{
|
561
|
-
"internalType": "address",
|
562
|
-
"name": "universalAddress",
|
563
|
-
"type": "address"
|
564
|
-
}
|
565
|
-
],
|
659
|
+
"inputs": [],
|
566
660
|
"name": "registerNewUser",
|
567
661
|
"outputs": [
|
568
662
|
{
|
@@ -598,36 +692,11 @@
|
|
598
692
|
{
|
599
693
|
"indexed": true,
|
600
694
|
"internalType": "address",
|
601
|
-
"name": "
|
602
|
-
"type": "address"
|
603
|
-
},
|
604
|
-
{
|
605
|
-
"indexed": true,
|
606
|
-
"internalType": "string",
|
607
|
-
"name": "marketName",
|
608
|
-
"type": "string"
|
609
|
-
}
|
610
|
-
],
|
611
|
-
"name": "MarketPaused",
|
612
|
-
"type": "event"
|
613
|
-
},
|
614
|
-
{
|
615
|
-
"anonymous": false,
|
616
|
-
"inputs": [
|
617
|
-
{
|
618
|
-
"indexed": true,
|
619
|
-
"internalType": "address",
|
620
|
-
"name": "marketAddress",
|
695
|
+
"name": "participant",
|
621
696
|
"type": "address"
|
622
|
-
},
|
623
|
-
{
|
624
|
-
"indexed": true,
|
625
|
-
"internalType": "string",
|
626
|
-
"name": "marketName",
|
627
|
-
"type": "string"
|
628
697
|
}
|
629
698
|
],
|
630
|
-
"name": "
|
699
|
+
"name": "NewMarketParticipant",
|
631
700
|
"type": "event"
|
632
701
|
},
|
633
702
|
{
|
@@ -687,19 +756,6 @@
|
|
687
756
|
"stateMutability": "view",
|
688
757
|
"type": "function"
|
689
758
|
},
|
690
|
-
{
|
691
|
-
"inputs": [],
|
692
|
-
"name": "_marketStatus",
|
693
|
-
"outputs": [
|
694
|
-
{
|
695
|
-
"internalType": "enum MarketLib.MarketStatus",
|
696
|
-
"name": "",
|
697
|
-
"type": "uint8"
|
698
|
-
}
|
699
|
-
],
|
700
|
-
"stateMutability": "view",
|
701
|
-
"type": "function"
|
702
|
-
},
|
703
759
|
{
|
704
760
|
"inputs": [],
|
705
761
|
"name": "_marketType",
|
@@ -713,32 +769,6 @@
|
|
713
769
|
"stateMutability": "view",
|
714
770
|
"type": "function"
|
715
771
|
},
|
716
|
-
{
|
717
|
-
"inputs": [],
|
718
|
-
"name": "_requiredIndustryWeight",
|
719
|
-
"outputs": [
|
720
|
-
{
|
721
|
-
"internalType": "uint256",
|
722
|
-
"name": "",
|
723
|
-
"type": "uint256"
|
724
|
-
}
|
725
|
-
],
|
726
|
-
"stateMutability": "view",
|
727
|
-
"type": "function"
|
728
|
-
},
|
729
|
-
{
|
730
|
-
"inputs": [],
|
731
|
-
"name": "_requiredReputation",
|
732
|
-
"outputs": [
|
733
|
-
{
|
734
|
-
"internalType": "uint256",
|
735
|
-
"name": "",
|
736
|
-
"type": "uint256"
|
737
|
-
}
|
738
|
-
],
|
739
|
-
"stateMutability": "view",
|
740
|
-
"type": "function"
|
741
|
-
},
|
742
772
|
{
|
743
773
|
"inputs": [
|
744
774
|
{
|
@@ -760,16 +790,6 @@
|
|
760
790
|
"internalType": "address",
|
761
791
|
"name": "_daiTokenAddress",
|
762
792
|
"type": "address"
|
763
|
-
},
|
764
|
-
{
|
765
|
-
"internalType": "address",
|
766
|
-
"name": "_cDaiTokenAddress",
|
767
|
-
"type": "address"
|
768
|
-
},
|
769
|
-
{
|
770
|
-
"internalType": "address",
|
771
|
-
"name": "_banker",
|
772
|
-
"type": "address"
|
773
793
|
}
|
774
794
|
],
|
775
795
|
"name": "createJob",
|
@@ -802,47 +822,6 @@
|
|
802
822
|
],
|
803
823
|
"stateMutability": "view",
|
804
824
|
"type": "function"
|
805
|
-
}
|
806
|
-
],
|
807
|
-
"Dai": [{ "inputs": [{ "internalType": "uint256", "name": "chainId_", "type": "uint256" }], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "src", "type": "address" }, { "indexed": true, "internalType": "address", "name": "guy", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": true, "inputs": [{ "indexed": true, "internalType": "bytes4", "name": "sig", "type": "bytes4" }, { "indexed": true, "internalType": "address", "name": "usr", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "arg1", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "arg2", "type": "bytes32" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "LogNote", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "src", "type": "address" }, { "indexed": true, "internalType": "address", "name": "dst", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PERMIT_TYPEHASH", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "approve", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "deny", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "src", "type": "address" }, { "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "move", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "nonces", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "holder", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "bool", "name": "allowed", "type": "bool" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" }], "name": "permit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "pull", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "push", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "rely", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "transfer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "src", "type": "address" }, { "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "version", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "wards", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }],
|
808
|
-
"Banker": [
|
809
|
-
{
|
810
|
-
"anonymous": false,
|
811
|
-
"inputs": [
|
812
|
-
{
|
813
|
-
"indexed": false,
|
814
|
-
"internalType": "address",
|
815
|
-
"name": "donor",
|
816
|
-
"type": "address"
|
817
|
-
},
|
818
|
-
{
|
819
|
-
"indexed": false,
|
820
|
-
"internalType": "uint256",
|
821
|
-
"name": "amount",
|
822
|
-
"type": "uint256"
|
823
|
-
}
|
824
|
-
],
|
825
|
-
"name": "ERC20Redeemed",
|
826
|
-
"type": "event"
|
827
|
-
},
|
828
|
-
{
|
829
|
-
"anonymous": false,
|
830
|
-
"inputs": [
|
831
|
-
{
|
832
|
-
"indexed": false,
|
833
|
-
"internalType": "address",
|
834
|
-
"name": "donor",
|
835
|
-
"type": "address"
|
836
|
-
},
|
837
|
-
{
|
838
|
-
"indexed": false,
|
839
|
-
"internalType": "uint256",
|
840
|
-
"name": "amount",
|
841
|
-
"type": "uint256"
|
842
|
-
}
|
843
|
-
],
|
844
|
-
"name": "ERC20Supplied",
|
845
|
-
"type": "event"
|
846
825
|
},
|
847
826
|
{
|
848
827
|
"inputs": [
|
@@ -852,104 +831,18 @@
|
|
852
831
|
"type": "address"
|
853
832
|
}
|
854
833
|
],
|
855
|
-
"name": "
|
856
|
-
"outputs": [
|
857
|
-
{
|
858
|
-
"internalType": "uint256",
|
859
|
-
"name": "",
|
860
|
-
"type": "uint256"
|
861
|
-
}
|
862
|
-
],
|
863
|
-
"stateMutability": "view",
|
864
|
-
"type": "function"
|
865
|
-
},
|
866
|
-
{
|
867
|
-
"inputs": [
|
868
|
-
{
|
869
|
-
"internalType": "address",
|
870
|
-
"name": "_donor",
|
871
|
-
"type": "address"
|
872
|
-
}
|
873
|
-
],
|
874
|
-
"name": "checkRedeemableAmount",
|
834
|
+
"name": "relationshipsToOwner",
|
875
835
|
"outputs": [
|
876
|
-
{
|
877
|
-
"internalType": "uint256",
|
878
|
-
"name": "",
|
879
|
-
"type": "uint256"
|
880
|
-
}
|
881
|
-
],
|
882
|
-
"stateMutability": "nonpayable",
|
883
|
-
"type": "function"
|
884
|
-
},
|
885
|
-
{
|
886
|
-
"inputs": [
|
887
|
-
{
|
888
|
-
"internalType": "uint256",
|
889
|
-
"name": "amount",
|
890
|
-
"type": "uint256"
|
891
|
-
},
|
892
|
-
{
|
893
|
-
"internalType": "bool",
|
894
|
-
"name": "redeemType",
|
895
|
-
"type": "bool"
|
896
|
-
},
|
897
836
|
{
|
898
837
|
"internalType": "address",
|
899
|
-
"name": "_cErc20Contract",
|
900
|
-
"type": "address"
|
901
|
-
},
|
902
|
-
{
|
903
|
-
"internalType": "address",
|
904
|
-
"name": "_donor",
|
905
|
-
"type": "address"
|
906
|
-
}
|
907
|
-
],
|
908
|
-
"name": "redeemCErc20Tokens",
|
909
|
-
"outputs": [
|
910
|
-
{
|
911
|
-
"internalType": "bool",
|
912
838
|
"name": "",
|
913
|
-
"type": "bool"
|
914
|
-
}
|
915
|
-
],
|
916
|
-
"stateMutability": "nonpayable",
|
917
|
-
"type": "function"
|
918
|
-
},
|
919
|
-
{
|
920
|
-
"inputs": [
|
921
|
-
{
|
922
|
-
"internalType": "address",
|
923
|
-
"name": "_erc20Contract",
|
924
|
-
"type": "address"
|
925
|
-
},
|
926
|
-
{
|
927
|
-
"internalType": "address",
|
928
|
-
"name": "_cErc20Contract",
|
929
839
|
"type": "address"
|
930
|
-
},
|
931
|
-
{
|
932
|
-
"internalType": "address",
|
933
|
-
"name": "_donor",
|
934
|
-
"type": "address"
|
935
|
-
},
|
936
|
-
{
|
937
|
-
"internalType": "uint256",
|
938
|
-
"name": "_numTokensToSupply",
|
939
|
-
"type": "uint256"
|
940
|
-
}
|
941
|
-
],
|
942
|
-
"name": "supplyErc20ToCompound",
|
943
|
-
"outputs": [
|
944
|
-
{
|
945
|
-
"internalType": "uint256",
|
946
|
-
"name": "",
|
947
|
-
"type": "uint256"
|
948
840
|
}
|
949
841
|
],
|
950
|
-
"stateMutability": "
|
842
|
+
"stateMutability": "view",
|
951
843
|
"type": "function"
|
952
844
|
}
|
953
845
|
],
|
954
|
-
"
|
846
|
+
"Dai": [{ "inputs": [{ "internalType": "uint256", "name": "chainId_", "type": "uint256" }], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "src", "type": "address" }, { "indexed": true, "internalType": "address", "name": "guy", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": true, "inputs": [{ "indexed": true, "internalType": "bytes4", "name": "sig", "type": "bytes4" }, { "indexed": true, "internalType": "address", "name": "usr", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "arg1", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "arg2", "type": "bytes32" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "LogNote", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "src", "type": "address" }, { "indexed": true, "internalType": "address", "name": "dst", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "PERMIT_TYPEHASH", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "approve", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "burn", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "deny", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "src", "type": "address" }, { "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "move", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "nonces", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "holder", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "bool", "name": "allowed", "type": "bool" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" }], "name": "permit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "pull", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "push", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "rely", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "transfer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [{ "internalType": "address", "name": "src", "type": "address" }, { "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "version", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "wards", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "payable": false, "stateMutability": "view", "type": "function" }],
|
847
|
+
"Dispute": []
|
955
848
|
}
|
package/package.json
CHANGED
@@ -2,16 +2,27 @@ import { Contract, Transaction } from 'ethers';
|
|
2
2
|
import opportunityService from '../../OpportunityService';
|
3
3
|
import { Contracts } from '../../constants';
|
4
4
|
|
5
|
-
import
|
6
|
-
import
|
5
|
+
import addressMap from '../internal/addresses'
|
6
|
+
import abiMap from '../internal/abis'
|
7
7
|
import { Result } from 'ethers/lib/utils';
|
8
8
|
|
9
9
|
async function registerNewUser() {
|
10
|
+
try {
|
11
|
+
const msgSender = await opportunityService.getSignersInterface()._address
|
12
|
+
console.log('Registering new user: ' + msgSender)
|
13
|
+
|
14
|
+
|
15
|
+
|
10
16
|
const txResult = new Contract(
|
11
|
-
addressMap[
|
12
|
-
abiMap[
|
17
|
+
addressMap['UserRegistration'],
|
18
|
+
abiMap['UserRegistration']
|
13
19
|
).connect(opportunityService.getSignersInterface())
|
14
|
-
.registerNewUser(
|
20
|
+
.registerNewUser({
|
21
|
+
from: msgSender
|
22
|
+
})
|
23
|
+
} catch(error) {
|
24
|
+
console.log(error)
|
25
|
+
}
|
15
26
|
}
|
16
27
|
|
17
28
|
export default registerNewUser;
|
package/src/api/index.ts
CHANGED
@@ -6,6 +6,8 @@ import { createTask } from "./exchange/create-task";
|
|
6
6
|
import { enterWorkRelationship } from "./exchange/enter-work-relationship";
|
7
7
|
import registerNewUser from "./identity/register-new-user";
|
8
8
|
import { createMarket } from "./market/create-market";
|
9
|
+
import { registerEntity } from "./voting/entity";
|
10
|
+
import { createVotingProcess } from "./voting/process";
|
9
11
|
|
10
12
|
import { abis, events, addresses } from './internal/index';
|
11
13
|
|
@@ -17,6 +19,14 @@ function generateAPI() {
|
|
17
19
|
abis: abis,
|
18
20
|
addresses,
|
19
21
|
},
|
22
|
+
voting: {
|
23
|
+
entity: {
|
24
|
+
registerEntity
|
25
|
+
},
|
26
|
+
process: {
|
27
|
+
createVotingProcess
|
28
|
+
}
|
29
|
+
},
|
20
30
|
exchange: {
|
21
31
|
completeRelationship,
|
22
32
|
createTask,
|
package/src/blockchain/abi.json
CHANGED
@@ -111,21 +111,37 @@
|
|
111
111
|
"internalType": "address",
|
112
112
|
"name": "_daiTokenAddress",
|
113
113
|
"type": "address"
|
114
|
-
},
|
115
|
-
{
|
116
|
-
"internalType": "address",
|
117
|
-
"name": "_cDaiTokenAddress",
|
118
|
-
"type": "address"
|
119
|
-
},
|
120
|
-
{
|
121
|
-
"internalType": "address",
|
122
|
-
"name": "_banker",
|
123
|
-
"type": "address"
|
124
114
|
}
|
125
115
|
],
|
126
116
|
"stateMutability": "nonpayable",
|
127
117
|
"type": "constructor"
|
128
118
|
},
|
119
|
+
{
|
120
|
+
"inputs": [],
|
121
|
+
"name": "HIGH_MEDIAN_EVALUATION_THRESHOLD",
|
122
|
+
"outputs": [
|
123
|
+
{
|
124
|
+
"internalType": "uint8",
|
125
|
+
"name": "",
|
126
|
+
"type": "uint8"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"stateMutability": "view",
|
130
|
+
"type": "function"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"inputs": [],
|
134
|
+
"name": "LOW_MEDIAN_EVALUATION_THRESHOLD",
|
135
|
+
"outputs": [
|
136
|
+
{
|
137
|
+
"internalType": "uint8",
|
138
|
+
"name": "",
|
139
|
+
"type": "uint8"
|
140
|
+
}
|
141
|
+
],
|
142
|
+
"stateMutability": "view",
|
143
|
+
"type": "function"
|
144
|
+
},
|
129
145
|
{
|
130
146
|
"inputs": [],
|
131
147
|
"name": "REVIEW_TYPEHASH",
|
@@ -233,24 +249,29 @@
|
|
233
249
|
{
|
234
250
|
"components": [
|
235
251
|
{
|
236
|
-
"internalType": "
|
237
|
-
"name": "
|
238
|
-
"type": "
|
252
|
+
"internalType": "address",
|
253
|
+
"name": "market",
|
254
|
+
"type": "address"
|
239
255
|
},
|
240
256
|
{
|
241
257
|
"internalType": "uint256",
|
242
|
-
"name": "
|
258
|
+
"name": "marketReputation",
|
243
259
|
"type": "uint256"
|
244
260
|
},
|
245
261
|
{
|
246
262
|
"internalType": "uint256",
|
247
|
-
"name": "
|
263
|
+
"name": "universalReputation",
|
248
264
|
"type": "uint256"
|
249
265
|
}
|
250
266
|
],
|
251
267
|
"internalType": "struct Evaluation.EvaluationState",
|
252
268
|
"name": "evaluationState",
|
253
269
|
"type": "tuple"
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"internalType": "address",
|
273
|
+
"name": "_market",
|
274
|
+
"type": "address"
|
254
275
|
}
|
255
276
|
],
|
256
277
|
"name": "checkWorkerEvaluation",
|
@@ -295,7 +316,7 @@
|
|
295
316
|
"name": "contractStatus",
|
296
317
|
"outputs": [
|
297
318
|
{
|
298
|
-
"internalType": "enum
|
319
|
+
"internalType": "enum Relationship.ContractStatus",
|
299
320
|
"name": "",
|
300
321
|
"type": "uint8"
|
301
322
|
}
|
@@ -316,6 +337,42 @@
|
|
316
337
|
"stateMutability": "view",
|
317
338
|
"type": "function"
|
318
339
|
},
|
340
|
+
{
|
341
|
+
"inputs": [],
|
342
|
+
"name": "dispute",
|
343
|
+
"outputs": [
|
344
|
+
{
|
345
|
+
"internalType": "address",
|
346
|
+
"name": "",
|
347
|
+
"type": "address"
|
348
|
+
}
|
349
|
+
],
|
350
|
+
"stateMutability": "view",
|
351
|
+
"type": "function"
|
352
|
+
},
|
353
|
+
{
|
354
|
+
"inputs": [
|
355
|
+
{
|
356
|
+
"internalType": "address",
|
357
|
+
"name": "_scheduler",
|
358
|
+
"type": "address"
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"internalType": "bytes32",
|
362
|
+
"name": "_complaintMetadataPointer",
|
363
|
+
"type": "bytes32"
|
364
|
+
},
|
365
|
+
{
|
366
|
+
"internalType": "bytes32",
|
367
|
+
"name": "_complaintResponseMetadataPointer",
|
368
|
+
"type": "bytes32"
|
369
|
+
}
|
370
|
+
],
|
371
|
+
"name": "disputeRelationship",
|
372
|
+
"outputs": [],
|
373
|
+
"stateMutability": "nonpayable",
|
374
|
+
"type": "function"
|
375
|
+
},
|
319
376
|
{
|
320
377
|
"inputs": [],
|
321
378
|
"name": "domain_separator",
|
@@ -329,6 +386,19 @@
|
|
329
386
|
"stateMutability": "view",
|
330
387
|
"type": "function"
|
331
388
|
},
|
389
|
+
{
|
390
|
+
"inputs": [],
|
391
|
+
"name": "getRewardAddress",
|
392
|
+
"outputs": [
|
393
|
+
{
|
394
|
+
"internalType": "address",
|
395
|
+
"name": "",
|
396
|
+
"type": "address"
|
397
|
+
}
|
398
|
+
],
|
399
|
+
"stateMutability": "nonpayable",
|
400
|
+
"type": "function"
|
401
|
+
},
|
332
402
|
{
|
333
403
|
"inputs": [],
|
334
404
|
"name": "getTaskSolutionPointer",
|
@@ -357,6 +427,36 @@
|
|
357
427
|
},
|
358
428
|
{
|
359
429
|
"inputs": [
|
430
|
+
{
|
431
|
+
"internalType": "address",
|
432
|
+
"name": "_beneficiary",
|
433
|
+
"type": "address"
|
434
|
+
}
|
435
|
+
],
|
436
|
+
"name": "resolveDisputedReward",
|
437
|
+
"outputs": [],
|
438
|
+
"stateMutability": "nonpayable",
|
439
|
+
"type": "function"
|
440
|
+
},
|
441
|
+
{
|
442
|
+
"inputs": [],
|
443
|
+
"name": "resolveTiedDisputedReward",
|
444
|
+
"outputs": [],
|
445
|
+
"stateMutability": "nonpayable",
|
446
|
+
"type": "function"
|
447
|
+
},
|
448
|
+
{
|
449
|
+
"inputs": [
|
450
|
+
{
|
451
|
+
"internalType": "uint256",
|
452
|
+
"name": "averageMarketWorkerRep",
|
453
|
+
"type": "uint256"
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"internalType": "uint8",
|
457
|
+
"name": "_evaluationScore",
|
458
|
+
"type": "uint8"
|
459
|
+
},
|
360
460
|
{
|
361
461
|
"internalType": "bool",
|
362
462
|
"name": "_approve",
|
@@ -556,13 +656,7 @@
|
|
556
656
|
"type": "function"
|
557
657
|
},
|
558
658
|
{
|
559
|
-
"inputs": [
|
560
|
-
{
|
561
|
-
"internalType": "address",
|
562
|
-
"name": "universalAddress",
|
563
|
-
"type": "address"
|
564
|
-
}
|
565
|
-
],
|
659
|
+
"inputs": [],
|
566
660
|
"name": "registerNewUser",
|
567
661
|
"outputs": [
|
568
662
|
{
|
@@ -598,36 +692,11 @@
|
|
598
692
|
{
|
599
693
|
"indexed": true,
|
600
694
|
"internalType": "address",
|
601
|
-
"name": "
|
602
|
-
"type": "address"
|
603
|
-
},
|
604
|
-
{
|
605
|
-
"indexed": true,
|
606
|
-
"internalType": "string",
|
607
|
-
"name": "marketName",
|
608
|
-
"type": "string"
|
609
|
-
}
|
610
|
-
],
|
611
|
-
"name": "MarketPaused",
|
612
|
-
"type": "event"
|
613
|
-
},
|
614
|
-
{
|
615
|
-
"anonymous": false,
|
616
|
-
"inputs": [
|
617
|
-
{
|
618
|
-
"indexed": true,
|
619
|
-
"internalType": "address",
|
620
|
-
"name": "marketAddress",
|
695
|
+
"name": "participant",
|
621
696
|
"type": "address"
|
622
|
-
},
|
623
|
-
{
|
624
|
-
"indexed": true,
|
625
|
-
"internalType": "string",
|
626
|
-
"name": "marketName",
|
627
|
-
"type": "string"
|
628
697
|
}
|
629
698
|
],
|
630
|
-
"name": "
|
699
|
+
"name": "NewMarketParticipant",
|
631
700
|
"type": "event"
|
632
701
|
},
|
633
702
|
{
|
@@ -687,19 +756,6 @@
|
|
687
756
|
"stateMutability": "view",
|
688
757
|
"type": "function"
|
689
758
|
},
|
690
|
-
{
|
691
|
-
"inputs": [],
|
692
|
-
"name": "_marketStatus",
|
693
|
-
"outputs": [
|
694
|
-
{
|
695
|
-
"internalType": "enum MarketLib.MarketStatus",
|
696
|
-
"name": "",
|
697
|
-
"type": "uint8"
|
698
|
-
}
|
699
|
-
],
|
700
|
-
"stateMutability": "view",
|
701
|
-
"type": "function"
|
702
|
-
},
|
703
759
|
{
|
704
760
|
"inputs": [],
|
705
761
|
"name": "_marketType",
|
@@ -713,32 +769,6 @@
|
|
713
769
|
"stateMutability": "view",
|
714
770
|
"type": "function"
|
715
771
|
},
|
716
|
-
{
|
717
|
-
"inputs": [],
|
718
|
-
"name": "_requiredIndustryWeight",
|
719
|
-
"outputs": [
|
720
|
-
{
|
721
|
-
"internalType": "uint256",
|
722
|
-
"name": "",
|
723
|
-
"type": "uint256"
|
724
|
-
}
|
725
|
-
],
|
726
|
-
"stateMutability": "view",
|
727
|
-
"type": "function"
|
728
|
-
},
|
729
|
-
{
|
730
|
-
"inputs": [],
|
731
|
-
"name": "_requiredReputation",
|
732
|
-
"outputs": [
|
733
|
-
{
|
734
|
-
"internalType": "uint256",
|
735
|
-
"name": "",
|
736
|
-
"type": "uint256"
|
737
|
-
}
|
738
|
-
],
|
739
|
-
"stateMutability": "view",
|
740
|
-
"type": "function"
|
741
|
-
},
|
742
772
|
{
|
743
773
|
"inputs": [
|
744
774
|
{
|
@@ -760,16 +790,6 @@
|
|
760
790
|
"internalType": "address",
|
761
791
|
"name": "_daiTokenAddress",
|
762
792
|
"type": "address"
|
763
|
-
},
|
764
|
-
{
|
765
|
-
"internalType": "address",
|
766
|
-
"name": "_cDaiTokenAddress",
|
767
|
-
"type": "address"
|
768
|
-
},
|
769
|
-
{
|
770
|
-
"internalType": "address",
|
771
|
-
"name": "_banker",
|
772
|
-
"type": "address"
|
773
793
|
}
|
774
794
|
],
|
775
795
|
"name": "createJob",
|
@@ -802,47 +822,6 @@
|
|
802
822
|
],
|
803
823
|
"stateMutability": "view",
|
804
824
|
"type": "function"
|
805
|
-
}
|
806
|
-
],
|
807
|
-
"Dai": [{"inputs":[{"internalType":"uint256","name":"chainId_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"guy","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"arg1","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg2","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"dst","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"move","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"allowed","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"pull","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"push","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],
|
808
|
-
"Banker": [
|
809
|
-
{
|
810
|
-
"anonymous": false,
|
811
|
-
"inputs": [
|
812
|
-
{
|
813
|
-
"indexed": false,
|
814
|
-
"internalType": "address",
|
815
|
-
"name": "donor",
|
816
|
-
"type": "address"
|
817
|
-
},
|
818
|
-
{
|
819
|
-
"indexed": false,
|
820
|
-
"internalType": "uint256",
|
821
|
-
"name": "amount",
|
822
|
-
"type": "uint256"
|
823
|
-
}
|
824
|
-
],
|
825
|
-
"name": "ERC20Redeemed",
|
826
|
-
"type": "event"
|
827
|
-
},
|
828
|
-
{
|
829
|
-
"anonymous": false,
|
830
|
-
"inputs": [
|
831
|
-
{
|
832
|
-
"indexed": false,
|
833
|
-
"internalType": "address",
|
834
|
-
"name": "donor",
|
835
|
-
"type": "address"
|
836
|
-
},
|
837
|
-
{
|
838
|
-
"indexed": false,
|
839
|
-
"internalType": "uint256",
|
840
|
-
"name": "amount",
|
841
|
-
"type": "uint256"
|
842
|
-
}
|
843
|
-
],
|
844
|
-
"name": "ERC20Supplied",
|
845
|
-
"type": "event"
|
846
825
|
},
|
847
826
|
{
|
848
827
|
"inputs": [
|
@@ -852,105 +831,19 @@
|
|
852
831
|
"type": "address"
|
853
832
|
}
|
854
833
|
],
|
855
|
-
"name": "
|
856
|
-
"outputs": [
|
857
|
-
{
|
858
|
-
"internalType": "uint256",
|
859
|
-
"name": "",
|
860
|
-
"type": "uint256"
|
861
|
-
}
|
862
|
-
],
|
863
|
-
"stateMutability": "view",
|
864
|
-
"type": "function"
|
865
|
-
},
|
866
|
-
{
|
867
|
-
"inputs": [
|
868
|
-
{
|
869
|
-
"internalType": "address",
|
870
|
-
"name": "_donor",
|
871
|
-
"type": "address"
|
872
|
-
}
|
873
|
-
],
|
874
|
-
"name": "checkRedeemableAmount",
|
834
|
+
"name": "relationshipsToOwner",
|
875
835
|
"outputs": [
|
876
|
-
{
|
877
|
-
"internalType": "uint256",
|
878
|
-
"name": "",
|
879
|
-
"type": "uint256"
|
880
|
-
}
|
881
|
-
],
|
882
|
-
"stateMutability": "nonpayable",
|
883
|
-
"type": "function"
|
884
|
-
},
|
885
|
-
{
|
886
|
-
"inputs": [
|
887
|
-
{
|
888
|
-
"internalType": "uint256",
|
889
|
-
"name": "amount",
|
890
|
-
"type": "uint256"
|
891
|
-
},
|
892
|
-
{
|
893
|
-
"internalType": "bool",
|
894
|
-
"name": "redeemType",
|
895
|
-
"type": "bool"
|
896
|
-
},
|
897
836
|
{
|
898
837
|
"internalType": "address",
|
899
|
-
"name": "_cErc20Contract",
|
900
|
-
"type": "address"
|
901
|
-
},
|
902
|
-
{
|
903
|
-
"internalType": "address",
|
904
|
-
"name": "_donor",
|
905
|
-
"type": "address"
|
906
|
-
}
|
907
|
-
],
|
908
|
-
"name": "redeemCErc20Tokens",
|
909
|
-
"outputs": [
|
910
|
-
{
|
911
|
-
"internalType": "bool",
|
912
838
|
"name": "",
|
913
|
-
"type": "bool"
|
914
|
-
}
|
915
|
-
],
|
916
|
-
"stateMutability": "nonpayable",
|
917
|
-
"type": "function"
|
918
|
-
},
|
919
|
-
{
|
920
|
-
"inputs": [
|
921
|
-
{
|
922
|
-
"internalType": "address",
|
923
|
-
"name": "_erc20Contract",
|
924
|
-
"type": "address"
|
925
|
-
},
|
926
|
-
{
|
927
|
-
"internalType": "address",
|
928
|
-
"name": "_cErc20Contract",
|
929
839
|
"type": "address"
|
930
|
-
},
|
931
|
-
{
|
932
|
-
"internalType": "address",
|
933
|
-
"name": "_donor",
|
934
|
-
"type": "address"
|
935
|
-
},
|
936
|
-
{
|
937
|
-
"internalType": "uint256",
|
938
|
-
"name": "_numTokensToSupply",
|
939
|
-
"type": "uint256"
|
940
|
-
}
|
941
|
-
],
|
942
|
-
"name": "supplyErc20ToCompound",
|
943
|
-
"outputs": [
|
944
|
-
{
|
945
|
-
"internalType": "uint256",
|
946
|
-
"name": "",
|
947
|
-
"type": "uint256"
|
948
840
|
}
|
949
841
|
],
|
950
|
-
"stateMutability": "
|
842
|
+
"stateMutability": "view",
|
951
843
|
"type": "function"
|
952
844
|
}
|
953
845
|
],
|
954
|
-
"
|
846
|
+
"Dai": [{"inputs":[{"internalType":"uint256","name":"chainId_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"guy","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"arg1","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg2","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"dst","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"move","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"allowed","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"pull","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"push","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}],
|
847
|
+
"Dispute": []
|
955
848
|
}
|
956
849
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
"MarketFactory": "0x8eb065482F681537e90eab826540E9DF8D8cBd89",
|
3
|
+
"UserRegistration": "0xc4F1B570e57A5035a25035AFA5f7CbA204627024",
|
4
|
+
"UserSummaryFactory": "",
|
5
|
+
"Dai": "0x6b175474e89094c44da98b954eedeac495271d0f",
|
6
|
+
"Scheduler": "0x"
|
7
7
|
}
|
8
8
|
|
9
9
|
|