Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed May 27, 2024
1 parent f0f349a commit a9fc586
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 115 deletions.
8 changes: 4 additions & 4 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@lagunovsky/redux-react-router": "^2.2.0",
"@pinata/sdk": "^1.1.26",
"@playwright/test": "^1.41.1",
"@rainbow-me/rainbowkit": "^0.12.18",
"@rainbow-me/rainbowkit": "2.1.1",
"@redux-devtools/extension": "^3.2.3",
"@rsbuild/core": "^0.4.1",
"@rsbuild/plugin-react": "^0.3.11",
Expand All @@ -38,7 +38,7 @@
"@types/react-dom": "^18.0.1",
"@types/react-redux": "^7.1.24",
"@types/testing-library__jest-dom": "^5.14.5",
"@wagmi/core": "1.4.1",
"@wagmi/core": "2.10.4",
"@walletconnect/ethereum-provider": "^2.9.0",
"@walletconnect/modal": "^2.5.9",
"allo-indexer-client": "github:gitcoinco/allo-indexer-client",
Expand Down Expand Up @@ -81,8 +81,8 @@
"typescript": "^5.3.3",
"url": "^0.11.0",
"verify-env": "*",
"viem": "^2.5.0",
"wagmi": "1.4.1",
"viem": "^2.12.5",
"wagmi": "2.9.7",
"web-vitals": "^2.1.4",
"yup": "^0.32.11",
"zod": "^3.22.4"
Expand Down
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@ethersproject/providers": "^5.7.2",
"@gitcoinco/passport-sdk-types": "^0.2.0",
"@openzeppelin/merkle-tree": "^1.0.2",
"@rainbow-me/rainbowkit": "^0.12.16",
"@rainbow-me/rainbowkit": "2.1.1",
"@spruceid/didkit-wasm": "0.3.0-alpha0",
"@wagmi/chains": "^1.8.0",
"abitype": "^0.10.3",
Expand All @@ -40,8 +40,8 @@
"tailwind-styled-components": "^2.2.0",
"tiny-emitter": "^2.1.0",
"typescript": "latest",
"viem": "^2.5.0",
"wagmi": "1.4.1",
"viem": "^2.12.5",
"wagmi": "2.9.7",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
18 changes: 9 additions & 9 deletions packages/common/src/allo/backends/allo-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
RoundApplicationAnswers,
RoundCategory,
} from "data-layer";
import { Abi, Address, Hex, PublicClient, getAddress, zeroAddress } from "viem";
import { Abi, Address, Hex, PublicClient, encodeAbiParameters, getAddress, zeroAddress } from "viem";
import { AnyJson, ChainId } from "../..";
import { UpdateRoundParams, MatchingStatsData, VotingToken } from "../../types";
import { Allo, AlloError, AlloOperation, CreateRoundArguments } from "../allo";
Expand All @@ -46,7 +46,7 @@ import { PermitSignature, getPermitType } from "../voting";
import Erc20ABI from "../abis/erc20";
import { StandardMerkleTree } from "@openzeppelin/merkle-tree";
import { buildUpdatedRowsOfApplicationStatuses } from "../application";
import { BigNumber, utils } from "ethers";
import { utils } from "ethers";
import { Distribution } from "@allo-team/allo-v2-sdk/dist/strategies/DonationVotingMerkleDistributionStrategy/types";

