@show-karma/karma-gap-sdk 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import { SchemaInterface, TNetwork, TSchemaName } from '../types';
2
+ import { GapSchema } from './GapSchema';
3
+ export declare class AllGapSchemas {
4
+ allSchemas: {
5
+ [network: string]: SchemaInterface<TSchemaName>[];
6
+ };
7
+ constructor();
8
+ findSchema(name: TSchemaName, network: TNetwork): GapSchema;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AllGapSchemas = void 0;
4
+ const consts_1 = require("../../core/consts");
5
+ const GapSchema_1 = require("./GapSchema");
6
+ const GAP_1 = require("./GAP");
7
+ class AllGapSchemas {
8
+ constructor() {
9
+ this.allSchemas = {};
10
+ Object.keys(consts_1.Networks).forEach((network) => {
11
+ this.allSchemas[network] = Object.values((0, consts_1.MountEntities)(consts_1.Networks[network]));
12
+ });
13
+ }
14
+ findSchema(name, network) {
15
+ const schema = this.allSchemas[network].find(s => s.name === name);
16
+ return new GapSchema_1.GapSchema(schema, new GAP_1.GAP({ network: network }), false, false);
17
+ }
18
+ }
19
+ exports.AllGapSchemas = AllGapSchemas;
@@ -447,7 +447,7 @@ class Schema {
447
447
  exports.Schema = Schema;
448
448
  Schema.schemas = {
449
449
  'optimism-sepolia': [],
450
- "optimism-goerli": [],
450
+ // "optimism-goerli": [],
451
451
  optimism: [],
452
452
  sepolia: [],
453
453
  arbitrum: [],
@@ -4,12 +4,18 @@ exports.Grant = void 0;
4
4
  const Attestation_1 = require("../Attestation");
5
5
  const attestations_1 = require("../types/attestations");
6
6
  const Milestone_1 = require("./Milestone");
7
- const GapSchema_1 = require("../GapSchema");
8
7
  const SchemaError_1 = require("../SchemaError");
9
8
  const consts_1 = require("../../consts");
10
9
  const GapContract_1 = require("../contract/GapContract");
11
10
  const Community_1 = require("./Community");
12
11
  const Project_1 = require("./Project");
12
+ const AllGapSchemas_1 = require("../AllGapSchemas");
13
+ const chainIdToNetwork = {
14
+ 11155420: 'optimism-sepolia',
15
+ 42161: 'arbitrum',
16
+ 10: 'optimism',
17
+ 11155111: 'sepolia'
18
+ };
13
19
  class Grant extends Attestation_1.Attestation {
14
20
  constructor() {
15
21
  super(...arguments);
@@ -164,7 +170,7 @@ class Grant extends Attestation_1.Attestation {
164
170
  data: {
165
171
  communityUID: attestation.data.communityUID,
166
172
  },
167
- schema: GapSchema_1.GapSchema.find('Grant', network),
173
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Grant', chainIdToNetwork[attestation.chainID]),
168
174
  chainID: attestation.chainID,
169
175
  });
170
176
  if (attestation.details) {
@@ -174,7 +180,7 @@ class Grant extends Attestation_1.Attestation {
174
180
  data: {
175
181
  ...details.data,
176
182
  },
177
- schema: GapSchema_1.GapSchema.find('GrantDetails', network),
183
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', chainIdToNetwork[attestation.chainID]),
178
184
  chainID: attestation.chainID,
179
185
  });
180
186
  }
@@ -189,7 +195,7 @@ class Grant extends Attestation_1.Attestation {
189
195
  data: {
190
196
  ...u.data,
191
197
  },
192
- schema: GapSchema_1.GapSchema.find('GrantDetails', network),
198
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', chainIdToNetwork[attestation.chainID]),
193
199
  chainID: attestation.chainID,
194
200
  }));
195
201
  }
@@ -200,7 +206,7 @@ class Grant extends Attestation_1.Attestation {
200
206
  data: {
201
207
  ...completed.data,
202
208
  },
203
- schema: GapSchema_1.GapSchema.find('GrantDetails', network),
209
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', chainIdToNetwork[attestation.chainID]),
204
210
  chainID: attestation.chainID,
205
211
  });
