@show-karma/karma-gap-sdk 0.4.17 → 0.4.19
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/Schema.js
CHANGED
|
@@ -28,7 +28,7 @@ const Endpoints = {
|
|
|
28
28
|
},
|
|
29
29
|
project: {
|
|
30
30
|
all: () => "/projects",
|
|
31
|
-
|
|
31
|
+
checkSlugAvailability: (slug) => `/v2/projects/slug/check/${slug}`,
|
|
32
32
|
byUidOrSlug: (uidOrSlug) => `/projects/${uidOrSlug}`,
|
|
33
33
|
grants: (uidOrSlug) => `/projects/${uidOrSlug}/grants`,
|
|
34
34
|
milestones: (uidOrSlug) => `/projects/${uidOrSlug}/milestones`,
|
|
@@ -193,13 +193,8 @@ class GapIndexerApi extends AxiosGQL_1.AxiosGQL {
|
|
|
193
193
|
return response;
|
|
194
194
|
}
|
|
195
195
|
async slugExists(slug) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
|
-
catch (err) {
|
|
201
|
-
return false;
|
|
202
|
-
}
|
|
196
|
+
const { data } = await this.client.get(Endpoints.project.checkSlugAvailability(slug));
|
|
197
|
+
return !data.available;
|
|
203
198
|
}
|
|
204
199
|
/**
|
|
205
200
|
* Tracks
|
package/core/consts.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare const chainIdToNetwork: {
|
|
|
15
15
|
1329: string;
|
|
16
16
|
1135: string;
|
|
17
17
|
534352: string;
|
|
18
|
+
8453: string;
|
|
19
|
+
137: string;
|
|
18
20
|
};
|
|
19
21
|
export declare const nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
20
22
|
export declare const nullResolver = "0x0000000000000000000000000000000000000000";
|
package/core/consts.js
CHANGED
|
@@ -28,6 +28,8 @@ exports.chainIdToNetwork = {
|
|
|
28
28
|
1329: "sei",
|
|
29
29
|
1135: "lisk",
|
|
30
30
|
534352: "scroll",
|
|
31
|
+
8453: "base",
|
|
32
|
+
137: "polygon"
|
|
31
33
|
};
|
|
32
34
|
exports.nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
33
35
|
// TODO: Remove null resolver and change usage to zero address
|
|
@@ -454,6 +456,62 @@ exports.Networks = {
|
|
|
454
456
|
ContributorProfile: null
|
|
455
457
|
},
|
|
456
458
|
},
|
|
459
|
+
"base": {
|
|
460
|
+
chainId: 8453,
|
|
461
|
+
url: "https://base.easscan.org/graphql",
|
|
462
|
+
rpcUrl: "https://mainnet.base.org",
|
|
463
|
+
contracts: {
|
|
464
|
+
eas: "0x4200000000000000000000000000000000000021",
|
|
465
|
+
schema: "0x4200000000000000000000000000000000000020",
|
|
466
|
+
multicall: "0x7177AdC0f924b695C0294A40C4C5FEFf5EE1E141",
|
|
467
|
+
projectResolver: "0xd2eD366393FDfd243931Fe48e9fb65A192B0018c",
|
|
468
|
+
communityResolver: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
|
|
469
|
+
donations: "0x5f4A21e16b04f9944229DF6CD2724088e3457B0e",
|
|
470
|
+
airdropNFT: null,
|
|
471
|
+
},
|
|
472
|
+
schemas: {
|
|
473
|
+
Community: "0x721c17b065dccc5c916e0c2708d0ef50f1810591b76d0402ff6fe5accbd8488f",
|
|
474
|
+
Details: "0x70a3f615f738fc6a4f56100692ada93d947c028b840940d97af7e7d6f0fa0577",
|
|
475
|
+
Grant: "0x12837231f48acbca4e1e7f4416f684f3353bd4d71d4f03a09d29e5ffa6f21a50",
|
|
476
|
+
GrantVerified: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
477
|
+
MemberOf: "0x7fbb8a65924d8ad2ae12356e04b1418043e8361ba3b1b6c917de2e23df3ec81c",
|
|
478
|
+
MilestoneApproved: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
479
|
+
MilestoneCompleted: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
480
|
+
GrantUpdateStatus: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
481
|
+
Project: "0x5a6b36ac106c74541efad39f8430751dd843bb78729bf7ffc296eca4cbb8d8f3",
|
|
482
|
+
ProjectUpdateStatus: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
483
|
+
ProjectMilestoneStatus: "0xb7eab95609c821624edc3c3a5a6c787bdc9da6c91393a967fb22b0e274c619dd",
|
|
484
|
+
ContributorProfile: "0xdfb8ad353dd144235bd45ae38803db6ffe066081770370f603709b9dec9ba8ff"
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
"polygon": {
|
|
488
|
+
chainId: 137,
|
|
489
|
+
url: "https://polygon.easscan.org/graphql",
|
|
490
|
+
rpcUrl: "https://polygon-rpc.com/",
|
|
491
|
+
contracts: {
|
|
492
|
+
eas: "0x5E634ef5355f45A855d02D66eCD687b1502AF790",
|
|
493
|
+
schema: "0x7876EEF51A891E737AF8ba5A5E0f0Fd29073D5a7",
|
|
494
|
+
multicall: "0x2B2a82637299F9614f4F4833C946cC7b749C6814",
|
|
495
|
+
projectResolver: "0xA37e6F58289F2c3e650b0cdF3Bb1000889e8d07C",
|
|
496
|
+
communityResolver: "0x710Add6c51327c44d9208aA0Aef2e7011D3678BF",
|
|
497
|
+
donations: "0x5f4A21e16b04f9944229DF6CD2724088e3457B0e",
|
|
498
|
+
airdropNFT: null,
|
|
499
|
+
},
|
|
500
|
+
schemas: {
|
|
501
|
+
Community: "0x884bd33b1d7fce5c637e85aef538e83a8a87157d7df2d357e6cc8d4c59b89400",
|
|
502
|
+
Details: "0x2038ec9d8d0ab60324065aa0b4961d3f93d725f1c71f67b9f1ef209114c75f7f",
|
|
503
|
+
Grant: "0x2cedad5cda259c921f3380eedd5920be86a7dfe9496848cc8afc7f01159dfd65",
|
|
504
|
+
GrantVerified: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
505
|
+
MemberOf: "0x2cfa4adacb1efcd0ff408d749fd12bb36cd5f88aa0822f633962d4bd5c8023aa",
|
|
506
|
+
MilestoneApproved: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
507
|
+
MilestoneCompleted: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
508
|
+
GrantUpdateStatus: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
509
|
+
Project: "0x7f0e4ac5f7cbe2a39af317b46bad7e86b053f76109c364d197447d9da34e821a",
|
|
510
|
+
ProjectUpdateStatus: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
511
|
+
ProjectMilestoneStatus: "0xe4b229d7051c27bb64cca0d29d92377143e6d5b9e076416e997c38d4cb40a399",
|
|
512
|
+
ContributorProfile: "0x281f0afbb0313c6ff851400c4ed317fe9741be75e7e20c337dfd403059523bea"
|
|
513
|
+
},
|
|
514
|
+
},
|
|
457
515
|
};
|
|
458
516
|
const DetailsSchema = [{ type: "string", name: "json", value: null }];
|
|
459
517
|
/**
|
package/core/types.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface AttestArgs<T = unknown> {
|
|
|
30
30
|
export type TSchemaName = "Community" | "CommunityDetails" | "Grant" | "GrantDetails" | "GrantVerified" | "MemberOf" | "MemberDetails" | "Milestone" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "ProjectDetails" | "Details" | "ProjectImpact" | "ProjectUpdate" | "ProjectUpdateStatus" | "ProjectPointer" | "GrantUpdate" | "GrantUpdateStatus" | "ProjectEndorsement" | "ProjectMilestone" | "ProjectMilestoneStatus" | "ContributorProfile";
|
|
31
31
|
export type TResolvedSchemaNames = "Community" | "Grant" | "GrantVerified" | "MemberOf" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "Details" | "ProjectUpdateStatus" | "GrantUpdateStatus" | "ProjectUpdateStatus" | "ProjectMilestoneStatus" | "ContributorProfile";
|
|
32
32
|
export type TExternalLink = "twitter" | "github" | "website" | "linkedin" | "discord" | "pitchDeck" | "demoVideo" | "farcaster" | "custom";
|
|
33
|
-
export type TNetwork = "optimism" | "celo" | "optimism-sepolia" | "arbitrum" | "sepolia" | "sei" | "sei-testnet" | "base-sepolia" | "lisk" | "scroll";
|
|
33
|
+
export type TNetwork = "optimism" | "celo" | "optimism-sepolia" | "arbitrum" | "sepolia" | "sei" | "sei-testnet" | "base-sepolia" | "lisk" | "scroll" | "base" | "polygon";
|
|
34
34
|
/**
|
|
35
35
|
* Generic GAP Facade interface.
|
|
36
36
|
* This supplies the GAP class with the necessary properties.
|