From edbe0734e3983b1188f2c2ebe67004de61991289 Mon Sep 17 00:00:00 2001 From: Sismobot <94460392+sismobot@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:33:13 +0200 Subject: [PATCH] [factory]: Adding new roci-nfcs-holders group --- group-generators/generators/index.ts | 2 + .../generators/roci-nfcs-holders/index.ts | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 group-generators/generators/roci-nfcs-holders/index.ts diff --git a/group-generators/generators/index.ts b/group-generators/generators/index.ts index fbeaa9a4e..184b36454 100644 --- a/group-generators/generators/index.ts +++ b/group-generators/generators/index.ts @@ -589,6 +589,7 @@ import riobel from "./riobel"; import roadtolife from "./roadtolife"; import roadtolife2 from "./roadtolife2"; import roboplex from "./roboplex"; +import rociNfcsHolders from "./roci-nfcs-holders"; import rocifiCreditScoreAddresses from "./rocifi-credit-score-addresses"; import rocketeersNftHolder from "./rocketeers-nft-holder"; import rocketlab from "./rocketlab"; @@ -1440,6 +1441,7 @@ export const groupGenerators: GroupGeneratorsLibrary = { "roadtolife": roadtolife, "roadtolife2": roadtolife2, "roboplex": roboplex, + "roci-nfcs-holders": rociNfcsHolders, "rocifi-credit-score-addresses": rocifiCreditScoreAddresses, "rocketeers-nft-holder": rocketeersNftHolder, "rocketlab": rocketlab, diff --git a/group-generators/generators/roci-nfcs-holders/index.ts b/group-generators/generators/roci-nfcs-holders/index.ts new file mode 100644 index 000000000..a6cb11488 --- /dev/null +++ b/group-generators/generators/roci-nfcs-holders/index.ts @@ -0,0 +1,39 @@ + +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.Daily, + + generate: async (context: GenerationContext): Promise => { + + const alchemyProvider = new dataProviders.AlchemyProvider(); + + const alchemyProviderData0 = await alchemyProvider.getOwnersForCollection({ + contractAddress: "0x839a06a50A087fe3b842DF1877Ef83A443E37FbE", + chain: "polygon-mainnet" + }); + + return [ + { + name: "roci-nfcs-holders", + timestamp: context.timestamp, + description: "Data Group of NFCS holders on Polygon (https://roci.fi/nfcs)", + specs: "Data Group of minters of RociFi NFCS token holders, non-fungible credit score", + data: alchemyProviderData0, + valueType: ValueType.Score, + tags: [Tags.Factory], + }, + ]; + }, +}; + +export default generator;