opportunity-service 0.0.456 → 0.0.460

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,6 @@ const ethers_1 = require("ethers");
22
22
  const start_event_listeners_1 = require("./events/start-event-listeners");
23
23
  const index_1 = __importDefault(require("./api/index"));
24
24
  const OpportunityStorageProvider_1 = __importDefault(require("./modules/storage/OpportunityStorageProvider"));
25
- const web3_1 = __importDefault(require("web3"));
26
25
  class OpportunityService {
27
26
  /**
28
27
  * The Singleton's constructor should always be private to prevent direct
@@ -37,40 +36,6 @@ class OpportunityService {
37
36
  this.storageProvider = OpportunityStorageProvider_1.default;
38
37
  this.currentAccount = null;
39
38
  this.api = index_1.default;
40
- this.signData = function (fromAddress, typeData) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- return new Promise(function (resolve, reject) {
43
- OpportunityService.defaultProvider.currentProvider.sendAsync({
44
- id: 1,
45
- method: "eth_signTypedData_v3",
46
- params: [fromAddress, typeData],
47
- from: fromAddress,
48
- }, function (err, result) {
49
- if (err) {
50
- reject(err); //TODO
51
- }
52
- else {
53
- const r = result.result.slice(0, 66);
54
- const s = "0x" + result.result.slice(66, 130);
55
- const v = Number("0x" + result.result.slice(130, 132));
56
- resolve({
57
- v,
58
- r,
59
- s,
60
- });
61
- }
62
- });
63
- });
64
- });
65
- };
66
- this.signTransferPermit = function (address, relationshipAddress) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- const userNonce = yield this.ethersProvider.getTransactionCount(address);
69
- const messageData = this.createPermitSig(address, relationshipAddress, userNonce, Date.now() + 1000, relationshipAddress);
70
- const sig = yield this.signData(address, messageData.typedData);
71
- return Object.assign({}, sig, messageData.message);
72
- });
73
- };
74
39
  }
75
40
  /**
76
41
  * The static method that controls the access to the singleton instance.
@@ -158,90 +123,7 @@ class OpportunityService {
158
123
  getSignersInterface() {
159
124
  return this.ethersSigner;
160
125
  }
161
- prepareSignature(address, relationshipAddress, expiry) {
162
- const { v, r, s } = this.signTransferPermit(address, relationshipAddress);
163
- return {
164
- v,
165
- r,
166
- s
167
- };
168
- }
169
- createPermitSig(fromAddress, spender, nonce, expiry, relationshipAddress) {
170
- var seen = [];
171
- const message = {
172
- holder: fromAddress,
173
- spender: spender,
174
- nonce: nonce,
175
- expiry: expiry,
176
- allowed: true,
177
- };
178
- const typedData = JSON.stringify({
179
- types: {
180
- EIP712Domain: [
181
- {
182
- name: "name",
183
- type: "string",
184
- },
185
- {
186
- name: "version",
187
- type: "string",
188
- },
189
- {
190
- name: "chainId",
191
- type: "uint256",
192
- },
193
- {
194
- name: "verifyingContract",
195
- type: "address",
196
- },
197
- ],
198
- Permit: [
199
- {
200
- name: "holder",
201
- type: "address",
202
- },
203
- {
204
- name: "spender",
205
- type: "address",
206
- },
207
- {
208
- name: "nonce",
209
- type: "uint256",
210
- },
211
- {
212
- name: "expiry",
213
- type: "uint256",
214
- },
215
- {
216
- name: "allowed",
217
- type: "bool",
218
- },
219
- ],
220
- },
221
- primaryType: "Permit",
222
- domain: {
223
- name: "Dai Stablecoin",
224
- version: "1",
225
- chainId: 5777,
226
- verifyingContract: relationshipAddress
227
- },
228
- message: message,
229
- }, function (key, val) {
230
- if (val != null && typeof val == "object") {
231
- if (seen.indexOf(val) >= 0) {
232
- return;
233
- }
234
- seen.push(val);
235
- }
236
- return val;
237
- });
238
- return {
239
- typedData,
240
- message,
241
- };
242
- }
243
126
  }
244
- OpportunityService.defaultProvider = new web3_1.default('http://localhost:8545');
245
127
  const opportunityService = OpportunityService.getInstance();
246
128
  exports.default = opportunityService;
247
129
  //# sourceMappingURL=OpportunityService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpportunityService.js","sourceRoot":"","sources":["../src/OpportunityService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,+FAAuE;AACvE,8EAAwE;AAExE,qEAA2C;AAC3C,iFAAuD;AACvD,2EAAiD;AACjD,mCAA2C;AAE3C,0EAAqE;AACrE,wDAAyC;AACzC,8GAAsF;AAEtF,gDAAwB;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E,SAAS;qBAChB;iBACF;gBACD,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,MAAM;qBACb;iBACF;aACF;YACD,WAAW,EAAE,QAAQ;YACrB,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,GAAG;gBACZ,OAAO,EAAE,IAAI;gBACb,iBAAiB,EAAE,mBAAmB;aACvC;YACD,OAAO,EAAE,OAAO;SACjB,EAAE,UAAS,GAAG,EAAE,GAAG;YAClB,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE;gBACtC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACxB,OAAO;iBACV;gBACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAClB;YACD,OAAO,GAAG,CAAC;QACf,CAAC,CAAC,CAAC;QAEF,OAAO;YACL,SAAS;YACT,OAAO;SACR,CAAC;IACF,CAAC;;AAjOc,kCAAe,GAAG,IAAI,cAAI,CAAC,uBAAuB,CAAC,CAAA;AA2OtE,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;AAC5D,kBAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"OpportunityService.js","sourceRoot":"","sources":["../src/OpportunityService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,+FAAuE;AACvE,8EAAwE;AAExE,qEAA2C;AAC3C,iFAAuD;AACvD,2EAAiD;AACjD,mCAA2C;AAE3C,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CAAC;IAED,iBAAiB,CAAC,QAAmB;QACjC,OAAO,kBAAM,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,2BAA2B;QACvB,OAAO,kBAAkB,CAAC,eAAe,CAAC;IAC9C,CAAC;IAED,oBAAoB;QAChB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,mBAAmB;QACf,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;CACJ;AAED,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;AAC5D,kBAAe,kBAAkB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "MarketFactory": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_market", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "string", "name": "marketName", "type": "string" }], "name": "MarketCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_marketAddress", "type": "address" }], "name": "MarketDestroyed", "type": "event" }, { "inputs": [{ "internalType": "string", "name": "marketName", "type": "string" }, { "internalType": "enum MarketLib.MarketType", "name": "marketType", "type": "uint8" }], "name": "createMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint32", "name": "index", "type": "uint32" }], "name": "destroyMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getNumMarkets", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
3
3
  "WorkRelationship": [{ "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "enum Evaluation.ContractType", "name": "_contractType", "type": "uint8" }, { "internalType": "string", "name": "taskMetadataPointer", "type": "string" }, { "internalType": "uint256", "name": "_wad", "type": "uint256" }, { "internalType": "address", "name": "_daiTokenAddress", "type": "address" }], "stateMutability": "payable", "type": "constructor" }, { "inputs": [], "name": "_contractStatus", "outputs": [{ "internalType": "enum Evaluation.WorkRelationshipState", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_taskMetadataPointer", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_newWorker", "type": "address" }, { "internalType": "uint256", "name": "_stakedReputation", "type": "uint256" }], "name": "assignNewWorker", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "workerUniversalAddress", "type": "address" }, { "components": [{ "internalType": "string", "name": "industry", "type": "string" }, { "internalType": "uint256", "name": "industrylevel", "type": "uint256" }, { "internalType": "uint256", "name": "reputation", "type": "uint256" }], "internalType": "struct Evaluation.EvaluationState", "name": "evaluationState", "type": "tuple" }], "name": "checkWorkerEvaluation", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "completeContract", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "contractPayout", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "contractType", "outputs": [{ "internalType": "enum Evaluation.ContractType", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTaskSolutionPointer", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "disputor", "type": "address" }], "name": "submitDispute", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_submission", "type": "bytes32" }, { "internalType": "uint8", "name": "_v", "type": "uint8" }, { "internalType": "bytes32", "name": "_r", "type": "bytes32" }, { "internalType": "bytes32", "name": "_s", "type": "bytes32" }], "name": "submitWork", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bool", "name": "_approved", "type": "bool" }, { "internalType": "uint8", "name": "_v", "type": "uint8" }, { "internalType": "bytes32", "name": "_r", "type": "bytes32" }, { "internalType": "bytes32", "name": "_s", "type": "bytes32" }], "name": "submitWorkEvaluation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unAssignWorker", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "updateContractPayout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newState", "type": "uint256" }], "name": "updateRelationshipState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "newTaskPointerHash", "type": "string" }], "name": "updateTaskMetadataPointer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "newTaskPointerHash", "type": "string" }], "name": "updateTaskSolutionPointer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "worker", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }],
4
- "Market": [{ "inputs": [{ "internalType": "string", "name": "marketName", "type": "string" }, { "internalType": "enum MarketLib.MarketType", "name": "marketType", "type": "uint8" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "marketAddress", "type": "address" }, { "indexed": true, "internalType": "string", "name": "marketName", "type": "string" }], "name": "MarketPaused", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "marketAddress", "type": "address" }, { "indexed": true, "internalType": "string", "name": "marketName", "type": "string" }], "name": "MarketResumed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], "name": "Unpaused", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "relationship", "type": "address" }, { "indexed": true, "internalType": "address", "name": "marketAddress", "type": "address" }], "name": "WorkRelationshipCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "relationship", "type": "address" }], "name": "WorkRelationshipEnded", "type": "event" }, { "inputs": [], "name": "_marketName", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_marketStatus", "outputs": [{ "internalType": "enum MarketLib.MarketStatus", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_marketType", "outputs": [{ "internalType": "enum MarketLib.MarketType", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_requiredIndustryWeight", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_requiredReputation", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "taskOwner", "type": "address" }, { "internalType": "enum Evaluation.ContractType", "name": "_contractType", "type": "uint8" }, { "internalType": "string", "name": "taskMetadataPointer", "type": "string" }, { "internalType": "uint256", "name": "_wad", "type": "uint256" }, { "internalType": "address", "name": "_daiTokenAddress", "type": "address" }], "name": "createJob", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getMarketState", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getNumJobs", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getWorkRelationships", "outputs": [{ "internalType": "contract WorkRelationship[]", "name": "", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pauseMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "resumeMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
5
4
  "UserRegistration": [{ "inputs": [{ "internalType": "address", "name": "userSummaryFactoryAddress", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "universalAddress", "type": "address" }, { "indexed": true, "internalType": "address", "name": "userSummaryContractAddress", "type": "address" }], "name": "UserAssignedTrueIdentification", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "universalAddress", "type": "address" }], "name": "UserRegistered", "type": "event" }, { "inputs": [{ "internalType": "address", "name": "universalAddress", "type": "address" }], "name": "getTrueIdentification", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "universalAddress", "type": "address" }], "name": "registerNewUser", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }],
6
5
  "Dai": [{ "inputs": [{ "internalType": "uint256", "name": "chainId_", "type": "uint256" }], "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": 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" }, { "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "PERMIT_TYPEHASH", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "approve", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "deny", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "mint", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "src", "type": "address" }, { "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "move", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "nonces", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "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": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "pull", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "usr", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "push", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], "name": "rely", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "dst", "type": "address" }, { "internalType": "uint256", "name": "wad", "type": "uint256" }], "name": "transfer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "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" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "wards", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }]
7
6
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "MarketFactory": "0xDb6fEBbFB2E3B64E9650CF1244E6e4e30DebdAF8",
3
- "UserRegistration": "0xFE04B1B0D1ce89325155b0D0F067eCb4cc2B312e",
4
- "Dai": "0x0583e20c9D4FC5130D9A2758a56c83C3EE051725"
2
+ "MarketFactory": "0x44D9014e3cdF97B6073Fc92376eff312188Ea408",
3
+ "UserRegistration": "0x4aFC9c43f6eF02D40e431110E6818f9803b294bB",
4
+ "Dai": "0x17D477729D428FB273421278531e6Ad9122635e9"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opportunity-service",
3
- "version": "0.0.456",
3
+ "version": "0.0.460",
4
4
  "description": "A service layer that connects all services between the blockchain and ui.",
5
5
  "main": "index.js",
6
6
  "scripts": {},
@@ -19,7 +19,7 @@ class OpportunityService {
19
19
  private syncing: boolean;
20
20
  private ethersProvider : providers.JsonRpcProvider = ethers.getDefaultProvider('http://localhost:8545');
21
21
  private ethersSigner : providers.JsonRpcSigner = null;
22
- private static defaultProvider = new Web3('http://localhost:8545')
22
+ private static defaultProvider;// = new Web3('http://localhost:8545')
23
23
  private opportunityLogger = null;
24
24
  private storageProvider = opportunityStorageProvider;
25
25
  private currentAccount = null;
@@ -131,127 +131,6 @@ class OpportunityService {
131
131
  getSignersInterface() : providers.JsonRpcSigner {
132
132
  return this.ethersSigner;
133
133
  }
134
-
135
- prepareSignature(address, relationshipAddress, expiry) {
136
- const { v, r, s } = this.signTransferPermit(address, relationshipAddress);
137
- return {
138
- v,
139
- r,
140
- s
141
- }
142
- }
143
-
144
- signData = async function (fromAddress, typeData) {
145
- return new Promise(function (resolve, reject) {
146
- OpportunityService.defaultProvider.currentProvider.sendAsync(
147
- {
148
- id: 1,
149
- method: "eth_signTypedData_v3",
150
- params: [fromAddress, typeData],
151
- from: fromAddress,
152
- },
153
- function (err, result) {
154
- if (err) {
155
- reject(err); //TODO
156
- } else {
157
- const r = result.result.slice(0, 66);
158
- const s = "0x" + result.result.slice(66, 130);
159
- const v = Number("0x" + result.result.slice(130, 132));
160
- resolve({
161
- v,
162
- r,
163
- s,
164
- });
165
- }
166
- }
167
- );
168
- });
169
- };
170
-
171
- createPermitSig(fromAddress, spender, nonce, expiry, relationshipAddress) {
172
- var seen = []
173
-
174
- const message = {
175
- holder: fromAddress,
176
- spender: spender,
177
- nonce: nonce,
178
- expiry: expiry,
179
- allowed: true,
180
- };
181
-
182
- const typedData = JSON.stringify({
183
- types: {
184
- EIP712Domain: [
185
- {
186
- name: "name",
187
- type: "string",
188
- },
189
- {
190
- name: "version",
191
- type: "string",
192
- },
193
- {
194
- name: "chainId",
195
- type: "uint256",
196
- },
197
- {
198
- name: "verifyingContract",
199
- type: "address",
200
- },
201
- ],
202
- Permit: [
203
- {
204
- name: "holder",
205
- type: "address",
206
- },
207
- {
208
- name: "spender",
209
- type: "address",
210
- },
211
- {
212
- name: "nonce",
213
- type: "uint256",
214
- },
215
- {
216
- name: "expiry",
217
- type: "uint256",
218
- },
219
- {
220
- name: "allowed",
221
- type: "bool",
222
- },
223
- ],
224
- },
225
- primaryType: "Permit",
226
- domain: {
227
- name: "Dai Stablecoin",
228
- version: "1",
229
- chainId: 5777,
230
- verifyingContract: relationshipAddress
231
- },
232
- message: message,
233
- }, function(key, val) {
234
- if (val != null && typeof val == "object") {
235
- if (seen.indexOf(val) >= 0) {
236
- return;
237
- }
238
- seen.push(val);
239
- }
240
- return val;
241
- });
242
-
243
- return {
244
- typedData,
245
- message,
246
- };
247
- }
248
-
249
- signTransferPermit = async function (address, relationshipAddress) : Promise<any> {
250
- const userNonce = await this.ethersProvider.getTransactionCount(address);
251
- const messageData = this.createPermitSig(address, relationshipAddress, userNonce, Date.now() + 1000, relationshipAddress);
252
- const sig = await this.signData(address, messageData.typedData);
253
- return Object.assign({}, sig, messageData.message);
254
- };
255
134
  }
256
135
 
257
136
  const opportunityService = OpportunityService.getInstance();
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "MarketFactory": [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_market","type":"address"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"marketName","type":"string"}],"name":"MarketCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_marketAddress","type":"address"}],"name":"MarketDestroyed","type":"event"},{"inputs":[{"internalType":"string","name":"marketName","type":"string"},{"internalType":"enum MarketLib.MarketType","name":"marketType","type":"uint8"}],"name":"createMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"index","type":"uint32"}],"name":"destroyMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNumMarkets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
3
3
  "WorkRelationship": [{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"enum Evaluation.ContractType","name":"_contractType","type":"uint8"},{"internalType":"string","name":"taskMetadataPointer","type":"string"},{"internalType":"uint256","name":"_wad","type":"uint256"},{"internalType":"address","name":"_daiTokenAddress","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"_contractStatus","outputs":[{"internalType":"enum Evaluation.WorkRelationshipState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_taskMetadataPointer","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newWorker","type":"address"},{"internalType":"uint256","name":"_stakedReputation","type":"uint256"}],"name":"assignNewWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"workerUniversalAddress","type":"address"},{"components":[{"internalType":"string","name":"industry","type":"string"},{"internalType":"uint256","name":"industrylevel","type":"uint256"},{"internalType":"uint256","name":"reputation","type":"uint256"}],"internalType":"struct Evaluation.EvaluationState","name":"evaluationState","type":"tuple"}],"name":"checkWorkerEvaluation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"completeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractPayout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"enum Evaluation.ContractType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaskSolutionPointer","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"disputor","type":"address"}],"name":"submitDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_submission","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"submitWork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_approved","type":"bool"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"submitWorkEvaluation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unAssignWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateContractPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newState","type":"uint256"}],"name":"updateRelationshipState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newTaskPointerHash","type":"string"}],"name":"updateTaskMetadataPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newTaskPointerHash","type":"string"}],"name":"updateTaskSolutionPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"worker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}],
4
- "Market": [{"inputs":[{"internalType":"string","name":"marketName","type":"string"},{"internalType":"enum MarketLib.MarketType","name":"marketType","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"marketAddress","type":"address"},{"indexed":true,"internalType":"string","name":"marketName","type":"string"}],"name":"MarketPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"marketAddress","type":"address"},{"indexed":true,"internalType":"string","name":"marketName","type":"string"}],"name":"MarketResumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"relationship","type":"address"},{"indexed":true,"internalType":"address","name":"marketAddress","type":"address"}],"name":"WorkRelationshipCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"relationship","type":"address"}],"name":"WorkRelationshipEnded","type":"event"},{"inputs":[],"name":"_marketName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketStatus","outputs":[{"internalType":"enum MarketLib.MarketStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketType","outputs":[{"internalType":"enum MarketLib.MarketType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_requiredIndustryWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_requiredReputation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taskOwner","type":"address"},{"internalType":"enum Evaluation.ContractType","name":"_contractType","type":"uint8"},{"internalType":"string","name":"taskMetadataPointer","type":"string"},{"internalType":"uint256","name":"_wad","type":"uint256"},{"internalType":"address","name":"_daiTokenAddress","type":"address"}],"name":"createJob","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getMarketState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumJobs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWorkRelationships","outputs":[{"internalType":"contract WorkRelationship[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resumeMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],
5
4
  "UserRegistration": [{"inputs":[{"internalType":"address","name":"userSummaryFactoryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"universalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"userSummaryContractAddress","type":"address"}],"name":"UserAssignedTrueIdentification","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"universalAddress","type":"address"}],"name":"UserRegistered","type":"event"},{"inputs":[{"internalType":"address","name":"universalAddress","type":"address"}],"name":"getTrueIdentification","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"universalAddress","type":"address"}],"name":"registerNewUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}],
6
5
  "Dai": [{"inputs":[{"internalType":"uint256","name":"chainId_","type":"uint256"}],"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":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"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"move","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"pull","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"push","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"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"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
7
6
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "MarketFactory": "0xDb6fEBbFB2E3B64E9650CF1244E6e4e30DebdAF8",
3
- "UserRegistration": "0xFE04B1B0D1ce89325155b0D0F067eCb4cc2B312e",
4
- "Dai": "0x0583e20c9D4FC5130D9A2758a56c83C3EE051725"
2
+ "MarketFactory": "0x44D9014e3cdF97B6073Fc92376eff312188Ea408",
3
+ "UserRegistration": "0x4aFC9c43f6eF02D40e431110E6818f9803b294bB",
4
+ "Dai": "0x17D477729D428FB273421278531e6Ad9122635e9"
5
5
  }