From 6a2676f815e3cd9ccb4d0891feaea5e2417f8f92 Mon Sep 17 00:00:00 2001 From: Sismobot <94460392+sismobot@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:28:47 +0200 Subject: [PATCH] [factory]: Adding new talent-protocol-test group (#2197) --- group-generators/generators/index.ts | 2 + .../generators/talent-protocol-test/index.ts | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 group-generators/generators/talent-protocol-test/index.ts diff --git a/group-generators/generators/index.ts b/group-generators/generators/index.ts index fd374596e..803b89e11 100644 --- a/group-generators/generators/index.ts +++ b/group-generators/generators/index.ts @@ -714,6 +714,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 talentProtocolTest from "./talent-protocol-test"; import talentlayer from "./talentlayer"; import talentofthemonthDesignMarch from "./talentofthemonth-design-march"; import tally from './tally'; @@ -1584,6 +1585,7 @@ export const groupGenerators: GroupGeneratorsLibrary = { "t0xci": t0xci, "talent-layer-community": talentLayerCommunity, "talent-of-the-month-solidity-march-2023": talentOfTheMonthSolidityMarch2023, + "talent-protocol-test": talentProtocolTest, "talentlayer": talentlayer, "talentofthemonth-design-march": talentofthemonthDesignMarch, "tally": tally, diff --git a/group-generators/generators/talent-protocol-test/index.ts b/group-generators/generators/talent-protocol-test/index.ts new file mode 100644 index 000000000..ecc3811d1 --- /dev/null +++ b/group-generators/generators/talent-protocol-test/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-test", + timestamp: context.timestamp, + description: "Talent Protocol Test", + specs: "Talent Protocol Test from https://api.talentprotocol.com/api/v1/talents", + data: restProviderData0, + valueType: ValueType.Score, + tags: [Tags.Factory], + }, + ]; + }, +}; + +export default generator;