Skip to content

Commit

Permalink
publish (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKurt authored Feb 26, 2024
1 parent ff5f470 commit fbb4f01
Show file tree
Hide file tree
Showing 9 changed files with 1,919 additions and 856 deletions.
1 change: 1 addition & 0 deletions dist/strategies/DirectGrants/DirectGrantsStrategy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ export declare class DirectGrantsStrategy {
getAllocationData(recipientId: `0x${string}`, status: Status, grantAmount: bigint): TransactionData;
getBatchAllocationData(allocations: Allocation[]): TransactionData;
getDistributeData(recipientIds: `0x${string}`[]): TransactionData;
getUpdatePoolTimestampsData(registrationStartTime: number, registrationEndTime: number): TransactionData;
}
19 changes: 17 additions & 2 deletions dist/strategies/DirectGrants/DirectGrantsStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ class DirectGrantsStrategy {
}
// Get the DirectGrants strategy InitializeData
getInitializeData(params) {
const encoded = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("bool, bool, bool"), [
const encoded = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("bool, bool, bool, uint128, uint128"), [
params.registryGating,
params.metadataRequired,
params.grantAmountRequired,
BigInt(params.registrationStartTime),
BigInt(params.registrationEndTime),
]);
return encoded;
}
getDeployParams() {
const constructorArgs = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("address, string"), [this.allo.address(), "DirectGrantsSimpleStrategy1.0"]);
const constructorArgs = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("address, string"), [this.allo.address(), "DirectGrantsSimpleStrategy1.1"]);
const constructorArgsNo0x = constructorArgs.slice(2);
return {
abi: directGrants_config_1.abi,
Expand Down Expand Up @@ -404,5 +406,18 @@ class DirectGrantsStrategy {
value: "0",
};
}
getUpdatePoolTimestampsData(registrationStartTime, registrationEndTime) {
this.checkStrategy();
const encodedData = (0, viem_1.encodeFunctionData)({
abi: directGrants_config_1.abi,
functionName: "updatePoolTimestamps",
args: [BigInt(registrationStartTime), BigInt(registrationEndTime)],
});
return {
to: this.strategy,
data: encodedData,
value: "0",
};
}
}
exports.DirectGrantsStrategy = DirectGrantsStrategy;
136 changes: 68 additions & 68 deletions dist/strategies/DirectGrants/directGrants.config.d.ts

Large diffs are not rendered by default.

Loading

0 comments on commit fbb4f01

Please sign in to comment.