@show-karma/karma-gap-sdk 0.3.8 → 0.3.10
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.
- package/core/class/AllGapSchemas.d.ts +9 -0
- package/core/class/AllGapSchemas.js +19 -0
- package/core/class/Schema.js +1 -1
- package/core/class/entities/Grant.js +5 -5
- package/core/class/entities/Milestone.js +6 -5
- package/core/class/entities/Project.js +5 -5
- package/core/class/types/attestations.d.ts +2 -0
- package/core/consts.d.ts +7 -1
- package/core/consts.js +108 -129
- package/core/types.d.ts +1 -1
- package/package.json +1 -1
- package/core/class/AttestationIPFS.d.ts +0 -7
- package/core/class/AttestationIPFS.js +0 -10
- package/core/class/GraphQL/Fetcher.d.ts +0 -132
- package/core/class/GraphQL/Fetcher.js +0 -7
- package/core/class/GraphQL/GAPFetcher.d.ts +0 -160
- package/core/class/GraphQL/GAPFetcher.js +0 -516
- package/core/class/IPFS/IPFS.d.ts +0 -13
- package/core/class/IPFS/IPFS.js +0 -24
- package/core/class/contract/MultiAttest.d.ts +0 -10
- package/core/class/contract/MultiAttest.js +0 -19
- package/readme.md +0 -841
|
@@ -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;
|
package/core/class/Schema.js
CHANGED
|
@@ -4,12 +4,12 @@ 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
13
|
class Grant extends Attestation_1.Attestation {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
@@ -164,7 +164,7 @@ class Grant extends Attestation_1.Attestation {
|
|
|
164
164
|
data: {
|
|
165
165
|
communityUID: attestation.data.communityUID,
|
|
166
166
|
},
|
|
167
|
-
schema:
|
|
167
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Grant', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
168
168
|
chainID: attestation.chainID,
|
|
169
169
|
});
|
|
170
170
|
if (attestation.details) {
|
|
@@ -174,7 +174,7 @@ class Grant extends Attestation_1.Attestation {
|
|
|
174
174
|
data: {
|
|
175
175
|
...details.data,
|
|
176
176
|
},
|
|
177
|
-
schema:
|
|
177
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
178
178
|
chainID: attestation.chainID,
|
|
179
179
|
});
|
|
180
180
|
}
|
|
@@ -189,7 +189,7 @@ class Grant extends Attestation_1.Attestation {
|
|
|
189
189
|
data: {
|
|
190
190
|
...u.data,
|
|
191
191
|
},
|
|
192
|
-
schema:
|
|
192
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
193
193
|
chainID: attestation.chainID,
|
|
194
194
|
}));
|
|
195
195
|
}
|
|
@@ -200,7 +200,7 @@ class Grant extends Attestation_1.Attestation {
|
|
|
200
200
|
data: {
|
|
201
201
|
...completed.data,
|
|
202
202
|
},
|
|
203
|
-
schema:
|
|
203
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantDetails', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
204
204
|
chainID: attestation.chainID,
|
|
205
205
|
});
|
|
206
206
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Milestone = void 0;
|
|
4
|
+
const consts_1 = require("core/consts");
|
|
5
|
+
const AllGapSchemas_1 = require("../AllGapSchemas");
|
|
4
6
|
const Attestation_1 = require("../Attestation");
|
|
5
|
-
const GapSchema_1 = require("../GapSchema");
|
|
6
7
|
const SchemaError_1 = require("../SchemaError");
|
|
7
8
|
const GapContract_1 = require("../contract/GapContract");
|
|
8
9
|
const attestations_1 = require("../types/attestations");
|
|
@@ -188,7 +189,7 @@ class Milestone extends Attestation_1.Attestation {
|
|
|
188
189
|
data: {
|
|
189
190
|
...attestation.data,
|
|
190
191
|
},
|
|
191
|
-
schema:
|
|
192
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Milestone', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
192
193
|
chainID: attestation.chainID,
|
|
193
194
|
});
|
|
194
195
|
if (attestation.completed) {
|
|
@@ -197,7 +198,7 @@ class Milestone extends Attestation_1.Attestation {
|
|
|
197
198
|
data: {
|
|
198
199
|
...attestation.completed.data,
|
|
199
200
|
},
|
|
200
|
-
schema:
|
|
201
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
201
202
|
chainID: attestation.chainID,
|
|
202
203
|
});
|
|
203
204
|
}
|
|
@@ -207,7 +208,7 @@ class Milestone extends Attestation_1.Attestation {
|
|
|
207
208
|
data: {
|
|
208
209
|
...attestation.completed.data,
|
|
209
210
|
},
|
|
210
|
-
schema:
|
|
211
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
211
212
|
chainID: attestation.chainID,
|
|
212
213
|
});
|
|
213
214
|
}
|
|
@@ -217,7 +218,7 @@ class Milestone extends Attestation_1.Attestation {
|
|
|
217
218
|
data: {
|
|
218
219
|
...attestation.completed.data,
|
|
219
220
|
},
|
|
220
|
-
schema:
|
|
221
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
221
222
|
chainID: attestation.chainID,
|
|
222
223
|
});
|
|
223
224
|
}
|
|
@@ -3,13 +3,13 @@ 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
13
|
class Project extends Attestation_1.Attestation {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
@@ -193,7 +193,7 @@ class Project extends Attestation_1.Attestation {
|
|
|
193
193
|
data: {
|
|
194
194
|
project: true,
|
|
195
195
|
},
|
|
196
|
-
schema:
|
|
196
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Project', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
197
197
|
chainID: attestation.chainID,
|
|
198
198
|
});
|
|
199
199
|
if (attestation.details) {
|
|
@@ -203,7 +203,7 @@ class Project extends Attestation_1.Attestation {
|
|
|
203
203
|
data: {
|
|
204
204
|
...details.data,
|
|
205
205
|
},
|
|
206
|
-
schema:
|
|
206
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('ProjectDetails', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
207
207
|
chainID: attestation.chainID,
|
|
208
208
|
});
|
|
209
209
|
project.details.links = details.data.links || [];
|
|
@@ -222,7 +222,7 @@ class Project extends Attestation_1.Attestation {
|
|
|
222
222
|
data: {
|
|
223
223
|
memberOf: true,
|
|
224
224
|
},
|
|
225
|
-
schema:
|
|
225
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberOf', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
226
226
|
chainID: attestation.chainID,
|
|
227
227
|
});
|
|
228
228
|
if (m.details) {
|
|
@@ -232,7 +232,7 @@ class Project extends Attestation_1.Attestation {
|
|
|
232
232
|
data: {
|
|
233
233
|
...details.data,
|
|
234
234
|
},
|
|
235
|
-
schema:
|
|
235
|
+
schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberDetails', consts_1.chainIdToNetwork[attestation.chainID]),
|
|
236
236
|
chainID: attestation.chainID,
|
|
237
237
|
});
|
|
238
238
|
}
|
|
@@ -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,9 +1,15 @@
|
|
|
1
|
-
import { EASNetworkConfig, SchemaInterface, TNetwork, TSchemaName } from
|
|
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.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useDefaultAttestation: TSchemaName[];
|
|
7
|
+
export declare const chainIdToNetwork: {
|
|
8
|
+
11155420: string;
|
|
9
|
+
42161: string;
|
|
10
|
+
10: string;
|
|
11
|
+
11155111: string;
|
|
12
|
+
};
|
|
7
13
|
export declare const nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
8
14
|
export declare const nullResolver = "0x0000000000000000000000000000000000000000";
|
|
9
15
|
export declare const zeroAddress = "0x0000000000000000000000000000000000000000";
|
package/core/consts.js
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MountEntities = exports.Networks = exports.zeroAddress = exports.nullResolver = exports.nullRef = exports.useDefaultAttestation = void 0;
|
|
3
|
+
exports.MountEntities = exports.Networks = exports.zeroAddress = exports.nullResolver = exports.nullRef = exports.chainIdToNetwork = exports.useDefaultAttestation = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Schemas that should use default EAS attestation
|
|
6
6
|
* instead of the custom contract.
|
|
7
7
|
*/
|
|
8
8
|
exports.useDefaultAttestation = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
"MilestoneApproved",
|
|
10
|
+
"MilestoneCompleted",
|
|
11
|
+
"GrantVerified",
|
|
12
|
+
"Community",
|
|
13
13
|
];
|
|
14
|
-
exports.
|
|
14
|
+
exports.chainIdToNetwork = {
|
|
15
|
+
11155420: 'optimism-sepolia',
|
|
16
|
+
42161: 'arbitrum',
|
|
17
|
+
10: 'optimism',
|
|
18
|
+
11155111: 'sepolia'
|
|
19
|
+
};
|
|
20
|
+
exports.nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
15
21
|
// TODO: Remove null resolver and change usage to zero address
|
|
16
|
-
exports.nullResolver =
|
|
22
|
+
exports.nullResolver = "0x0000000000000000000000000000000000000000";
|
|
17
23
|
exports.zeroAddress = exports.nullResolver;
|
|
18
24
|
// resolver for dependents = 0xed081ABE885bc3575f810c904052A1f685A85903
|
|
19
25
|
/**
|
|
@@ -22,122 +28,95 @@ exports.zeroAddress = exports.nullResolver;
|
|
|
22
28
|
exports.Networks = {
|
|
23
29
|
optimism: {
|
|
24
30
|
chainId: 10,
|
|
25
|
-
url:
|
|
26
|
-
rpcUrl:
|
|
31
|
+
url: "https://optimism.easscan.org/graphql",
|
|
32
|
+
rpcUrl: "https://opt-mainnet.g.alchemy.com/v2/fx2SlVDrPbXwPMQT4v0lRT1PABA16Myl",
|
|
27
33
|
contracts: {
|
|
28
|
-
eas:
|
|
29
|
-
schema:
|
|
30
|
-
multicall:
|
|
31
|
-
projectResolver:
|
|
32
|
-
communityResolver:
|
|
34
|
+
eas: "0x4200000000000000000000000000000000000021",
|
|
35
|
+
schema: "0x4200000000000000000000000000000000000020",
|
|
36
|
+
multicall: "0xd2eD366393FDfd243931Fe48e9fb65A192B0018c",
|
|
37
|
+
projectResolver: "0x7177AdC0f924b695C0294A40C4C5FEFf5EE1E141",
|
|
38
|
+
communityResolver: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
|
|
33
39
|
},
|
|
34
40
|
schemas: {
|
|
35
|
-
Community:
|
|
36
|
-
Details:
|
|
37
|
-
Grant:
|
|
38
|
-
GrantVerified:
|
|
39
|
-
MemberOf:
|
|
40
|
-
MilestoneApproved:
|
|
41
|
-
MilestoneCompleted:
|
|
42
|
-
Project:
|
|
41
|
+
Community: "0x721c17b065dccc5c916e0c2708d0ef50f1810591b76d0402ff6fe5accbd8488f",
|
|
42
|
+
Details: "0x70a3f615f738fc6a4f56100692ada93d947c028b840940d97af7e7d6f0fa0577",
|
|
43
|
+
Grant: "0x12837231f48acbca4e1e7f4416f684f3353bd4d71d4f03a09d29e5ffa6f21a50",
|
|
44
|
+
GrantVerified: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
|
|
45
|
+
MemberOf: "0x7fbb8a65924d8ad2ae12356e04b1418043e8361ba3b1b6c917de2e23df3ec81c",
|
|
46
|
+
MilestoneApproved: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
|
|
47
|
+
MilestoneCompleted: "0x13adc8df8a7324b1651e8bcec948b3e2d4fcfa2a88a52136206cb9ea44836e93",
|
|
48
|
+
Project: "0x5b873b6e7a16207b526dde366e8164e95bcda2f009272306519667c5e94d2191",
|
|
43
49
|
},
|
|
44
50
|
},
|
|
45
|
-
|
|
51
|
+
"optimism-sepolia": {
|
|
46
52
|
chainId: 11155420,
|
|
47
|
-
url:
|
|
48
|
-
rpcUrl:
|
|
49
|
-
contracts: {
|
|
50
|
-
communityResolver: '0xa5B7bbFD545A1a816aa8cBE28a1F0F2Cca58363d',
|
|
51
|
-
eas: '0x4200000000000000000000000000000000000021',
|
|
52
|
-
multicall: '0xC891F8eBA218f5034bf3a472528408BE19E1130E',
|
|
53
|
-
projectResolver: '0x832931F23ea4e3c70957DA71a7eB50F5B7efA93D',
|
|
54
|
-
schema: '0x4200000000000000000000000000000000000020',
|
|
55
|
-
},
|
|
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',
|
|
53
|
+
url: "https://optimism-sepolia.easscan.org/graphql",
|
|
54
|
+
rpcUrl: "https://opt-sepolia.g.alchemy.com/v2/9FEqTNKmgO7X7ll92ALJrEih7Jjhldf-",
|
|
75
55
|
contracts: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
multicall:
|
|
79
|
-
projectResolver:
|
|
80
|
-
|
|
56
|
+
communityResolver: "0xa5B7bbFD545A1a816aa8cBE28a1F0F2Cca58363d",
|
|
57
|
+
eas: "0x4200000000000000000000000000000000000021",
|
|
58
|
+
multicall: "0xC891F8eBA218f5034bf3a472528408BE19E1130E",
|
|
59
|
+
projectResolver: "0x832931F23ea4e3c70957DA71a7eB50F5B7efA93D",
|
|
60
|
+
schema: "0x4200000000000000000000000000000000000020",
|
|
81
61
|
},
|
|
82
62
|
schemas: {
|
|
83
|
-
Community:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Project: '0xa727441596f5a9878552d3ad6c53c31629a709451e6081ba01bff0f73bf1af5a',
|
|
63
|
+
Community: "0x314bb1c3c9b5311c1b813a3ad123b6ac5a03902b987795056dd2e4ff38e833ea",
|
|
64
|
+
Details: "0xd193e75f420a69910f98fa79cacdfd9d0dcbf5933edce8f8bde9a10bd204d996",
|
|
65
|
+
Grant: "0x181beb00ef05cf99caa2e4192369232f210c2764f26e238d962112bf592e9cce",
|
|
66
|
+
GrantVerified: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
|
|
67
|
+
MemberOf: "0x611f9655188f372e27dce116a803fa9081ca3e2907986368d54fcad538ca3853",
|
|
68
|
+
MilestoneApproved: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
|
|
69
|
+
MilestoneCompleted: "0xf9ec600d61d88614c863365a79715a7ba29781ec67643ffeb9222dd8873ee3fa",
|
|
70
|
+
Project: "0xf9bbd118dd100459a7d093403af21c6e7f847fd7f331b7a4e6bfb94a1366bd76",
|
|
92
71
|
},
|
|
93
72
|
},
|
|
94
73
|
arbitrum: {
|
|
95
74
|
chainId: 42161,
|
|
96
|
-
url:
|
|
97
|
-
rpcUrl:
|
|
75
|
+
url: "https://arbitrum.easscan.org/graphql",
|
|
76
|
+
rpcUrl: "https://arb-mainnet.g.alchemy.com/v2/okcKBSKXvLuSCbas6QWGvKuh-IcHHSOr",
|
|
98
77
|
contracts: {
|
|
99
|
-
eas:
|
|
100
|
-
schema:
|
|
101
|
-
multicall:
|
|
102
|
-
projectResolver:
|
|
103
|
-
communityResolver:
|
|
78
|
+
eas: "0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458",
|
|
79
|
+
schema: "0xA310da9c5B885E7fb3fbA9D66E9Ba6Df512b78eB",
|
|
80
|
+
multicall: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
|
|
81
|
+
projectResolver: "0x28BE0b0515be8BB8822aF1467A6613795E74717b",
|
|
82
|
+
communityResolver: "0xD534C4704F82494aBbc901560046fB62Ac63E9C4",
|
|
104
83
|
},
|
|
105
84
|
schemas: {
|
|
106
|
-
Community:
|
|
107
|
-
Details:
|
|
108
|
-
Grant:
|
|
109
|
-
GrantVerified:
|
|
110
|
-
MemberOf:
|
|
111
|
-
MilestoneApproved:
|
|
112
|
-
MilestoneCompleted:
|
|
113
|
-
Project:
|
|
85
|
+
Community: "0xc604f0661cfd522583835ed2b2c644b80e068139d287f93c7f1680888894bacc",
|
|
86
|
+
Details: "0x16bfe4783b7a9c743c401222c56a07ecb77ed42afc84b61ff1f62f5936c0b9d7",
|
|
87
|
+
Grant: "0xea02ab33f9f4c92ba02c9bb21614b7410b98c940a0d8eb8ad3a20204d8b4bda5",
|
|
88
|
+
GrantVerified: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
|
|
89
|
+
MemberOf: "0x5f430aec9d04f0dcb3729775c5dfe10752e436469a7607f8c64ae44ef996e477",
|
|
90
|
+
MilestoneApproved: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
|
|
91
|
+
MilestoneCompleted: "0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15",
|
|
92
|
+
Project: "0xac2a06e955a7e25e6729efe1a6532237e3435b21ccd3dc827ae3c94e624d25b3",
|
|
114
93
|
},
|
|
115
94
|
},
|
|
116
95
|
sepolia: {
|
|
117
96
|
chainId: 11155111,
|
|
118
|
-
url:
|
|
119
|
-
rpcUrl:
|
|
97
|
+
url: "https://sepolia.easscan.org/graphql",
|
|
98
|
+
rpcUrl: "https://eth-sepolia.g.alchemy.com/v2/_M6YQg_DoVKuMisaFHSVZL-EcdkTbhUi",
|
|
120
99
|
contracts: {
|
|
121
|
-
eas:
|
|
122
|
-
schema:
|
|
123
|
-
multicall:
|
|
124
|
-
projectResolver:
|
|
125
|
-
communityResolver:
|
|
100
|
+
eas: "0xC2679fBD37d54388Ce493F1DB75320D236e1815e",
|
|
101
|
+
schema: "0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0",
|
|
102
|
+
multicall: "0xec8d7BFe344790FD860920C41B46B259c005727A",
|
|
103
|
+
projectResolver: "0x099787D5a5aC92779A519CfD925ACB0Dc7E8bd23",
|
|
104
|
+
communityResolver: "0xa9E55D9F52d7B47792d2Db15F6A9674c56ccc5C9",
|
|
126
105
|
},
|
|
127
106
|
schemas: {
|
|
128
|
-
Community:
|
|
107
|
+
Community: "0xf3d790c7fdab6c1b1f25ffcc9289e5be2792eb596d2851a4d059c8aae1bc8b2e",
|
|
129
108
|
// "0x1954572e3fe21bf4334afdaf1358ed7098af1ed136e76dc93c2fdc25e83934c1", // original without resolver
|
|
130
|
-
Details:
|
|
131
|
-
Grant:
|
|
132
|
-
GrantVerified:
|
|
133
|
-
MemberOf:
|
|
134
|
-
MilestoneApproved:
|
|
135
|
-
MilestoneCompleted:
|
|
136
|
-
Project:
|
|
109
|
+
Details: "0x2c270e35bfcdc4d611f0e9d3d2ab6924ec6c673505abc22a1dd07e19b67211af",
|
|
110
|
+
Grant: "0x09697aeeb3ae71de1cc19e388fd74264f11af5fba3016094764553ac341fdc72",
|
|
111
|
+
GrantVerified: "0x0be8952e2dd74ffd63a02f4d55b20b603fe7a60130cb9d70de31feb9c52fdd37",
|
|
112
|
+
MemberOf: "0xdd87b3500457931252424f4439365534ba72a367503a8805ff3482353fb90301",
|
|
113
|
+
MilestoneApproved: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
|
|
114
|
+
MilestoneCompleted: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
|
|
115
|
+
Project: "0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb",
|
|
137
116
|
},
|
|
138
117
|
},
|
|
139
118
|
};
|
|
140
|
-
const DetailsSchema = [{ type:
|
|
119
|
+
const DetailsSchema = [{ type: "string", name: "json", value: null }];
|
|
141
120
|
/**
|
|
142
121
|
* Mounts the schemas for the given network and return all the settings
|
|
143
122
|
* @param network
|
|
@@ -145,88 +124,88 @@ const DetailsSchema = [{ type: 'string', name: 'json', value: null }];
|
|
|
145
124
|
*/
|
|
146
125
|
const MountEntities = (network) => ({
|
|
147
126
|
Community: {
|
|
148
|
-
name:
|
|
149
|
-
schema: [{ type:
|
|
127
|
+
name: "Community",
|
|
128
|
+
schema: [{ type: "bool", name: "community", value: true }],
|
|
150
129
|
uid: network.schemas.Community,
|
|
151
130
|
},
|
|
152
131
|
CommunityDetails: {
|
|
153
|
-
name:
|
|
132
|
+
name: "CommunityDetails",
|
|
154
133
|
schema: DetailsSchema,
|
|
155
134
|
uid: network.schemas.Details,
|
|
156
|
-
references:
|
|
135
|
+
references: "Community",
|
|
157
136
|
},
|
|
158
137
|
Project: {
|
|
159
|
-
name:
|
|
160
|
-
schema: [{ type:
|
|
138
|
+
name: "Project",
|
|
139
|
+
schema: [{ type: "bool", name: "project", value: true }],
|
|
161
140
|
uid: network.schemas.Project,
|
|
162
141
|
},
|
|
163
142
|
ProjectDetails: {
|
|
164
|
-
name:
|
|
143
|
+
name: "ProjectDetails",
|
|
165
144
|
schema: DetailsSchema,
|
|
166
145
|
uid: network.schemas.Details,
|
|
167
|
-
references:
|
|
146
|
+
references: "Project",
|
|
168
147
|
},
|
|
169
148
|
MemberOf: {
|
|
170
|
-
name:
|
|
171
|
-
schema: [{ type:
|
|
149
|
+
name: "MemberOf",
|
|
150
|
+
schema: [{ type: "bool", name: "memberOf", value: true }],
|
|
172
151
|
uid: network.schemas.MemberOf,
|
|
173
|
-
references:
|
|
152
|
+
references: "Project",
|
|
174
153
|
},
|
|
175
154
|
MemberDetails: {
|
|
176
|
-
name:
|
|
155
|
+
name: "MemberDetails",
|
|
177
156
|
schema: DetailsSchema,
|
|
178
157
|
uid: network.schemas.Details,
|
|
179
|
-
references:
|
|
158
|
+
references: "MemberOf",
|
|
180
159
|
},
|
|
181
160
|
Grant: {
|
|
182
|
-
name:
|
|
183
|
-
schema: [{ type:
|
|
161
|
+
name: "Grant",
|
|
162
|
+
schema: [{ type: "bytes32", name: "communityUID", value: true }],
|
|
184
163
|
// schema: [{ type: "bool", name: "grant", value: true }],
|
|
185
164
|
uid: network.schemas.Grant,
|
|
186
|
-
references:
|
|
165
|
+
references: "Project",
|
|
187
166
|
},
|
|
188
167
|
GrantDetails: {
|
|
189
|
-
name:
|
|
168
|
+
name: "GrantDetails",
|
|
190
169
|
schema: DetailsSchema,
|
|
191
170
|
uid: network.schemas.Details,
|
|
192
|
-
references:
|
|
171
|
+
references: "Grant",
|
|
193
172
|
},
|
|
194
173
|
GrantVerified: {
|
|
195
|
-
name:
|
|
174
|
+
name: "GrantVerified",
|
|
196
175
|
schema: [
|
|
197
|
-
{ type:
|
|
198
|
-
{ type:
|
|
176
|
+
{ type: "string", name: "type", value: null },
|
|
177
|
+
{ type: "string", name: "reason", value: "" },
|
|
199
178
|
],
|
|
200
179
|
uid: network.schemas.GrantVerified,
|
|
201
|
-
references:
|
|
180
|
+
references: "Grant",
|
|
202
181
|
},
|
|
203
182
|
Milestone: {
|
|
204
|
-
name:
|
|
183
|
+
name: "Milestone",
|
|
205
184
|
schema: DetailsSchema,
|
|
206
185
|
uid: network.schemas.Details,
|
|
207
|
-
references:
|
|
186
|
+
references: "Grant",
|
|
208
187
|
},
|
|
209
188
|
MilestoneApproved: {
|
|
210
|
-
name:
|
|
189
|
+
name: "MilestoneApproved",
|
|
211
190
|
schema: [
|
|
212
|
-
{ type:
|
|
213
|
-
{ type:
|
|
191
|
+
{ type: "string", name: "type", value: null },
|
|
192
|
+
{ type: "string", name: "reason", value: "" },
|
|
214
193
|
],
|
|
215
194
|
uid: network.schemas.MilestoneApproved,
|
|
216
|
-
references:
|
|
195
|
+
references: "Milestone",
|
|
217
196
|
},
|
|
218
197
|
MilestoneCompleted: {
|
|
219
|
-
name:
|
|
198
|
+
name: "MilestoneCompleted",
|
|
220
199
|
schema: [
|
|
221
|
-
{ type:
|
|
222
|
-
{ type:
|
|
200
|
+
{ type: "string", name: "type", value: null },
|
|
201
|
+
{ type: "string", name: "reason", value: "" },
|
|
223
202
|
],
|
|
224
203
|
uid: network.schemas.MilestoneCompleted,
|
|
225
|
-
references:
|
|
204
|
+
references: "Milestone",
|
|
226
205
|
},
|
|
227
206
|
Details: {
|
|
228
207
|
schema: DetailsSchema,
|
|
229
|
-
name:
|
|
208
|
+
name: " schema",
|
|
230
209
|
uid: network.schemas.Details,
|
|
231
210
|
},
|
|
232
211
|
});
|
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-
|
|
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
|
@@ -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;
|