Skip to content

Commit

Permalink
[factory]: Adding new pal-mainnet-holders group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Jul 26, 2023
1 parent a2134f7 commit 82cdee3
Show file tree
Hide file tree
Showing 2 changed files with 42 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 @@ -491,6 +491,7 @@ import oxbage from "./oxbage";
import padultra from "./padultra";
import paidCcprofileOwner from "./paid-ccprofile-owner";
import palHolders from "./pal-holders";
import palMainnetHolders from "./pal-mainnet-holders";
import paladinDelegates from "./paladin-delegates";
import panda from "./panda";
import parallelIdentityHolders from "./parallel-identity-holders";
Expand Down Expand Up @@ -1064,6 +1065,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"opensea-nft-minter": openseaNftMinter,
"orca": orca,
"pal-holders": palHolders,
"pal-mainnet-holders": palMainnetHolders,
"paladin-delegates": paladinDelegates,
"panda": panda,
"parallel-identity-holders": parallelIdentityHolders,
Expand Down
40 changes: 40 additions & 0 deletions group-generators/generators/pal-mainnet-holders/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

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.Weekly,

generate: async (context: GenerationContext): Promise<GroupWithData[]> => {

const tokenProvider = new dataProviders.TokenProvider();

const tokenProviderData0 = await tokenProvider.getERC20Holders({
contractAddress: "0xAB846Fb6C81370327e784Ae7CbB6d6a6af6Ff4BF",
tokenDecimals: 18,
network: "mainnet"
});

return [
{
name: "pal-mainnet-holders",
timestamp: context.timestamp,
description: "Data Group of holders of the PAL ERC20 token on mainnet.",
specs: "Data Group created with the Token Provider. The value for each address is the number of PAL tokens hold on mainnet.",
data: tokenProviderData0,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;

0 comments on commit 82cdee3

Please sign in to comment.