Skip to content

Commit

Permalink
[factory]: Adding new recurring-users group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Oct 17, 2023
1 parent 466c34b commit d0d5c0b
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 @@ -594,6 +594,7 @@ import raul from "./raul";
import raverz from "./raverz";
import raviZkBadgeOnSismo from "./ravi-zk-badge-on-sismo";
import rayS from "./ray-s";
import recurringUsers from "./recurring-users";
import regenesisNftHolders from "./regenesis-nft-holders";
import regenpunks from "./regenpunks";
import rektFamillyDegen from "./rekt-familly-degen";
Expand Down Expand Up @@ -1485,6 +1486,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"raverz": raverz,
"ravi-zk-badge-on-sismo": raviZkBadgeOnSismo,
"ray-s": rayS,
"recurring-users": recurringUsers,
"regenesis-nft-holders": regenesisNftHolders,
"regenpunks": regenpunks,
"rekt-familly-degen": rektFamillyDegen,
Expand Down
39 changes: 39 additions & 0 deletions group-generators/generators/recurring-users/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.Weekly,

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

const restProvider = new dataProviders.RestProvider();

const restProviderData0 = await restProvider.getAccountsFromAPI({
url: "https://front-git-feature-sismo-way2pay.vercel.app/api/sismo/recurring"
});

return [
{
name: "recurring-users",
timestamp: context.timestamp,
description: "People who have used the platform before",
specs: "Any Transaction with them as the buyer and transaction as executed
",
data: restProviderData0,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;

0 comments on commit d0d5c0b

Please sign in to comment.