206
212
  }
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Milestone = void 0;
4
+ const AllGapSchemas_1 = require("../AllGapSchemas");
4
5
  const Attestation_1 = require("../Attestation");
5
- const GapSchema_1 = require("../GapSchema");
6
6
  const SchemaError_1 = require("../SchemaError");
7
7
  const GapContract_1 = require("../contract/GapContract");
8
8
  const attestations_1 = require("../types/attestations");
9
+ const chainIdToNetwork = {
10
+ 11155420: 'optimism-sepolia',
11
+ 42161: 'arbitrum',
12
+ 10: 'optimism',
13
+ 11155111: 'sepolia'
14
+ };
9
15
  class Milestone extends Attestation_1.Attestation {
10
16
  constructor() {
11
17
  super(...arguments);
@@ -188,7 +194,7 @@ class Milestone extends Attestation_1.Attestation {
188
194
  data: {
189
195
  ...attestation.data,
190
196
  },
191
- schema: GapSchema_1.GapSchema.find('Milestone', network),
197
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Milestone', chainIdToNetwork[attestation.chainID]),
192
198
  chainID: attestation.chainID,
193
199
  });
194
200
  if (attestation.completed) {
@@ -197,7 +203,7 @@ class Milestone extends Attestation_1.Attestation {
197
203
  data: {
198
204
  ...attestation.completed.data,
199
205
  },
200
- schema: GapSchema_1.GapSchema.find('MilestoneCompleted', network),
206
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', chainIdToNetwork[attestation.chainID]),
201
207
  chainID: attestation.chainID,
202
208
  });
203
209
  }
@@ -207,7 +213,7 @@ class Milestone extends Attestation_1.Attestation {
207
213
  data: {
208
214
  ...attestation.completed.data,
209
215
  },
210
- schema: GapSchema_1.GapSchema.find('MilestoneCompleted', network),
216
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', chainIdToNetwork[attestation.chainID]),
211
217
  chainID: attestation.chainID,
212
218
  });
213
219
  }
@@ -217,7 +223,7 @@ class Milestone extends Attestation_1.Attestation {
217
223
  data: {
218
224
  ...attestation.completed.data,
219
225
  },
220
- schema: GapSchema_1.GapSchema.find('MilestoneCompleted', network),
226
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', chainIdToNetwork[attestation.chainID]),
221
227
  chainID: attestation.chainID,
222
228
  });
223
229
  }
@@ -3,13 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Project = void 0;
4
4
  const Attestation_1 = require("../Attestation");
5
5
  const attestations_1 = require("../types/attestations");
6
- const GapSchema_1 = require("../GapSchema");
7
6
  const SchemaError_1 = require("../SchemaError");
8
7
  const utils_1 = require("../../utils");
9
8
  const Grant_1 = require("./Grant");
10
9
  const consts_1 = require("../../consts");
11
10
  const MemberOf_1 = require("./MemberOf");
12
11
  const GapContract_1 = require("../contract/GapContract");
12
+ const AllGapSchemas_1 = require("../AllGapSchemas");
13
+ const chainIdToNetwork = {
14
+ 11155420: 'optimism-sepolia',
15
+ 42161: 'arbitrum',
16
+ 10: 'optimism',
17
+ 11155111: 'sepolia'
18
+ };
13
19
  class Project extends Attestation_1.Attestation {
14
20
  constructor() {
15
21
  super(...arguments);
@@ -193,7 +199,7 @@ class Project extends Attestation_1.Attestation {
193
199
  data: {
194
200
  project: true,
195
201
  },
196
- schema: GapSchema_1.GapSchema.find('Project', network),
202
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Project', chainIdToNetwork[attestation.chainID]),
197
203
  chainID: attestation.chainID,
198
204
  });
199
205
  if (attestation.details) {
@@ -203,7 +209,7 @@ class Project extends Attestation_1.Attestation {
203
209
  data: {
204
210
  ...details.data,
205
211
  },
206
- schema: GapSchema_1.GapSchema.find('ProjectDetails', network),
212
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('ProjectDetails', chainIdToNetwork[attestation.chainID]),
207
213
  chainID: attestation.chainID,
208
214
  });
209
215
  project.details.links = details.data.links || [];
@@ -222,7 +228,7 @@ class Project extends Attestation_1.Attestation {
222
228
  data: {
223
229
  memberOf: true,
224
230
  },
225
- schema: GapSchema_1.GapSchema.find('MemberOf', network),
231
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberOf', chainIdToNetwork[attestation.chainID]),
226
232
  chainID: attestation.chainID,
227
233
  });
