Skip to content

Commit

Permalink
Merge pull request #30 from allo-protocol/DV-updates
Browse files Browse the repository at this point in the history
Donation voting merkle updates
  • Loading branch information
thelostone-mc authored Dec 20, 2023
2 parents 6896a31 + 7dfccd7 commit 13ea9cd
Show file tree
Hide file tree
Showing 38 changed files with 5,713 additions and 1,409 deletions.
36 changes: 16 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
module.exports = {
plugins: [
"@typescript-eslint/eslint-plugin",
"eslint-plugin-tsdoc"
],
extends: [
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaVersion: 2018,
sourceType: "module"
},
rules: {
"tsdoc/syntax": "warn",
"@typescript-eslint/no-explicit-any": "off",
}
};
module.exports = {
plugins: ["@typescript-eslint/eslint-plugin", "eslint-plugin-tsdoc"],
ignorePatterns: ["**/*ignore*/**"],
extends: ["plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaVersion: 2018,
sourceType: "module",
},
rules: {
"tsdoc/syntax": "warn",
"@typescript-eslint/no-explicit-any": "off",
},
};
Empty file added dist/__tests__/dummy.d.ts
Empty file.
6 changes: 6 additions & 0 deletions dist/__tests__/dummy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";
describe("dummy", () => {
it("should be true", () => {
expect(true).toBe(true);
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { ConstructorArgs, Metadata, TransactionData } from "../../Common/types";
import { ConstructorArgs, DeployParams, Metadata, TransactionData } from "../../Common/types";
import { PayoutSummary, Status } from "../types";
import { Recipient } from "./types";
import { Distribution, InitializeParamsDonationVoting, Permit2Data, Recipient, RegisterDataDonationVoting } from "./types";
export declare class DonationVotingMerkleDistributionStrategy {
private client;
private contract;
private strategy;
private poolId;
private allo;
constructor({ chain, rpc, address }: ConstructorArgs);
constructor({ chain, rpc, address, poolId }: ConstructorArgs);
setPoolId(poolId: number): Promise<void>;
setContract(address: `0x${string}`): void;
private checkPoolId;
private checkStrategy;
getInitializeData(params: InitializeParamsDonationVoting): Promise<`0x${string}`>;
getDeployParams(strategyType: string): DeployParams;
getNative(): Promise<string>;
getPermit2(): Promise<string>;
getAllocationEndTime(): Promise<number>;
getAllocationStartTime(): Promise<number>;
isAllowedTokens(token: string): Promise<boolean>;
getClaims(recipient: string, token: string): Promise<number>;
getIsAllowedToken(token: string): Promise<boolean>;
getClaim(recipient: string, token: string): Promise<number>;
getDistributionMetadata(): Promise<Metadata>;
getDistributionStarted(): Promise<boolean>;
getAllo(): Promise<string>;
Expand All @@ -23,25 +29,24 @@ export declare class DonationVotingMerkleDistributionStrategy {
getRecipient(recipientId: string): Promise<Recipient>;
getRecipientStatus(recipientId: string): Promise<Status>;
getStrategyId(): Promise<string>;
hasBeenDistributed(index: number): Promise<boolean>;
isDistributionSet(): Promise<boolean>;
isPoolActive(): Promise<boolean>;
isValidAllocator(allocator: `0x${string}`): Promise<boolean>;
getHasBeenDistributed(index: number): Promise<boolean>;
getIsDistributionSet(): Promise<boolean>;
getIsPoolActive(): Promise<boolean>;
getIsValidAllocator(allocator: `0x${string}`): Promise<boolean>;
getMerkleRoot(): Promise<string>;
metadataRequired(): Promise<boolean>;
recipientToStatusIndexes(recipient: string): Promise<number[]>;
recipientsCounter(): Promise<number>;
registrationEndTime(): Promise<number>;
registrationStartTime(): Promise<number>;
statusesBitMap(index: number): Promise<number>;
totalPayoutAmount(): Promise<number>;
getMetadataRequired(): Promise<boolean>;
getRecipientToStatusIndexes(recipient: string): Promise<number[]>;
getRecipientsCounter(): Promise<number>;
getRegistrationEndTime(): Promise<number>;
getRegistrationStartTime(): Promise<number>;
getStatusAtIndex(index: number): Promise<number>;
getTotalPayoutAmount(): Promise<number>;
useRegistryAnchor(): Promise<boolean>;
allocate(strategyData: string): TransactionData;
batchAllocate(strategyData: string[]): TransactionData;
registerRecipient(strategyData: string): TransactionData;
batchRegisterRecipient(strategyData: string[]): TransactionData;
fundPool(amount: number): TransactionData;
distribute(recipientIds: string[], data: string): TransactionData;
getAllocationData(data: Permit2Data, ethAmount?: bigint): TransactionData;
getBatchAllocationData(data: Permit2Data[], ethAmount?: bigint): TransactionData;
getRegisterRecipientData(data: RegisterDataDonationVoting): TransactionData;
getBatchRegisterRecipientData(data: RegisterDataDonationVoting[]): TransactionData;
distribute(data: Distribution[]): TransactionData;
claim(claims: {
recipientId: string;
token: string;
Expand Down
Loading

0 comments on commit 13ea9cd

Please sign in to comment.