Skip to content

Commit

Permalink
[factory]: Adding new test-own-nft group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Sep 28, 2023
1 parent 7e027b8 commit b827ecf
Show file tree
Hide file tree
Showing 2 changed files with 41 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 @@ -727,6 +727,7 @@ import testLeo from "./test-leo";
import testLeo2 from "./test-leo-2";
import testLeo3 from "./test-leo-3";
import testNftHolder from "./test-nft-holder";
import testOwnNft from "./test-own-nft";
import testPoliticians from "./test-politicians";
import testUsdStablecoinsHolders from "./test-usd-stablecoins-holders";
import test01 from "./test01";
Expand Down Expand Up @@ -1589,6 +1590,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"test-leo-2": testLeo2,
"test-leo-3": testLeo3,
"test-nft-holder": testNftHolder,
"test-own-nft": testOwnNft,
"test-politicians": testPoliticians,
"test-usd-stablecoins-holders": testUsdStablecoinsHolders,
"test01": test01,
Expand Down
39 changes: 39 additions & 0 deletions group-generators/generators/test-own-nft/index.ts
Original file line number Diff line number Diff line change
@@ -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<GroupWithData[]> => {

const alchemyProvider = new dataProviders.AlchemyProvider();

const alchemyProviderData0 = await alchemyProvider.getOwnersForCollection({
contractAddress: "0x77002b317AfCA82f0E6B83A137f2a11a3Dbd23dD",
chain: "polygon-mumbai"
});

return [
{
name: "test-own-nft",
timestamp: context.timestamp,
description: "Test own NFT",
specs: "Test own NFT",
data: alchemyProviderData0,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;

0 comments on commit b827ecf

Please sign in to comment.