228
234
  if (m.details) {
@@ -232,7 +238,7 @@ class Project extends Attestation_1.Attestation {
232
238
  data: {
233
239
  ...details.data,
234
240
  },
235
- schema: GapSchema_1.GapSchema.find('MemberDetails', network),
241
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberDetails', chainIdToNetwork[attestation.chainID]),
236
242
  chainID: attestation.chainID,
237
243
  });
238
244
  }
@@ -33,6 +33,7 @@ export interface IGrantDetails {
33
33
  cycle?: string;
34
34
  questions?: IGrantDetailsQuestion[];
35
35
  type?: string;
36
+ startDate?: number;
36
37
  }
37
38
  export declare class GrantDetails extends Attestation<IGrantDetails> implements IGrantDetails {
38
39
  title: string;
@@ -45,6 +46,7 @@ export declare class GrantDetails extends Attestation<IGrantDetails> implements
45
46
  cycle?: string;
46
47
  questions?: IGrantDetailsQuestion[];
47
48
  type: string;
49
+ startDate?: number;
48
50
  }
49
51
  export interface IGrantRound {
50
52
  name: string;
package/core/consts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { EASNetworkConfig, SchemaInterface, TNetwork, TSchemaName } from './types';
1
+ import { EASNetworkConfig, SchemaInterface, TNetwork, TSchemaName } from "./types";
2
2
  /**
3
3
  * Schemas that should use default EAS attestation
4
4
  * instead of the custom contract.
package/core/consts.js CHANGED
@@ -6,14 +6,14 @@ exports.MountEntities = exports.Networks = exports.zeroAddress = exports.nullRes
6
6
  * instead of the custom contract.
7
7
  */
8
8
  exports.useDefaultAttestation = [
9
- 'MilestoneApproved',
10
- 'MilestoneCompleted',
11
- 'GrantVerified',
12
- 'Community',
9
+ "MilestoneApproved",
10
+ "MilestoneCompleted",
11
+ "GrantVerified",
12
+ "Community",
13
13
  ];
14
- exports.nullRef = '0x0000000000000000000000000000000000000000000000000000000000000000';
14
+ exports.nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
15
15
  // TODO: Remove null resolver and change usage to zero address
16
- exports.nullResolver = '0x0000000000000000000000000000000000000000';
16
+ exports.nullResolver = "0x0000000000000000000000000000000000000000";
17
17
  exports.zeroAddress = exports.nullResolver;
18
18
  // resolver for dependents = 0xed081ABE885bc3575f810c904052A1f685A85903
19
19
  /**
@@ -22,122 +22,95 @@ exports.zeroAddress = exports.nullResolver;
22
22
  exports.Networks = {
23
23
  optimism: {
24
24
  chainId: 10,
25
- url: 'https://optimism.easscan.org/graphql',
26
- rpcUrl: 'https://opt-mainnet.g.alchemy.com/v2/fx2SlVDrPbXwPMQT4v0lRT1PABA16Myl',
25
+ url: "https://optimism.easscan.org/graphql",
26
+ rpcUrl: "https://opt-mainnet.g.alchemy.com/v2/fx2SlVDrPbXwPMQT4v0lRT1PABA16Myl",
27
27
  contracts: {
28
- eas: '0x4200000000000000000000000000000000000021',
29
- schema: '0x4200000000000000000000000000000000000020',
30
- multicall: '0xd2eD366393FDfd243931Fe48e9fb65A192B0018c',
31
- projectResolver: '0x7177AdC0f924b695C0294A40C4C5FEFf5EE1E141',
32
- communityResolver: '0x6dC1D6b864e8BEf815806f9e4677123496e12026',
28
+ eas: "0x4200000000000000000000000000000000000021",
29
+ schema: "0x4200000000000000000000000000000000000020",
30
+ multicall: "0xd2eD366393FDfd243931Fe48e9fb65A192B0018c",
31
+ projectResolver: "0x7177AdC0f924b695C0294A40C4C5FEFf5EE1E141",
32
+ communityResolver: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
33
33
  },
34
34
  schemas: {
35
- Community: '0x721c17b065dccc5c916e0c2708d0ef50f1810591b76d0402ff6fe5accbd8488f',
36
- Details: '0x70a3f615f738fc6a4f56100692ada93d947c028b840940d97af7e7d6f0fa0577',
37
- Grant: '0x12837231f48acbca4e1e7f4416f684f3353bd4d71d4f03a09d29e5ffa6f21a50',
38
- GrantVerified: '0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93',
39
- MemberOf: '0x7fbb8a65924d8ad2ae12356e04b1418043e8361ba3b1b6c917de2e23df3ec81c',
40
- MilestoneApproved: '0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93',
41
- MilestoneCompleted: '0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93',
42
- Project: '0x5b873b6e7a16207b526dde366e8164e95bcda2f009272306519667c5e94d2191',
35
+ Community: "0x721c17b065dccc5c916e0c2708d0ef50f1810591b76d0402ff6fe5accbd8488f",
36
+ Details: "0x70a3f615f738fc6a4f56100692ada93d947c028b840940d97af7e7d6f0fa0577",
37
+ Grant: "0x12837231f48acbca4e1e7f4416f684f3353bd4d71d4f03a09d29e5ffa6f21a50",
38
+ GrantVerified: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
39
+ MemberOf: "0x7fbb8a65924d8ad2ae12356e04b1418043e8361ba3b1b6c917de2e23df3ec81c",
40
+ MilestoneApproved: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
41
+ MilestoneCompleted: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
42
+ Project: "0x5b873b6e7a16207b526dde366e8164e95bcda2f009272306519667c5e94d2191",
43
43
  },
44
44
  },
45
- 'optimism-sepolia': {
45
+ "optimism-sepolia": {
46
46
  chainId: 11155420,
47
- url: 'https://optimism-sepolia.easscan.org/graphql',
48
- rpcUrl: 'https://opt-sepolia.g.alchemy.com/v2/SAI_dJr86B7ttCD_b9fn61MWrrdZimmL',
47
+ url: "https://optimism-sepolia.easscan.org/graphql",
48
+ rpcUrl: "https://opt-sepolia.g.alchemy.com/v2/9FEqTNKmgO7X7ll92ALJrEih7Jjhldf-",
49
49
  contracts: {
50
- communityResolver: '0xa5B7bbFD545A1a816aa8cBE28a1F0F2Cca58363d',
51
- eas: '0x4200000000000000000000000000000000000021',
52
- multicall: '0xC891F8eBA218f5034bf3a472528408BE19E1130E',
53
- projectResolver: '0x832931F23ea4e3c70957DA71a7eB50F5B7efA93D',
54
- schema: '0x4200000000000000000000000000000000000020',
50
+ communityResolver: "0xa5B7bbFD545A1a816aa8cBE28a1F0F2Cca58363d",
51
+ eas: "0x4200000000000000000000000000000000000021",
52
+ multicall: "0xC891F8eBA218f5034bf3a472528408BE19E1130E",
53
+ projectResolver: "0x832931F23ea4e3c70957DA71a7eB50F5B7efA93D",
54
+ schema: "0x4200000000000000000000000000000000000020",
55
55
  },
56
56
  schemas: {
57
- Community: '0x314bb1c3c9b5311c1b813a3ad123b6ac5a03902b987795056dd2e4ff38e833ea',
58
- Details: '0xd193e75f420a69910f98fa79cacdfd9d0dcbf5933edce8f8bde9a10bd204d996',
59
- Grant: '0x181beb00ef05cf99caa2e4192369232f210c2764f26e238d962112bf592e9cce',
60
- GrantVerified: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
61
- MemberOf: '0x611f9655188f372e27dce116a803fa9081ca3e2907986368d54fcad538ca3853',
62
- MilestoneApproved: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
63
- MilestoneCompleted: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
64
- Project: '0xf9bbd118dd100459a7d093403af21c6e7f847fd7f331b7a4e6bfb94a1366bd76',
65
- },
66
- },
67
- /**
68
- * Optimism goerli is going to be discontinued in favor of optimism sepolia
69
- * @deprecated
70
- */
71
- 'optimism-goerli': {
72
- chainId: 420,
73
- url: 'https://optimism-goerli-bedrock.easscan.org/graphql',
74
- rpcUrl: 'https://optimism-goerli.infura.io/v3/34917361240448cda81f542681961659',
75
- contracts: {
76
- eas: '0x4200000000000000000000000000000000000021',
77
- schema: '0x4200000000000000000000000000000000000020',
78
- multicall: '0x5D5a8032b2FA06652804c33F60DcEA00e389B732',
79
- projectResolver: '0xbCf8910Bc3971eA59D93256357b76E846CF2e1F8',
80
- communityResolver: '0xa09369bDE7E4403a9C821AffA00E649cF85Ef09e',
81
- },
82
- schemas: {
83
- Community: '0xc1aade58410b3fd807c19845181996721248459c5f042284f27d21cec12a38d1',
84
- // "0x14b016a56b56db47ee2cdda6963a3481374a75e1471dafd85a17e6e5c23d2a11",
85
- Details: '0xfe590d9582957e10affbabcdc34a201785a1d4f77982d6616b736cce1a91ae43',
86
- Grant: '0xd6ce374765c355687101ba70b3f8824d555c12716d2bdad71a08ccad1ded3218',
87
- GrantVerified: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
88
- MemberOf: '0x78c811e506849d414a91a56dab91f07f7ed108f0bf27f550796f13e7bb2e2f2d',
89
- MilestoneApproved: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
90
- MilestoneCompleted: '0xf544fbd9721ac50863d32dc0eed5992051e7fb270b38ab2ce062327cc0ae26ea',
91
- Project: '0xa727441596f5a9878552d3ad6c53c31629a709451e6081ba01bff0f73bf1af5a',
57
+ Community: "0x314bb1c3c9b5311c1b813a3ad123b6ac5a03902b987795056dd2e4ff38e833ea",
58
+ Details: "0xd193e75f420a69910f98fa79cacdfd9d0dcbf5933edce8f8bde9a10bd204d996",
59
+ Grant: "0x181beb00ef05cf99caa2e4192369232f210c2764f26e238d962112bf592e9cce",
60
+ GrantVerified: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
61
+ MemberOf: "0x611f9655188f372e27dce116a803fa9081ca3e2907986368d54fcad538ca3853",
62
+ MilestoneApproved: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
63
+ MilestoneCompleted: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
64
+ Project: "0xf9bbd118dd100459a7d093403af21c6e7f847fd7f331b7a4e6bfb94a1366bd76",
92
65
  },
93
66
  },
94
67
  arbitrum: {
95
68
  chainId: 42161,
96
- url: 'https://arbitrum.easscan.org/graphql',
97
- rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/okcKBSKXvLuSCbas6QWGvKuh-IcHHSOr',
69
+ url: "https://arbitrum.easscan.org/graphql",
70
+ rpcUrl: "https://arb-mainnet.g.alchemy.com/v2/okcKBSKXvLuSCbas6QWGvKuh-IcHHSOr",
98
71
  contracts: {
99
- eas: '0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458',
100
- schema: '0xA310da9c5B885E7fb3fbA9D66E9Ba6Df512b78eB',
101
- multicall: '0x6dC1D6b864e8BEf815806f9e4677123496e12026',
102
- projectResolver: '0x28BE0b0515be8BB8822aF1467A6613795E74717b',
103
- communityResolver: '0xD534C4704F82494aBbc901560046fB62Ac63E9C4',
72
+ eas: "0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458",
73
+ schema: "0xA310da9c5B885E7fb3fbA9D66E9Ba6Df512b78eB",
74
+ multicall: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
75
+ projectResolver: "0x28BE0b0515be8BB8822aF1467A6613795E74717b",
76
+ communityResolver: "0xD534C4704F82494aBbc901560046fB62Ac63E9C4",
104
77
  },
105
78
  schemas: {
106
- Community: '0xc604f0661cfd522583835ed2b2c644b80e068139d287f93c7f1680888894bacc',
107
- Details: '0x16bfe4783b7a9c743c401222c56a07ecb77ed42afc84b61ff1f62f5936c0b9d7',
108
- Grant: '0xea02ab33f9f4c92ba02c9bb21614b7410b98c940a0d8eb8ad3a20204d8b4bda5',
109
- GrantVerified: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
110
- MemberOf: '0x5f430aec9d04f0dcb3729775c5dfe10752e436469a7607f8c64ae44ef996e477',
111
- MilestoneApproved: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
112
- MilestoneCompleted: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
113
- Project: '0xac2a06e955a7e25e6729efe1a6532237e3435b21ccd3dc827ae3c94e624d25b3',
79
+ Community: "0xc604f0661cfd522583835ed2b2c644b80e068139d287f93c7f1680888894bacc",
80
+ Details: "0x16bfe4783b7a9c743c401222c56a07ecb77ed42afc84b61ff1f62f5936c0b9d7",
81
+ Grant: "0xea02ab33f9f4c92ba02c9bb21614b7410b98c940a0d8eb8ad3a20204d8b4bda5",
82
+ GrantVerified: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
83
+ MemberOf: "0x5f430aec9d04f0dcb3729775c5dfe10752e436469a7607f8c64ae44ef996e477",
84
+ MilestoneApproved: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
85
+ MilestoneCompleted: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
86
+ Project: "0xac2a06e955a7e25e6729efe1a6532237e3435b21ccd3dc827ae3c94e624d25b3",
114
87
  },
115
88
  },
116
89
  sepolia: {
117
90
  chainId: 11155111,
118
- url: 'https://sepolia.easscan.org/graphql',
119
- rpcUrl: 'https://sepolia.infura.io/v3/34917361240448cda81f542681961659',
91
+ url: "https://sepolia.easscan.org/graphql",
92
+ rpcUrl: "https://eth-sepolia.g.alchemy.com/v2/_M6YQg_DoVKuMisaFHSVZL-EcdkTbhUi",
120
93
  contracts: {
121
- eas: '0xC2679fBD37d54388Ce493F1DB75320D236e1815e',
122
- schema: '0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0',
123
- multicall: '0xec8d7BFe344790FD860920C41B46B259c005727A',
124
- projectResolver: '0x099787D5a5aC92779A519CfD925ACB0Dc7E8bd23',
125
- communityResolver: '0xa9E55D9F52d7B47792d2Db15F6A9674c56ccc5C9',
94
+ eas: "0xC2679fBD37d54388Ce493F1DB75320D236e1815e",
95
+ schema: "0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0",
96
+ multicall: "0xec8d7BFe344790FD860920C41B46B259c005727A",
97
+ projectResolver: "0x099787D5a5aC92779A519CfD925ACB0Dc7E8bd23",
98
+ communityResolver: "0xa9E55D9F52d7B47792d2Db15F6A9674c56ccc5C9",
126
99
  },
127
100
  schemas: {
128
- Community: '0xf3d790c7fdab6c1b1f25ffcc9289e5be2792eb596d2851a4d059c8aae1bc8b2e',
101
+ Community: "0xf3d790c7fdab6c1b1f25ffcc9289e5be2792eb596d2851a4d059c8aae1bc8b2e",
129
102
  // "0x1954572e3fe21bf4334afdaf1358ed7098af1ed136e76dc93c2fdc25e83934c1", // original without resolver
130
- Details: '0x2c270e35bfcdc4d611f0e9d3d2ab6924ec6c673505abc22a1dd07e19b67211af',
131
- Grant: '0x09697aeeb3ae71de1cc19e388fd74264f11af5fba3016094764553ac341fdc72',
132
- GrantVerified: '0x0be8952e2dd74ffd63a02f4d55b20b603fe7a60130cb9d70de31feb9c52fdd37',
133
- MemberOf: '0xdd87b3500457931252424f4439365534ba72a367503a8805ff3482353fb90301',
134
- MilestoneApproved: '0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322',
135
- MilestoneCompleted: '0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322',
136
- Project: '0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb',
103
+ Details: "0x2c270e35bfcdc4d611f0e9d3d2ab6924ec6c673505abc22a1dd07e19b67211af",
104
+ Grant: "0x09697aeeb3ae71de1cc19e388fd74264f11af5fba3016094764553ac341fdc72",
105
+ GrantVerified: "0x0be8952e2dd74ffd63a02f4d55b20b603fe7a60130cb9d70de31feb9c52fdd37",
106
+ MemberOf: "0xdd87b3500457931252424f4439365534ba72a367503a8805ff3482353fb90301",
107
+ MilestoneApproved: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
108
+ MilestoneCompleted: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
109
+ Project: "0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb",
137
110
  },
138
111
  },
139
112
  };
