From 26585c0bc4a580081b0d379628717c6639c3af87 Mon Sep 17 00:00:00 2001 From: Sismobot <94460392+sismobot@users.noreply.github.com> Date: Sun, 8 Oct 2023 12:00:40 +0200 Subject: [PATCH] [factory]: Adding new talent-protocol-demo group --- group-generators/generators/index.ts | 2 + .../generators/talent-protocol-demo/index.ts | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 group-generators/generators/talent-protocol-demo/index.ts diff --git a/group-generators/generators/index.ts b/group-generators/generators/index.ts index 359675a07..deaf0165d 100644 --- a/group-generators/generators/index.ts +++ b/group-generators/generators/index.ts @@ -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"; @@ -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, diff --git a/group-generators/generators/talent-protocol-demo/index.ts b/group-generators/generators/talent-protocol-demo/index.ts new file mode 100644 index 000000000..862cbb22b --- /dev/null +++ b/group-generators/generators/talent-protocol-demo/index.ts @@ -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 => { + + 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;