Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[factory]: Add new test-own-nft group #2189

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[factory]: Adding new test-own-nft group
sismobot committed Sep 28, 2023
commit b827ecf106be6256e05bb663ea3b542006389735
2 changes: 2 additions & 0 deletions group-generators/generators/index.ts
Original file line number Diff line number Diff line change
@@ -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";
@@ -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,
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;