140
- const DetailsSchema = [{ type: 'string', name: 'json', value: null }];
113
+ const DetailsSchema = [{ type: "string", name: "json", value: null }];
141
114
  /**
142
115
  * Mounts the schemas for the given network and return all the settings
143
116
  * @param network
@@ -145,88 +118,88 @@ const DetailsSchema = [{ type: 'string', name: 'json', value: null }];
145
118
  */
146
119
  const MountEntities = (network) => ({
147
120
  Community: {
148
- name: 'Community',
149
- schema: [{ type: 'bool', name: 'community', value: true }],
121
+ name: "Community",
122
+ schema: [{ type: "bool", name: "community", value: true }],
150
123
  uid: network.schemas.Community,
151
124
  },
152
125
  CommunityDetails: {
153
- name: 'CommunityDetails',
126
+ name: "CommunityDetails",
154
127
  schema: DetailsSchema,
155
128
  uid: network.schemas.Details,
156
- references: 'Community',
129
+ references: "Community",
157
130
  },
158
131
  Project: {
159
- name: 'Project',
160
- schema: [{ type: 'bool', name: 'project', value: true }],
132
+ name: "Project",
133
+ schema: [{ type: "bool", name: "project", value: true }],
161
134
  uid: network.schemas.Project,
162
135
  },
163
136
  ProjectDetails: {
164
- name: 'ProjectDetails',
137
+ name: "ProjectDetails",
165
138
  schema: DetailsSchema,
166
139
  uid: network.schemas.Details,
167
- references: 'Project',
140
+ references: "Project",
168
141
  },
169
142
  MemberOf: {
170
- name: 'MemberOf',
171
- schema: [{ type: 'bool', name: 'memberOf', value: true }],
143
+ name: "MemberOf",
144
+ schema: [{ type: "bool", name: "memberOf", value: true }],
172
145
  uid: network.schemas.MemberOf,
173
- references: 'Project',
146
+ references: "Project",
174
147
  },
175
148
  MemberDetails: {
176
- name: 'MemberDetails',
149
+ name: "MemberDetails",
177
150
  schema: DetailsSchema,
178
151
  uid: network.schemas.Details,
179
- references: 'MemberOf',
152
+ references: "MemberOf",
180
153
  },
181
154
  Grant: {
182
- name: 'Grant',
183
- schema: [{ type: 'bytes32', name: 'communityUID', value: true }],
155
+ name: "Grant",
156
+ schema: [{ type: "bytes32", name: "communityUID", value: true }],
184
157
  // schema: [{ type: "bool", name: "grant", value: true }],
185
158
  uid: network.schemas.Grant,
186
- references: 'Project',
159
+ references: "Project",
187
160
  },
188
161
  GrantDetails: {
189
- name: 'GrantDetails',
162
+ name: "GrantDetails",
190
163
  schema: DetailsSchema,
191
164
  uid: network.schemas.Details,
192
- references: 'Grant',
165
+ references: "Grant",
193
166
  },
194
167
  GrantVerified: {
195
- name: 'GrantVerified',
168
+ name: "GrantVerified",
196
169
  schema: [
197
- { type: 'string', name: 'type', value: null },
198
- { type: 'string', name: 'reason', value: '' },
170
+ { type: "string", name: "type", value: null },
171
+ { type: "string", name: "reason", value: "" },
199
172
  ],
200
173
  uid: network.schemas.GrantVerified,
201
- references: 'Grant',
174
+ references: "Grant",
202
175
  },
203
176
  Milestone: {
204
- name: 'Milestone',
177
+ name: "Milestone",
205
178
  schema: DetailsSchema,
206
179
  uid: network.schemas.Details,
207
- references: 'Grant',
180
+ references: "Grant",
208
181
  },
209
182
  MilestoneApproved: {
210
- name: 'MilestoneApproved',
183
+ name: "MilestoneApproved",
211
184
  schema: [
212
- { type: 'string', name: 'type', value: null },
213
- { type: 'string', name: 'reason', value: '' },
185
+ { type: "string", name: "type", value: null },
186
+ { type: "string", name: "reason", value: "" },
214
187
  ],
215
188
  uid: network.schemas.MilestoneApproved,
216
- references: 'Milestone',
189
+ references: "Milestone",
217
190
  },
218
191
  MilestoneCompleted: {
219
- name: 'MilestoneCompleted',
192
+ name: "MilestoneCompleted",
220
193
  schema: [
221
- { type: 'string', name: 'type', value: null },
222
- { type: 'string', name: 'reason', value: '' },
194
+ { type: "string", name: "type", value: null },
195
+ { type: "string", name: "reason", value: "" },
223
196
  ],
224
197
  uid: network.schemas.MilestoneCompleted,
225
- references: 'Milestone',
198
+ references: "Milestone",
226
199
  },
227
200
  Details: {
228
201
  schema: DetailsSchema,
229
- name: ' schema',
202
+ name: " schema",
230
203
  uid: network.schemas.Details,
231
204
  },
232
205
  });