function getStrategyAddress(strategy: RoundCategory, chainId: ChainId): string {
Expand Down Expand Up @@ -1306,7 +1306,7 @@ export class AlloV2 implements Allo {
if (!project.anchorAddress) {
throw new AlloError("Anchor address is required");
}
const distribution: [number, string, string, BigNumber] = [
const distribution: [number, string, string, bigint] = [
project.index,
project.anchorAddress,
project.projectPayoutAddress,
Expand Down Expand Up @@ -1484,7 +1484,7 @@ export class AlloV2 implements Allo {
}

export function serializeProject(project: ProjectWithMerkleProof) {
return utils.defaultAbiCoder.encode(
return encodeAbiParameters(
["uint256", "address", "uint256", "bytes32[]"],
[
project.index,
Expand All @@ -1497,13 +1497,13 @@ export function serializeProject(project: ProjectWithMerkleProof) {

export function serializeProjects(projects: ProjectWithMerkleProof[]): Hex {
const serializedProjects = projects.map(serializeProject);
return utils.defaultAbiCoder.encode(["bytes[]"], [serializedProjects]) as Hex;
return encodeAbiParameters(["bytes[]"], [serializedProjects]) as Hex;
}

export type ProjectWithMerkleProof = {
index: number;
recipientId: string;
amount: BigNumber;
amount: bigint;
merkleProof: string[];
};

Expand All @@ -1517,11 +1517,11 @@ export type ProjectWithMerkleProof = {
export const generateMerkleTreeV2 = (
matchingResults: MatchingStatsData[]
): {
distribution: [number, string, string, BigNumber][];
tree: StandardMerkleTree<[number, string, string, BigNumber]>;
distribution: [number, string, string, bigint][];
tree: StandardMerkleTree<[number, string, string, bigint]>;
matchingResults: MatchingStatsData[];
} => {
const distribution: [number, string, string, BigNumber][] = [];
const distribution: [number, string, string, bigint][] = [];

matchingResults.forEach((matchingResult, index) => {
matchingResults[index].index = index;
Expand Down
2 changes: 1 addition & 1 deletion packages/data-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"papaparse": "^5.4.1",
"ts-custom-error": "^3.3.1",
"ts-essentials": "^9.4.1",
"viem": "^2.5.0",
"viem": "^2.12.5",
"zod": "^3.22.2"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/grant-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@headlessui/react": "^1.7.4",
"@heroicons/react": "^2.0.13",
"@playwright/test": "^1.41.1",
"@rainbow-me/rainbowkit": "1.0.12",
"@rainbow-me/rainbowkit": "2.1.1",
"@rsbuild/core": "^0.4.1",
"@rsbuild/plugin-react": "^0.3.11",
"@rsbuild/plugin-svgr": "^0.3.11",
Expand All @@ -62,7 +62,7 @@
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.0.1",
"@testing-library/user-event": "^14.1.1",
"@wagmi/core": "1.4.1",
"@wagmi/core": "2.10.4",
"@walletconnect/modal": "^2.5.9",
"allo-indexer-client": "github:gitcoinco/allo-indexer-client",
"babel-loader": "^8.3.0",
Expand Down Expand Up @@ -110,8 +110,8 @@
"url": "^0.11.0",
"util": "^0.12.4",
"verify-env": "^1.0.0",
"viem": "^2.5.0",
"wagmi": "1.4.1",
"viem": "^2.12.5",
"wagmi": "2.9.7",
"web-vitals": "^2.1.0",
"zod": "^3.22.4",
"zustand": "^4.4.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/round-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@heroicons/react": "^1.0.6",
"@hookform/resolvers": "^2.9.2",
"@openzeppelin/merkle-tree": "^1.0.2",
"@rainbow-me/rainbowkit": "0.12.18",
"@rainbow-me/rainbowkit": "2.1.1",
"@reduxjs/toolkit": "^1.8.1",
"@sentry/integrations": "^7.28.0",
"@sentry/react": "^7.27.0",
Expand Down Expand Up @@ -95,8 +95,8 @@
"util": "^0.12.4",
"uuid": "^9.0.1",
"verify-env": "*",
"viem": "^2.5.0",
"wagmi": "1.4.1",
"viem": "^2.12.5",
"wagmi": "2.9.7",
"web-vitals": "^2.1.0",
"yup": "^0.32.11",
"zustand": "^4.4.0"
Expand Down
Loading

0 comments on commit a9fc586

Please sign in to comment.