Skip to content

Commit

Permalink
updated configs and allocate
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKurt committed Feb 28, 2024
1 parent b174ed1 commit 0a6773c
Show file tree
Hide file tree
Showing 18 changed files with 171 additions and 52 deletions.
2 changes: 1 addition & 1 deletion dist/__live__/createSuperfluidpool.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const createPool = () => __awaiter(void 0, void 0, void 0, function* () {
const params = {
useRegistryAnchor: true,
metadataRequired: false,
passportDecoder: "0xE7eB5D2b5b188777df902e89c54570E7Ef4F59CE",
passportDecoder: "0xE7eB5D2b5b188777df902e89c54570E7Ef4F59CE", // todo: remove dummy address
superfluidHost: "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9",
allocationSuperToken: "0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00",
registrationStartTime: BigInt((startDate.getTime() / 1000 - 100).toFixed(0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export declare class DonationVotingMerkleDistributionStrategy {
getEncodedAllocation(data: Allocation): `0x${string}`;
/**
*
* @param allocation - Allocation: (address,(((address,uint256),uint256,uint256),bytes32))
* @param allocation - Allocation: (address,PermitType,(((address,uint256),uint256,uint256),bytes32))
* @returns TransactionData: {to: `0x${string}`, data: `0x${string}`, value: string}
*/
getAllocateData(allocation: Allocation): TransactionData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ class DonationVotingMerkleDistributionStrategy {
* @returns `0x${string}`
*/
getEncodedAllocation(data) {
const encoded = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("address, (((address, uint256), uint256, uint256), bytes32)"), [
const encoded = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("address, uint8, (((address, uint256), uint256, uint256), bytes32)"), [
data.recipientId,
data.permitType,
[
[
[
Expand All @@ -339,7 +340,7 @@ class DonationVotingMerkleDistributionStrategy {
}
/**
*
* @param allocation - Allocation: (address,(((address,uint256),uint256,uint256),bytes32))
* @param allocation - Allocation: (address,PermitType,(((address,uint256),uint256,uint256),bytes32))
* @returns TransactionData: {to: `0x${string}`, data: `0x${string}`, value: string}
*/
getAllocateData(allocation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ export declare const abi: ({
anonymous?: undefined;
} | {
inputs: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
Expand All @@ -103,6 +98,11 @@ export declare const abi: ({
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
name: string;
outputs: never[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ exports.abi = [
name: "NOT_ENOUGH_FUNDS",
type: "error",
},
{
inputs: [],
name: "NOT_IMPLEMENTED",
type: "error",
},
{
inputs: [],
name: "NOT_INITIALIZED",
Expand Down Expand Up @@ -150,6 +155,11 @@ exports.abi = [
name: "RECIPIENT_NOT_ACCEPTED",
type: "error",
},
{
inputs: [],
name: "REGISTRATION_ACTIVE",
type: "error",
},
{
inputs: [],
name: "REGISTRATION_NOT_ACTIVE",
Expand Down Expand Up @@ -349,18 +359,6 @@ exports.abi = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "allo",
type: "address",
},
{
indexed: false,
internalType: "bytes32",
name: "profileId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
Expand Down Expand Up @@ -1096,6 +1094,11 @@ exports.abi = [
name: "statuses",
type: "tuple[]",
},
{
internalType: "uint256",
name: "refRecipientsCounter",
type: "uint256",
},
],
name: "reviewRecipients",
outputs: [],
Expand All @@ -1121,6 +1124,25 @@ exports.abi = [
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "totalClaimableAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalPayoutAmount",
Expand Down Expand Up @@ -1208,9 +1230,9 @@ exports.abi = [
{
inputs: [
{
internalType: "uint256",
name: "_amount",
type: "uint256",
internalType: "address",
name: "_token",
type: "address",
},
],
name: "withdraw",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export type Permit2Data = {
permit: PermitTransferFrom;
signature: `0x${string}`;
};
export type PermitType = "Permit" | "Permit2" | "PermitDAI";
export declare enum PermitType {
Permit = 0,
PermitDAI = 1,
Permit2 = 2
}
export type Allocation = {
recipientId: `0x${string}`;
permitType: PermitType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StrategyType = void 0;
exports.StrategyType = exports.PermitType = void 0;
var PermitType;
(function (PermitType) {
PermitType[PermitType["Permit"] = 0] = "Permit";
PermitType[PermitType["PermitDAI"] = 1] = "PermitDAI";
PermitType[PermitType["Permit2"] = 2] = "Permit2";
})(PermitType || (exports.PermitType = PermitType = {}));
;
exports.StrategyType = {
Vault: "Vault",
Direct: "Direct",
Expand Down
2 changes: 1 addition & 1 deletion dist/strategies/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ var Status;
Status[Status["Appealed"] = 4] = "Appealed";
Status[Status["InReview"] = 5] = "InReview";
Status[Status["Canceled"] = 6] = "Canceled";
})(Status = exports.Status || (exports.Status = {}));
})(Status || (exports.Status = Status = {}));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@allo-team/allo-v2-sdk",
"version": "1.0.53",
"version": "1.0.54",
"description": "sdk for allo v2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,11 @@ export class DonationVotingMerkleDistributionStrategy {
public getEncodedAllocation(data: Allocation): `0x${string}` {
const encoded: `0x${string}` = encodeAbiParameters(
parseAbiParameters(
"address, (((address, uint256), uint256, uint256), bytes32)",
"address, uint8, (((address, uint256), uint256, uint256), bytes32)",
),
[
data.recipientId,
data.permitType,
[
[
[
Expand All @@ -409,7 +410,7 @@ export class DonationVotingMerkleDistributionStrategy {

/**
*
* @param allocation - Allocation: (address,(((address,uint256),uint256,uint256),bytes32))
* @param allocation - Allocation: (address,PermitType,(((address,uint256),uint256,uint256),bytes32))
* @returns TransactionData: {to: `0x${string}`, data: `0x${string}`, value: string}
*/
public getAllocateData(allocation: Allocation): TransactionData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ export const abi = [
name: "NOT_ENOUGH_FUNDS",
type: "error",
},
{
inputs: [],
name: "NOT_IMPLEMENTED",
type: "error",
},
{
inputs: [],
name: "NOT_INITIALIZED",
Expand Down Expand Up @@ -147,6 +152,11 @@ export const abi = [
name: "RECIPIENT_NOT_ACCEPTED",
type: "error",
},
{
inputs: [],
name: "REGISTRATION_ACTIVE",
type: "error",
},
{
inputs: [],
name: "REGISTRATION_NOT_ACTIVE",
Expand Down Expand Up @@ -346,18 +356,6 @@ export const abi = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "allo",
type: "address",
},
{
indexed: false,
internalType: "bytes32",
name: "profileId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
Expand Down Expand Up @@ -1096,6 +1094,11 @@ export const abi = [
name: "statuses",
type: "tuple[]",
},
{
internalType: "uint256",
name: "refRecipientsCounter",
type: "uint256",
},
],
name: "reviewRecipients",
outputs: [],
Expand All @@ -1121,6 +1124,25 @@ export const abi = [
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "totalClaimableAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalPayoutAmount",
Expand Down Expand Up @@ -1208,9 +1230,9 @@ export const abi = [
{
inputs: [
{
internalType: "uint256",
name: "_amount",
type: "uint256",
internalType: "address",
name: "_token",
type: "address",
},
],
name: "withdraw",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export type Permit2Data = {
signature: `0x${string}`;
};

export type PermitType = "Permit" | "Permit2" | "PermitDAI";
export enum PermitType {
Permit,
PermitDAI,
Permit2,
};

export type Allocation = {
recipientId: `0x${string}`;
Expand Down

0 comments on commit 0a6773c

Please sign in to comment.