From 9353106738e8d643d130f8e0cc905e35a71d3e9b Mon Sep 17 00:00:00 2001 From: yu-zhen Date: Tue, 24 Sep 2024 01:16:47 +0900 Subject: [PATCH] feat: collect metadata from console and upload --- packages/coordinator/.env.example | 4 + packages/coordinator/package.json | 5 +- .../scripts/uploadRoundMetadata.ts | 164 ++++++++++++++++++ packages/subgraph/.gitignore | 2 +- packages/subgraph/config/network.example.json | 7 + packages/subgraph/config/network.json | 8 +- packages/subgraph/package.json | 2 +- packages/subgraph/schemas/schema.v1.graphql | 3 + packages/subgraph/src/poll.ts | 4 + .../subgraph/templates/subgraph.template.yaml | 2 + pnpm-lock.yaml | 125 ++++++++----- 11 files changed, 271 insertions(+), 55 deletions(-) create mode 100644 packages/coordinator/scripts/uploadRoundMetadata.ts create mode 100644 packages/subgraph/config/network.example.json diff --git a/packages/coordinator/.env.example b/packages/coordinator/.env.example index 027629d7..17f50eb1 100644 --- a/packages/coordinator/.env.example +++ b/packages/coordinator/.env.example @@ -53,3 +53,7 @@ TEST_PRIVATE_KEY="" # An RPC API KEY to interact with live networks (used in e2e tests) RPC_API_KEY="" + +# Storage for metadata +# Create a Blob database and get token here: https://vercel.com/dashboard/stores?type=blob +BLOB_READ_WRITE_TOKEN= diff --git a/packages/coordinator/package.json b/packages/coordinator/package.json index d6f12bfc..1227161d 100644 --- a/packages/coordinator/package.json +++ b/packages/coordinator/package.json @@ -25,7 +25,8 @@ "types": "tsc -p tsconfig.json --noEmit", "generate-keypair": "pnpm run run:node ./scripts/generateKeypair.ts", "download-zkeys:test": "pnpm run run:node ./scripts/downloadZKeys.ts test ./zkeys", - "download-zkeys:prod": "pnpm run run:node ./scripts/downloadZKeys.ts prod ./zkeys" + "download-zkeys:prod": "pnpm run run:node ./scripts/downloadZKeys.ts prod ./zkeys", + "upload-round-metadata": "pnpm run run:node ./scripts/uploadRoundMetadata.ts" }, "dependencies": { "@graphprotocol/graph-cli": "^0.79.0", @@ -38,6 +39,7 @@ "@nestjs/websockets": "^10.3.10", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@vercel/blob": "^0.19.0", "@zerodev/ecdsa-validator": "^5.3.1", "@zerodev/permissions": "^5.4.3", "@zerodev/sdk": "^5.3.8", @@ -54,6 +56,7 @@ "maci-contracts": "^2.3.0", "maci-domainobjs": "^2.0.0", "maci-subgraph": "^2.3.0", + "date-fns": "^4.1.0", "mustache": "^4.2.0", "permissionless": ">=0.1.18 <=0.1.29", "reflect-metadata": "^0.2.0", diff --git a/packages/coordinator/scripts/uploadRoundMetadata.ts b/packages/coordinator/scripts/uploadRoundMetadata.ts new file mode 100644 index 00000000..14d56464 --- /dev/null +++ b/packages/coordinator/scripts/uploadRoundMetadata.ts @@ -0,0 +1,164 @@ +import { put } from "@vercel/blob"; +import { parse, isValid } from "date-fns"; +import { enGB } from "date-fns/locale"; +import dotenv from "dotenv"; + +import path from "path"; +import * as readline from "readline"; + +export interface RoundMetadata { + roundId: string; + description: string; + startsAt: Date; + registrationEndsAt: Date; + votingStartsAt: Date; + votingEndsAt: Date; +} + +interface IUploadMetadataProps { + data: RoundMetadata; + name: string; +} + +dotenv.config({ path: path.resolve(import.meta.dirname, "../.env") }); + +function isValidDate(formattedDateStr: string) { + const splitDate = formattedDateStr.split("-"); + const parsed = parse(`${splitDate[2]}/${splitDate[1]}/${splitDate[0]}`, "P", new Date(), { locale: enGB }); + return isValid(parsed); +} + +export async function uploadRoundMetadata({ data, name }: IUploadMetadataProps): Promise { + const blob = await put(name, JSON.stringify(data), { + access: "public", + token: process.env.BLOB_READ_WRITE_TOKEN, + }); + + return blob.url; +} + +export async function collectMetadata(): Promise { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + }); + + const askRoundId = () => + new Promise((resolve) => { + rl.question("How would you name your round? ", (answer) => { + // eslint-disable-next-line no-console + console.log(`Your roundId is: ${answer}`); + resolve(answer); + }); + }); + + const askDescription = () => + new Promise((resolve) => { + rl.question("Could you briefly introduce this round? ", (answer) => { + // eslint-disable-next-line no-console + console.log(`Your round description is: ${answer}`); + resolve(answer); + }); + }); + + const askStartTime = () => + new Promise((resolve, reject) => { + rl.question("When would you like to start this round? (Please respond in the format yyyy-mm-dd) ", (answer) => { + const valid = isValidDate(answer); + + if (!valid) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors + reject(new Error("Please answer in valid format.")); + } + + // eslint-disable-next-line no-console + console.log("You would like to start this round at:", answer); + resolve(new Date(answer)); + }); + }); + + const askRegistrationEndTime = () => + new Promise((resolve, reject) => { + rl.question( + "When would you like to end the registration for applications? (Please respond in the format yyyy-mm-dd) ", + (answer) => { + const valid = isValidDate(answer); + + if (!valid) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors + reject(new Error("Please answer in valid format.")); + } + + // eslint-disable-next-line no-console + console.log(`Your application registration end date for this round is: ${answer}`); + resolve(new Date(answer)); + }, + ); + }); + + const askVotingStartTime = () => + new Promise((resolve, reject) => { + rl.question( + "When would you like to start the voting for this round? (Please respond in the format yyyy-mm-dd) ", + (answer) => { + const valid = isValidDate(answer); + + if (!valid) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors + reject(new Error("Please answer in valid format.")); + } + + // eslint-disable-next-line no-console + console.log(`Your voting start date for this round is: ${answer}`); + resolve(new Date(answer)); + }, + ); + }); + + const askVotingEndTime = () => + new Promise((resolve, reject) => { + rl.question( + "When would you like to end the voting for this round? (Please respond in the format yyyy-mm-dd) ", + (answer) => { + const valid = isValidDate(answer); + + if (!valid) { + // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors + reject(new Error("Please answer in valid format.")); + } + + // eslint-disable-next-line no-console + console.log(`Your voting end date for this round is: ${answer}`); + resolve(new Date(answer)); + }, + ); + }); + + const roundId = await askRoundId(); + const description = await askDescription(); + const startsAt = await askStartTime(); + const registrationEndsAt = await askRegistrationEndTime(); + const votingStartsAt = await askVotingStartTime(); + const votingEndsAt = await askVotingEndTime(); + + rl.close(); + + return { + roundId, + description, + startsAt, + registrationEndsAt, + votingStartsAt, + votingEndsAt, + }; +} + +async function main(): Promise { + const metadata = await collectMetadata(); + const url = await uploadRoundMetadata({ data: metadata, name: `${metadata.roundId}.json` }); + + // eslint-disable-next-line no-console + console.log("The url of uploaded metadata is:", url); +} + +main(); diff --git a/packages/subgraph/.gitignore b/packages/subgraph/.gitignore index 477b9b79..ebace9a7 100644 --- a/packages/subgraph/.gitignore +++ b/packages/subgraph/.gitignore @@ -4,6 +4,6 @@ build generated subgraph.yaml schema.graphql +config/network.json tests/.bin/ tests/.latest.json - diff --git a/packages/subgraph/config/network.example.json b/packages/subgraph/config/network.example.json new file mode 100644 index 00000000..3b588300 --- /dev/null +++ b/packages/subgraph/config/network.example.json @@ -0,0 +1,7 @@ +{ + "network": "optimism-sepolia", + "maciContractAddress": "0xac4d16D0541ca7255579b501A2F1D6F3a436521E", + "registryManagerContractAddress": "0xed5875D05DebcDdDbd902f471447dA97c6d26d7E", + "registryManagerContractStartBlock": 17396799, + "maciContractStartBlock": 17396799 +} diff --git a/packages/subgraph/config/network.json b/packages/subgraph/config/network.json index 3b588300..03bd8e89 100644 --- a/packages/subgraph/config/network.json +++ b/packages/subgraph/config/network.json @@ -1,7 +1,7 @@ { "network": "optimism-sepolia", - "maciContractAddress": "0xac4d16D0541ca7255579b501A2F1D6F3a436521E", - "registryManagerContractAddress": "0xed5875D05DebcDdDbd902f471447dA97c6d26d7E", - "registryManagerContractStartBlock": 17396799, - "maciContractStartBlock": 17396799 + "maciContractAddress": "0xd2A6F62d4d12Fa3552298E8C22F2a08FF0c9771e", + "registryManagerContractAddress": "0xa9C6e12E3F35Cf6F33D3a541f223aa4F70191383", + "registryManagerContractStartBlock": 18071448, + "maciContractStartBlock": 18071444 } diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 8b82d41a..503588d0 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -17,7 +17,7 @@ "generate:schema": "cp ./schemas/schema.${VERSION:-v1}.graphql schema.graphql", "prebuild": "pnpm codegen", "build": "graph build", - "deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ maci-subgraph", + "deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ maci", "create-local": "graph create --node http://localhost:8020/ maci-subgraph", "remove-local": "graph remove --node http://localhost:8020/ maci-subgraph", "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 maci-subgraph --network localhost", diff --git a/packages/subgraph/schemas/schema.v1.graphql b/packages/subgraph/schemas/schema.v1.graphql index f474836e..dc7ee6eb 100644 --- a/packages/subgraph/schemas/schema.v1.graphql +++ b/packages/subgraph/schemas/schema.v1.graphql @@ -44,6 +44,7 @@ type Request @entity { requestType: RequestType! index: BigInt status: Status! + "relations" recipient: Recipient! registryManager: RegistryManager! @@ -62,12 +63,14 @@ type Recipient @entity { index: BigInt! deleted: Boolean! initialized: Boolean! + "relations" registry: Registry! } type Registry @entity { id: Bytes! # address + metadataUrl: String "relations" poll: Poll recipients: [Recipient!]! @derivedFrom(field: "registry") diff --git a/packages/subgraph/src/poll.ts b/packages/subgraph/src/poll.ts index cd6be511..92d506bb 100644 --- a/packages/subgraph/src/poll.ts +++ b/packages/subgraph/src/poll.ts @@ -9,6 +9,7 @@ import { PublishMessage as PublishMessageEvent, SetRegistry as SetRegistryEvent, } from "../generated/templates/Poll/Poll"; +import { Registry as RegistryContract } from "../generated/templates/Registry/Registry"; import { ONE_BIG_INT } from "./utils/constants"; import { createOrLoadRegistry } from "./utils/entity"; @@ -75,8 +76,11 @@ export function handleSetRegistry(event: SetRegistryEvent): void { return; } + const contract = RegistryContract.bind(event.params.registry); + const registry = createOrLoadRegistry(event.params.registry); registry.poll = poll.id; + registry.metadataUrl = contract.getRegistryMetadataUrl(); registry.save(); poll.registry = event.params.registry; diff --git a/packages/subgraph/templates/subgraph.template.yaml b/packages/subgraph/templates/subgraph.template.yaml index d533a3e4..7315a41a 100644 --- a/packages/subgraph/templates/subgraph.template.yaml +++ b/packages/subgraph/templates/subgraph.template.yaml @@ -73,6 +73,8 @@ templates: abis: - name: Poll file: ./node_modules/maci-platform-contracts/build/artifacts/contracts/maci/Poll.sol/Poll.json + - name: Registry + file: ./node_modules/maci-platform-contracts/build/artifacts/contracts/registry/BaseRegistry.sol/BaseRegistry.json eventHandlers: - event: MergeMaciState(indexed uint256,indexed uint256) handler: handleMergeMaciState diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57f5f457..7ff3112a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -192,6 +192,9 @@ importers: '@nomicfoundation/hardhat-toolbox': specifier: ^5.0.0 version: 5.0.0(hke34ef7km4fdyz52h5gry5opq) + '@vercel/blob': + specifier: ^0.19.0 + version: 0.19.0 '@zerodev/ecdsa-validator': specifier: ^5.3.1 version: 5.3.1(@zerodev/sdk@5.3.9(permissionless@0.1.29(viem@2.19.1(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4)))(viem@2.19.1(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4)))(permissionless@0.1.29(viem@2.19.1(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4)))(viem@2.19.1(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4)) @@ -210,6 +213,9 @@ importers: class-validator: specifier: ^0.14.1 version: 0.14.1 + date-fns: + specifier: ^4.1.0 + version: 4.1.0 dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -402,7 +408,7 @@ importers: version: 0.316.0(react@18.2.0) maci-cli: specifier: ^2.4.0 - version: 2.4.0(3cqgokiuvxx4ajhx37zjyqxqrq) + version: 2.4.0(ajppvhbj75go4cdbr4h4vhruha) maci-domainobjs: specifier: ^2.4.0 version: 2.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -538,7 +544,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + version: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0) eslint-plugin-import: specifier: ^2.30.0 version: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) @@ -6317,6 +6323,9 @@ packages: date-fns@3.6.0: resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + dateformat@3.0.3: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} @@ -16558,9 +16567,9 @@ snapshots: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - '@nomicfoundation/hardhat-chai-matchers@2.0.7(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-chai-matchers@2.0.7(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) '@types/chai-as-promised': 7.1.8 chai: 4.5.0 chai-as-promised: 7.1.2(chai@4.5.0) @@ -16591,15 +16600,6 @@ snapshots: hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) ordinal: 1.0.3 - '@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': - dependencies: - debug: 4.3.6(supports-color@8.1.1) - ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) - lodash.isequal: 4.5.0 - transitivePeerDependencies: - - supports-color - '@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': dependencies: debug: 4.3.6(supports-color@8.1.1) @@ -16618,9 +16618,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@nomicfoundation/hardhat-ignition-ethers@0.15.5(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-ignition-ethers@0.15.5(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-ignition': 0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@nomicfoundation/ignition-core': 0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -16702,6 +16702,27 @@ snapshots: ethereumjs-util: 7.1.5 hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + '@nomicfoundation/hardhat-toolbox@5.0.0(4lzaewf5vhmhgkr3zdkxldxwse)': + dependencies: + '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-ignition-ethers': 0.15.5(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-verify': 2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@typechain/ethers-v6': 0.5.1(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) + '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)) + '@types/chai': 4.3.17 + '@types/mocha': 10.0.7 + '@types/node': 20.14.14 + chai: 4.5.0 + ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + solidity-coverage: 0.8.12(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + ts-node: 10.9.2(@types/node@20.14.14)(typescript@5.5.4) + typechain: 8.3.2(typescript@5.5.4) + typescript: 5.5.4 + '@nomicfoundation/hardhat-toolbox@5.0.0(6zbd34p7xszhw7fs5zk33ckexe)': dependencies: '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) @@ -16744,27 +16765,6 @@ snapshots: typechain: 8.3.2(typescript@5.5.4) typescript: 5.5.4 - '@nomicfoundation/hardhat-toolbox@5.0.0(wq4v7k5ocgbchgotiijfxhcogu)': - dependencies: - '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-ignition-ethers': 0.15.5(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/ignition-core@0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-verify': 2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@typechain/ethers-v6': 0.5.1(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) - '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)) - '@types/chai': 4.3.17 - '@types/mocha': 10.0.7 - '@types/node': 20.14.14 - chai: 4.5.0 - ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) - hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) - solidity-coverage: 0.8.12(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - ts-node: 10.9.2(@types/node@20.14.14)(typescript@5.5.4) - typechain: 8.3.2(typescript@5.5.4) - typescript: 5.5.4 - '@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 @@ -22008,6 +22008,8 @@ snapshots: date-fns@3.6.0: {} + date-fns@4.1.0: {} + dateformat@3.0.3: {} dayjs@1.11.12: {} @@ -22771,7 +22773,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) @@ -22794,12 +22796,29 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0): dependencies: debug: 4.3.6(supports-color@8.1.1) enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.6 + is-core-module: 2.15.0 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0): + dependencies: + debug: 4.3.6(supports-color@8.1.1) + enhanced-resolve: 5.17.1 + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 @@ -22835,7 +22854,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -22850,14 +22869,24 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7(supports-color@8.1.1) optionalDependencies: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + + eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-import@2.30.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -26678,16 +26707,16 @@ snapshots: - typescript - utf-8-validate - maci-cli@2.4.0(3cqgokiuvxx4ajhx37zjyqxqrq): + maci-cli@2.4.0(ajppvhbj75go4cdbr4h4vhruha): dependencies: '@commander-js/extra-typings': 12.1.0(commander@12.1.0) - '@nomicfoundation/hardhat-toolbox': 5.0.0(wq4v7k5ocgbchgotiijfxhcogu) + '@nomicfoundation/hardhat-toolbox': 5.0.0(4lzaewf5vhmhgkr3zdkxldxwse) commander: 12.1.0 dotenv: 16.4.5 ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) maci-circuits: 2.4.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-contracts: 2.4.0(fiyhxdrnyqwclxh26nwcfabgem) + maci-contracts: 2.4.0(tnqgnvgpfdbm2nfzhwjuiounlm) maci-core: 2.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-crypto: 2.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-domainobjs: 2.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -26789,10 +26818,10 @@ snapshots: - typescript - utf-8-validate - maci-contracts@2.4.0(fiyhxdrnyqwclxh26nwcfabgem): + maci-contracts@2.4.0(tnqgnvgpfdbm2nfzhwjuiounlm): dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.7(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-toolbox': 5.0.0(wq4v7k5ocgbchgotiijfxhcogu) + '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-toolbox': 5.0.0(4lzaewf5vhmhgkr3zdkxldxwse) '@openzeppelin/contracts': 5.0.2 '@openzeppelin/merkle-tree': 1.0.7 circomlibjs: 0.1.7(bufferutil@4.0.8)(utf-8-validate@5.0.10)