Skip to content

Commit

Permalink
[factory]: Adding new talent-protocol-demo group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Oct 8, 2023
1 parent 1ee960d commit 26585c0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions group-generators/generators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ import sysmotestbadge1 from "./sysmotestbadge1";
import t0xci from "./t0xci";
import talentLayerCommunity from "./talent-layer-community";
import talentOfTheMonthSolidityMarch2023 from "./talent-of-the-month-solidity-march-2023";
import talentProtocolDemo from "./talent-protocol-demo";
import talentProtocolTest from "./talent-protocol-test";
import talentlayer from "./talentlayer";
import talentofthemonthDesignMarch from "./talentofthemonth-design-march";
Expand Down Expand Up @@ -1592,6 +1593,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"t0xci": t0xci,
"talent-layer-community": talentLayerCommunity,
"talent-of-the-month-solidity-march-2023": talentOfTheMonthSolidityMarch2023,
"talent-protocol-demo": talentProtocolDemo,
"talent-protocol-test": talentProtocolTest,
"talentlayer": talentlayer,
"talentofthemonth-design-march": talentofthemonthDesignMarch,
Expand Down
38 changes: 38 additions & 0 deletions group-generators/generators/talent-protocol-demo/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

import { dataProviders } from "@group-generators/helpers/data-providers";
import { Tags, ValueType, GroupWithData } from "topics/group";
import {
GenerationContext,
GenerationFrequency,
GroupGenerator,
} from "topics/group-generator";

// Generated from factory.sismo.io

const generator: GroupGenerator = {

generationFrequency: GenerationFrequency.Once,

generate: async (context: GenerationContext): Promise<GroupWithData[]> => {

const restProvider = new dataProviders.RestProvider();

const restProviderData0 = await restProvider.getAccountsFromAPI({
url: "https://api.talentprotocol.com/api/v1/talents"
});

return [
{
name: "talent-protocol-demo",
timestamp: context.timestamp,
description: "Talent Protocol demo",
specs: "Talent Protocol demo very hardcore specifications",
data: restProviderData0,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;

0 comments on commit 26585c0

Please sign in to comment.