Skip to content

Commit

Permalink
[factory]: Adding new usdc-eth-lpers group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Sep 27, 2023
1 parent 96164ca commit 86aa629
Show file tree
Hide file tree
Showing 2 changed files with 52 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 @@ -787,6 +787,7 @@ import unstoppableDomains from "./unstoppable-domains"
import unumdao from "./unumdao";
import usdStablecoinPerWallet from "./usd-stablecoin-per-wallet";
import usdTokenHolders from "./usd-token-holders";
import usdcEthLpers from "./usdc-eth-lpers";
import vaultIdTest from "./vaultid-test";
import vegan from "./vegan";
import veirenDonators from "./veiren-donators";
Expand Down Expand Up @@ -1648,6 +1649,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"unumdao": unumdao,
"usd-stablecoin-per-wallet": usdStablecoinPerWallet,
"usd-token-holders": usdTokenHolders,
"usdc-eth-lpers": usdcEthLpers,
"vault-id-test": vaultIdTest,
"vegan": vegan,
"veiren-donators": veirenDonators,
Expand Down
50 changes: 50 additions & 0 deletions group-generators/generators/usdc-eth-lpers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

import { dataOperators } from "@group-generators/helpers/data-operators";
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.Once,

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

const tokenProvider = new dataProviders.TokenProvider();

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

const jsonListData1 = {
"0x78a74b5D1A86704c573163C3aafB6e7234c9Da1e": "1",
"0xE3c382A8B72643CC3756D532e967Eb44e885c619": "1",
};

const dataUnion = dataOperators.Union([
tokenProviderData0,
jsonListData1
]);

return [
{
name: "usdc-eth-lpers",
timestamp: context.timestamp,
description: "Data Group of UniSwap V2 USDC/ETH LPers",
specs: "Hold 0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc ERC-20",
data: dataUnion,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;

0 comments on commit 86aa629

Please sign in to comment.