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
@@ -36,7 +36,6 @@ class OpportunityService {
36
36
  const web3 = createAlchemyWeb3(process.env.NODE_ENV == 'dev' ? "https://eth-mainnet.alchemyapi.io/v2/JKVeBInuvm4wq9_8fECUmazLbm7Vpv5V" : "https://eth-mainnet.alchemyapi.io/v2/7d2CRio84usjQwU8tRPG75rqV1wJmX_W");
37
37
  this.ethNetwork = 'mainnet';
38
38
  this.opportunityProvider = new ethers.providers.JsonRpcProvider( /*process.env.NODE_ENV == 'dev' ? "https://eth-mainnet.alchemyapi.io/v2/JKVeBInuvm4wq9_8fECUmazLbm7Vpv5V" : "https://eth-mainnet.alchemyapi.io/v2/7d2CRio84usjQwU8tRPG75rqV1wJmX_W"*/);
39
- console.log(this.opportunityProvider);
40
39
  }
41
40
  /**
42
41
  * The static method that controls the access to the singleton instance.
@@ -78,7 +77,6 @@ class OpportunityService {
78
77
  default:
79
78
  this.ethNetwork = 'rinkeby';
80
79
  }
81
- console.log(networkId);
82
80
  //this.storageProvider = new OpportunityStorageProvider(dbAddress)
83
81
  }
84
82
  getEthNetwork() {
@@ -92,10 +90,8 @@ class OpportunityService {
92
90
  if (this.running) {
93
91
  return;
94
92
  }
95
- console.log('Starting service...');
96
93
  this.sync();
97
94
  this.running = true;
98
- console.log('Finished starting service...');
99
95
  });
100
96
  }
101
97
  shutdownService() {
@@ -117,11 +113,9 @@ class OpportunityService {
117
113
  .then(() => {
118
114
  this.syncing = false;
119
115
  this.eventEmitter.emit(RPCEvents.StopSyncing);
120
- console.log('Finished syncing ethereum node.');
121
116
  this.syncing = false;
122
117
  })
123
118
  .catch(err => {
124
- console.log('Error while syncing ethereum node: ' + err);
125
119
  this.syncing = false;
126
120
  });
127
121
  }
@@ -133,13 +127,8 @@ class OpportunityService {
133
127
  }
134
128
  getProviderInterface() {
135
129
  if (this.opportunityProvider) {
136
- console.log('Provider is not null');
137
- console.log(this.opportunityProvider);
138
130
  return this.opportunityProvider;
139
131
  }
140
- else {
141
- console.log('provider is null');
142
- }
143
132
  return this.ethersProvider;
144
133
  }
145
134
  getSignersInterface() {
@@ -1 +1 @@
1
- {"version":3,"file":"OpportunityService.js","sourceRoot":"","sources":["../src/OpportunityService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAA6B,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,uBAAuB,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAKxE,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,cAAc,MAAM,aAAa,CAAC;AAGzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAItD,MAAM,kBAAkB;IAmBpB;;;OAGG;IACH;QAtBQ,iBAAY,GAAG,uBAAuB,CAAC;QACvC,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAY,KAAK,CAAC;QAEzB,mBAAc,GAA+B,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;QAChG,iBAAY,GAA6B,IAAI,CAAC;QAE9C,sBAAiB,GAAG,IAAI,CAAC;QACzB,oBAAe,GAAG,IAAI,CAAC;QACvB,mBAAc,GAAG,IAAI,CAAC;QACtB,eAAU,GAA2B,SAAS,CAAA;QAC9C,oBAAe,GAAG,IAAI,CAAC;QACxB,YAAO,GAAG,IAAI,CAAA;QAId,QAAG,GAAI,cAAc,CAAC;QAOzB,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAE,uEAAuE,CAAC,CAAC,CAAC,uEAAuE,CAAC,CAAC;QACnN,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AI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC/C,oBAAoB,EAAE;aACjB,IAAI,CAAC,GAAG,EAAE;YACP,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,CAAC,CAAC,CAAA;IACV,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,2BAA2B;QACvB,OAAO,kBAAkB,CAAC,eAAe,CAAC;IAC9C,CAAC;IAED,oBAAoB;QAChB,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC1B,OAAO,IAAI,CAAC,mBAAmB,CAAA;SAClC;QAED,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,mBAAmB;QACf,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,kBAAkB;QACd,OAAO,IAAI,CAAC,eAAe,CAAA;IAC/B,CAAC;;AArIc,kCAAe,GAAG,IAAI,IAAI,CAAC,uBAAuB,CAAC,CAAA;AAwItE,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;AAC5D,eAAe,kBAAkB,CAAC"}
@@ -26,10 +26,6 @@ export function sendAsync(method, params, from) {
26
26
  const r = '0x' + realResult.slice(0, 64);
27
27
  const s = '0x' + realResult.slice(64, 128);
28
28
  const v = parseInt(realResult.substring(128, 130), 16);
29
- console.log('Service: ' + realResult);
30
- console.log('R: ' + r);
31
- console.log('S: ' + s);
32
- console.log('V: ' + v);
33
29
  resolve({
34
30
  v, r, s
35
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sendAsync.js","sourceRo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;aAAA,CAAC,CAAC;QACL,CAAC,CAAA,CAAC,CAAA;IACN,CAAC;CAAA"}
1
+ {"version":3,"file":"sendAsync.js","sourceRoot":"","sources":["../../../src/api/ethereum/sendAsync.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAE1D,MAAM,UAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI;;QAChD,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YAC7C,MAAM,kBAAkB,CAAC,2BAA2B,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC;gBAC7E,EAAE,EAAE,CAAC;gBACL,MAAM;gBACN,MAAM;gBACN,IAAI;aACL,EAAE,UAAe,KAAK,EAAE,MAAM;;oBAC7B,IAAI,KAAK,EAAE;wBACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;wBAClB,MAAM,KAAK,CAAC;qBACb;oBAEC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;oBACpD,MAAM,CAAC,GAAG,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACzC,MAAM,CAAC,GAAG,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;oBAC3C,MAAM,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;oBAEvD,OAAO,CAAC;wBACJ,CAAC,EAAE,CAAC,EAAE,CAAC;qBACV,CAAC,CAAA;gBAEN,CAAC;aAAA,CAAC,CAAC;QACL,CAAC,CAAA,CAAC,CAAA;IACN,CAAC;CAAA"}
@@ -1,40 +1 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { Contracts } from "../../constants";
11
- import * as abiMap from '../../blockchain/abi.json';
12
- import * as bytecodeMap from '../../blockchain/bytecode.json';
13
- import opportunityService from "../../OpportunityService";
14
- import { ContractFactory } from 'ethers';
15
- const Tx = require("ethereumjs-tx").Transaction;
16
- function createDispute(data) {
17
- return __awaiter(this, void 0, void 0, function* () {
18
- //createData(data)
19
- const parsedData = JSON.parse(data);
20
- const abi = abiMap[Contracts.DISPUTE];
21
- const complaintMetadataPointer = parsedData['complaintMetadataPointer'];
22
- const complaintResponseMetadataPointer = parsedData['complaintResponseMetadataPointer'];
23
- const relationshipAddress = parsedData['relationshipAddress'];
24
- console.log(abi);
25
- console.log(parsedData);
26
- try {
27
- // The factory we use for deploying contracts
28
- const disputeContractfactory = new ContractFactory(abi, bytecodeMap[Contracts.DISPUTE], opportunityService.getSignersInterface());
29
- // Deploy an instance of the contract
30
- const disputeContract = yield disputeContractfactory.deploy(relationshipAddress, complaintMetadataPointer, complaintResponseMetadataPointer);
31
- const txReceipt = yield disputeContract.deployTransaction.wait();
32
- console.log(txReceipt);
33
- }
34
- catch (error) {
35
- console.log('Service: Caught error creating new job: ' + error);
36
- }
37
- });
38
- }
39
- export { createDispute };
40
1
  //# sourceMappingURL=create-dispute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-dispute.js","sourceRoot":"","sources":["../../../src/api/exchange/create-dispute.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAgB,MAAM,iBAAiB,CAAC;AAI1D,OAAO,KAAK,MAAM,MAAM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AAA"}
1
+ {"version":3,"file":"create-dispute.js","sourceRoot":"","sources":["../../../src/api/exchange/create-dispute.ts"],"names":[],"mappings":""}
@@ -15,35 +15,23 @@ import { ethers } from 'ethers';
15
15
  const Tx = require("ethereumjs-tx").Transaction;
16
16
  function createTask(data) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
- console.log('a');
19
18
  const parsedData = JSON.parse(data);
20
19
  const abi = abiMap[Contracts.MARKET];
21
- console.log(abi);
22
- console.log(parsedData);
23
20
  const taskOwner = parsedData["taskOwner"];
24
21
  const taskMarket = parsedData["taskMarket"];
25
22
  const taskBounty = Number(parsedData["taskBounty"]);
26
23
  const taskMetadataPointer = parsedData["taskMetadataPointer"];
27
- console.log('b');
28
- console.log(taskOwner);
29
- console.log(taskMarket);
30
- console.log('h');
31
- console.log(taskBounty);
32
- console.log(taskMetadataPointer);
24
+ const registrar = addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION];
33
25
  if (taskOwner == null || taskMarket == 0 || taskBounty == 0 || taskMetadataPointer == '') {
34
26
  throw new Error('Null value in data');
35
27
  }
36
- console.log('C');
37
28
  try {
38
- console.log('d');
39
29
  const contract = yield new ethers.Contract(taskMarket, abi).connect(opportunityService.getSignersInterface());
40
- console.log('e');
41
- const txResponse = yield contract.functions.createJob(ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI]);
30
+ const txResponse = yield contract.functions.createJob(registrar, ContractType.NORMAL, taskMetadataPointer, addressMap[opportunityService.getEthNetwork()][Contracts.DAI]);
42
31
  const txReceipt = yield txResponse.wait();
43
- console.log(txReceipt);
44
32
  }
45
33
  catch (error) {
46
- console.log('Service: Caught error creating new job: ' + error);
34
+ console.log(error);
47
35
  }
48
36
  });
49
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../src/api/exchange/create-task.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,YAA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AAErB;;;;;;;;;;;;;;;;;;EAkBE"}
@@ -1,61 +1 @@
1
- function enterWorkRelationship(relationshipAddress, evaluationState, callback) {
2
- /*const abi = Contract.Market.WorkRelationship.abi;
3
- const bytecode = '608060405234801561001057600080fd5b50606460008190555060ca806100276000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806380219655146037578063ed0109a5146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b6068608c565b6040518082815260200191505060405180910390f35b806000540160008190555050565b6000805490509056fea265627a7a7230582002f975dfd70c1b1f649671805826a83fc9b92457fe7dd245527f56b7776d043464736f6c634300050a0032';
4
-
5
- const contract = opportunityConnectionProvider.getProviderInterface().web3.eth.Contract(JSON.parse(abi)); //web3.eth.Contract(JSON.parse(abi));
6
-
7
- const txParameter : FakeTransaction = {
8
- from: opportunityConnectionProvider.getProviderInterface().web3.eth.getAccounts()[0],
9
- gasPrice: opportunityConnectionProvider.getProviderInterface().web3.utils.toHex(opportunityConnectionProvider.getProviderInterface().web3.utils.toWei('30', 'gwei'))
10
- }
11
-
12
- const isValidWorker = opportunityConnectionProvider.getProviderInterface().web3.eth.Contract(
13
- contract,
14
- relationshipAddress)
15
- .methods
16
- .checkWorkerEvaluation(opportunityConnectionProvider.getProviderInterface().web3.accounts.getAccounts()[0], evaluationState)
17
- .send(txParameter, callback)
18
- .on('transactionHash', hash => {
19
-
20
- })
21
- .on('confirmation', (confirmationNumber, receipt) => {
22
-
23
- })
24
- .on('receipt', receipt => {
25
- // receipt example
26
- console.log(receipt);
27
- })
28
- .on('error', (error, receipt) => { // If the transaction was rejected by the network with a receipt, the second parameter will be the receipt.
29
-
30
- })
31
- .then( receipt => {
32
- // receipt can also be a new contract instance, when coming from a "contract.deploy({...}).send()"
33
- });
34
-
35
- if (isValidWorker === true) {
36
- opportunityConnectionProvider.getProviderInterface().web3.eth.Contract(
37
- contract,
38
- relationshipAddress)
39
- .methods
40
- .createWorkExchange(opportunityConnectionProvider.getProviderInterface().web3.accounts.getAccounts()[0], true)
41
- .send(txParameter, callback)
42
- .on('transactionHash', hash => {
43
-
44
- })
45
- .on('confirmation', (confirmationNumber, receipt) => {
46
-
47
- })
48
- .on('receipt', receipt => {
49
- // receipt example
50
- console.log(receipt);
51
- })
52
- .on('error', (error, receipt) => { // If the transaction was rejected by the network with a receipt, the second parameter will be the receipt.
53
-
54
- })
55
- .then( receipt => {
56
- // receipt can also be a new contract instance, when coming from a "contract.deploy({...}).send()"
57
- });
58
- }*/
59
- }
60
- export { enterWorkRelationship };
61
1
  //# sourceMappingURL=enter-work-relationship.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enter-work-relationship.js","sourceRoot":"","sources":["../../../src/api/exchange/enter-work-relationship.ts"],"names":[],"mappings":"AAAA,SAAS,qBAAqB,CAAC,mBAAmB,EAAE,eAAe,EAAE,QAAQ;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;AACP,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"enter-work-relationship.js","sourceRoot":"","sources":["../../../src/api/exchange/enter-work-relationship.ts"],"names":[],"mappings":""}
@@ -22,36 +22,26 @@ function registerNewUser() {
22
22
  if (typeof msgSender == 'undefined')
23
23
  throw new Error('Message sender is undefined');
24
24
  const userRegistrationInstance = new ethers.Contract(userRegistrationAddress, userRegistrationInterface, opportunityService.getProviderInterface());
25
- console.log('Checking true identificaiton of msgSender: ' + msgSender);
26
25
  const id = yield userRegistrationInstance.getTrueIdentification(msgSender);
27
- console.log('The true identificaiton is: ' + id);
28
26
  if (id == '0x0000000000000000000000000000000000000000') {
29
- console.log('Registering new user: ' + msgSender);
30
27
  const tx = yield new Contract(addressMap[opportunityService.getEthNetwork()][Contracts.USER_REGISTRATION], abiMap[Contracts.USER_REGISTRATION])
31
28
  .connect(opportunityService.getSignersInterface())
32
29
  .registerNewUser({
33
30
  from: msgSender
34
31
  });
35
- console.log(tx);
36
32
  const receipt = yield tx.wait();
37
- console.log('the receipt');
38
- console.log(receipt);
39
33
  if (Number(receipt.status) === 1) {
40
- console.log('transaction succeeded');
41
34
  resolve(true);
42
35
  }
43
36
  else {
44
- console.log('Transaction failed');
45
37
  resolve(false);
46
38
  }
47
39
  }
48
40
  else {
49
- console.log('User already registered');
50
41
  resolve(false);
51
42
  }
52
43
  }
53
44
  catch (error) {
54
- console.log(error);
55
45
  reject('An error occurred while trying to complete the registration.');
56
46
  }
57
47
  }));
@@ -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;AAI9C,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;gBAC3G,MAAM,yBAAyB,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;gBACrE,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAA;gBAEzE,IAAI,OAAO,SAAS,IAAI,WAAW;oBAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;gBAEnF,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,uBAAuB,EAAE,yBAAyB,EAAE,kBAAkB,CAAC,oBAAoB,EA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AM,IAAI,QAAQ,CAC/C,UAAU,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;yBAChH,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,CAAC;yBACjD,eAAe,CAAC;wBACb,IAAI,EAAE,SAAS;qBACtB,CAAC,CAAA;oBAEF,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,IAAI,EAAE,CAAA;oBAE/B,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;wBAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;qBACjB;yBAAM;wBACH,OAAO,CAAC,KAAK,CAAC,CAAA;qBACjB;iBACJ;qBAAM;oBACH,OAAO,CAAC,KAAK,CAAC,CAAA;iBACjB;aAGJ;YAAC,OAAM,KAAK,EAAE;gBACX,MAAM,CAAC,8DAA8D,CAAC,CAAA;aACzE;QACL,CAAC,CAAA,CAAC,CAAA;IACN,CAAC;CAAA;AAED,eAAe,eAAe,CAAC"}
package/dist/api/index.js CHANGED
@@ -3,7 +3,6 @@ import syncJobs from "../sync/sync-jobs";
3
3
  import syncMarkets from "../sync/sync-markets";
4
4
  import { completeRelationship } from "./exchange/complete-relationship";
5
5
  import { createTask } from "./exchange/create-task";
6
- import { enterWorkRelationship } from "./exchange/enter-work-relationship";
7
6
  import registerNewUser from "./identity/register-new-user";
8
7
  import { createMarket } from "./market/create-market";
9
8
  import { abis, getContractAddress, getContractInterface } from './internal/index';
@@ -14,8 +13,6 @@ import { decryptByPrivateKey, encryptByPublicKey } from "./util/encrypt-by-publi
14
13
  import { createEthCryptoCreds } from "./other/create-eth-crypto-creds";
15
14
  import { encrypt } from "./provider/encrypt";
16
15
  import { decrypt } from "./provider/decrypt";
17
- import syncCreatedDisputes from "../sync/sync-disputes";
18
- import syncMarketDisputes from "../sync/sync-market-disputes";
19
16
  function generateAPI() {
20
17
  return {
21
18
  crypto: {
@@ -30,16 +27,7 @@ function generateAPI() {
30
27
  },
31
28
  exchange: {
32
29
  completeRelationship,
33
- createTask,
34
- enterWorkRelationship
35
- },
36
- dispute: {
37
- connectGateways: () => { },
38
- getOracleClient: () => { },
39
- checkVoteResults: () => { },
40
- ensureEntityMetadata: () => { },
41
- launchNewVote: () => { },
42
- submitVote: () => { }
30
+ createTask
43
31
  },
44
32
  identity: {
45
33
  registerNewUser
@@ -51,9 +39,7 @@ function generateAPI() {
51
39
  sync: {
52
40
  syncWithEthereum: syncWithEthereumNode,
53
41
  syncMarkets,
54
- syncJobs,
55
- syncCreatedDisputes,
56
- syncMarketDisputes
42
+ syncJobs
57
43
  }
58
44
  },
59
45
  provider: {
@@ -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;AAEtD,OAAO,EAAE,IAAI,EAAU,kBAAkB,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;A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,eAAe;SAClB;KACJ,CAAA;AACL,CAAC;AAED,MAAM,cAAc,GAAG,WAAW,EAAE,CAAC;AAErC,eAAe,cAAc,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import abiMap from '../../blockchain/abi.json';
2
2
  function getContractInterface(contract) {
3
- console.log(abiMap);
4
3
  return abiMap[contract];
5
4
  }
6
5
  export { getContractInterface };
@@ -8,8 +7,6 @@ export default {
8
7
  'MarketFactory': abiMap['MarketFactory'],
9
8
  'WorkRelationship': abiMap['WorkRelationship'],
10
9
  'Market': abiMap['Market'],
11
- 'UserRegistration': abiMap['UserRegistration'],
12
- 'Dispute': abiMap['Dispute'],
13
- 'Participation': abiMap['Participation']
10
+ 'UserRegistration': abiMap['UserRegistration']
14
11
  };
15
12
  //# sourceMappingURL=abis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abis.js","sourceRoot":"","sources":["../../../src/api/internal/abis.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,SAAS,oBAAoB,CAAC,QAAgB;IAC1C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC3B,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAE/B,eAAe;IACX,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC;CAC3C,CAAA"}
1
+ {"version":3,"file":"abis.js","sourceRoot":"","sources":["../../../src/api/internal/abis.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,SAAS,oBAAoB,CAAC,QAAgB;IAC1C,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC3B,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAE/B,eAAe;IACX,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC;IACxC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC;CACjD,CAAA"}