package/core/types.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface AttestArgs<T = unknown> {
29
29
  export type TSchemaName = 'Community' | 'CommunityDetails' | 'Grant' | 'GrantDetails' | 'GrantVerified' | 'MemberOf' | 'MemberDetails' | 'Milestone' | 'MilestoneCompleted' | 'MilestoneApproved' | 'Project' | 'ProjectDetails' | 'Details';
30
30
  export type TResolvedSchemaNames = 'Community' | 'Grant' | 'GrantVerified' | 'MemberOf' | 'MilestoneCompleted' | 'MilestoneApproved' | 'Project' | 'Details';
31
31
  export type TExternalLink = 'twitter' | 'github' | 'website' | 'linkedin' | 'discord';
32
- export type TNetwork = 'optimism' | 'optimism-goerli' | 'optimism-sepolia' | "arbitrum" | 'sepolia';
32
+ export type TNetwork = 'optimism' | 'optimism-sepolia' | "arbitrum" | 'sepolia';
33
33
  /**
34
34
  * Generic GAP Facade interface.
35
35
  * This supplies the GAP class with the necessary properties.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.8",
6
+ "version": "0.3.9",
7
7
  "description": "Simple and easy interface between EAS and Karma GAP.",
8
8
  "main": "./index.js",
9
9
  "author": "KarmaHQ",
@@ -1,7 +0,0 @@
1
- import { IPFS } from './IPFS/IPFS';
2
- export declare class AttestationIPFS extends IPFS {
3
- encode(data: string, storageType: number): {
4
- ipfsHash: string;
5
- type: number;
6
- };
7
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttestationIPFS = void 0;
4
- const IPFS_1 = require("./IPFS/IPFS");
5
- class AttestationIPFS extends IPFS_1.IPFS {
6
- encode(data, storageType) {
7
- return { ipfsHash: data, type: storageType };
8
- }
9
- }
10
- exports.AttestationIPFS = AttestationIPFS;