-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[factory]: Adding new pal-mainnet-holders group
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |