From a04b41aec73c4e7b6e62b2194169e77b0aa8989c Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:22:32 +0100 Subject: [PATCH] feat: add deployer service --- packages/coordinator/package.json | 12 +- .../ts/common/accountAbstraction.ts | 92 +++ packages/coordinator/ts/common/errors.ts | 17 + packages/coordinator/ts/common/networks.ts | 110 +-- .../__tests__/deployer.controller.test.ts | 16 + .../__tests__/deployer.service.test.ts | 59 ++ .../ts/deployer/__tests__/utils.ts | 31 + .../ts/deployer/deployer.controller.ts | 59 ++ .../ts/deployer/deployer.module.ts | 15 + .../ts/deployer/deployer.service.ts | 757 ++++++++++++++++++ packages/coordinator/ts/deployer/dto.ts | 94 +++ packages/coordinator/ts/deployer/types.ts | 249 ++++++ packages/coordinator/ts/file/file.service.ts | 2 +- .../ts/sessionKeys/sessionKeys.module.ts | 1 + .../ts/sessionKeys/sessionKeys.service.ts | 20 +- pnpm-lock.yaml | 405 +++++++--- 16 files changed, 1747 insertions(+), 192 deletions(-) create mode 100644 packages/coordinator/ts/deployer/__tests__/deployer.controller.test.ts create mode 100644 packages/coordinator/ts/deployer/__tests__/deployer.service.test.ts create mode 100644 packages/coordinator/ts/deployer/__tests__/utils.ts create mode 100644 packages/coordinator/ts/deployer/deployer.controller.ts create mode 100644 packages/coordinator/ts/deployer/deployer.module.ts create mode 100644 packages/coordinator/ts/deployer/deployer.service.ts create mode 100644 packages/coordinator/ts/deployer/dto.ts create mode 100644 packages/coordinator/ts/deployer/types.ts diff --git a/packages/coordinator/package.json b/packages/coordinator/package.json index a4b4c6c8..b30645cd 100644 --- a/packages/coordinator/package.json +++ b/packages/coordinator/package.json @@ -45,14 +45,14 @@ "class-validator": "^0.14.1", "dotenv": "^16.4.5", "ethers": "^6.13.1", - "hardhat": "^2.22.6", + "hardhat": "^2.22.9", "helmet": "^7.1.0", "lowdb": "^1.0.0", - "maci-circuits": "^2.1.0", - "maci-cli": "^2.1.0", - "maci-contracts": "^2.1.0", - "maci-domainobjs": "^2.0.0", - "maci-subgraph": "^2.1.0", + "maci-circuits": "^2.2.0", + "maci-cli": "^2.2.0", + "maci-contracts": "^2.2.1", + "maci-domainobjs": "^2.2.0", + "maci-subgraph": "^2.2.0", "mustache": "^4.2.0", "permissionless": "^0.1.44", "reflect-metadata": "^0.2.0", diff --git a/packages/coordinator/ts/common/accountAbstraction.ts b/packages/coordinator/ts/common/accountAbstraction.ts index 95472676..981ec969 100644 --- a/packages/coordinator/ts/common/accountAbstraction.ts +++ b/packages/coordinator/ts/common/accountAbstraction.ts @@ -1,3 +1,22 @@ +import { + createPublicClient, + http, + type HttpTransport, + type TransactionReceipt, + type Transport, + type Hex, + type PublicClient, + Chain, +} from "viem"; +import { toECDSASigner } from "@zerodev/permissions/signers"; +import { privateKeyToAccount } from "viem/accounts"; +import { deserializePermissionAccount } from "@zerodev/permissions"; +import { ENTRYPOINT_ADDRESS_V07 } from "permissionless"; +import { KERNEL_V3_1 } from "@zerodev/sdk/constants"; +import { createKernelAccountClient, KernelAccountClient, KernelSmartAccount } from "@zerodev/sdk"; +import { ENTRYPOINT_ADDRESS_V07_TYPE } from "permissionless/types"; +import { ESupportedNetworks, viemChain } from "./networks"; + /** * Generate the RPCUrl for Pimlico based on the chain we need to interact with * @param network - the network we want to interact with @@ -12,3 +31,76 @@ export const genPimlicoRPCUrl = (network: string): string => { return `https://api.pimlico.io/v2/${network}/rpc?apikey=${pimlicoAPIKey}`; }; + +/** + * Get a public client + * @param rpcUrl - the RPC URL + * @returns the public client + */ +export const getPublicClient = (rpcUrl: string, chainName: ESupportedNetworks): PublicClient => { + return createPublicClient({ + transport: http(rpcUrl), + chain: viemChain(chainName), + }); +}; + +/** + * Get a Kernel account handle given a session key + * @param sessionKey + * @param chainId + */ +export const getKernelClient = async ( + sessionKey: Hex, + approval: string, + chain: ESupportedNetworks, +): Promise< + KernelAccountClient< + ENTRYPOINT_ADDRESS_V07_TYPE, + Transport, + Chain, + KernelSmartAccount + > +> => { + const bundlerUrl = genPimlicoRPCUrl(chain); + const publicClient = getPublicClient(bundlerUrl, chain); + + // Using a stored private key + const sessionKeySigner = toECDSASigner({ + signer: privateKeyToAccount(sessionKey), + }); + + const sessionKeyAccount = await deserializePermissionAccount( + publicClient, + ENTRYPOINT_ADDRESS_V07, + KERNEL_V3_1, + approval, + sessionKeySigner, + ); + + const kernelClient = createKernelAccountClient({ + bundlerTransport: http(bundlerUrl), + entryPoint: ENTRYPOINT_ADDRESS_V07, + account: sessionKeyAccount, + chain: viemChain(chain), + }); + + return kernelClient; +}; + +/** + * The topic for the contract creation event + */ +export const contractCreationEventTopic = "0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511"; + +/** + * Get the address of the newly deployed contract from a transaction receipt + * @param receipt - The transaction receipt + * @returns The address of the newly deployed contract + */ +export const getDeployedContractAddress = (receipt: TransactionReceipt): string | undefined => { + const addr = receipt.logs.find((log) => log.topics[0] === contractCreationEventTopic); + + const deployedAddress = addr ? "0x" + addr.topics[1]?.slice(26) : undefined; + + return deployedAddress; +}; diff --git a/packages/coordinator/ts/common/errors.ts b/packages/coordinator/ts/common/errors.ts index 953000cb..dd9bb0d0 100644 --- a/packages/coordinator/ts/common/errors.ts +++ b/packages/coordinator/ts/common/errors.ts @@ -11,4 +11,21 @@ export enum ErrorCodes { FILE_NOT_FOUND = "6", SUBGRAPH_DEPLOY = "7", SESSION_KEY_NOT_FOUND = "8", + UNSUPPORTED_VOICE_CREDIT_PROXY = "9", + UNSUPPORTED_GATEKEEPER = "10", + FAILED_TO_DEPLOY_GATEKEEPER = "11", + FAILED_TO_DEPLOY_VOICE_CREDIT_PROXY = "12", + FAILED_TO_DEPLOY_VERIFIER = "13", + FAILED_TO_DEPLOY_POSEIDON_T3 = "14", + FAILED_TO_DEPLOY_POSEIDON_T4 = "15", + FAILED_TO_DEPLOY_POSEIDON_T5 = "16", + FAILED_TO_DEPLOY_POSEIDON_T6 = "17", + FAILED_TO_DEPLOY_POLL_FACTORY = "18", + FAILED_TO_DEPLOY_POLL = "19", + FAILED_TO_DEPLOY_TALLY_FACTORY = "20", + FAILED_TO_DEPLOY_MESSAGE_PROCESSOR_FACTORY = "21", + FAILED_TO_DEPLOY_MACI = "22", + FAILED_TO_DEPLOY_VK_REGISTRY = "23", + FAILED_TO_SET_MACI_INSTANCE_ON_GATEKEEPER = "24", + FAILED_TO_GET_NEXT_POLL_ID = "25", } diff --git a/packages/coordinator/ts/common/networks.ts b/packages/coordinator/ts/common/networks.ts index a74e922e..65d77512 100644 --- a/packages/coordinator/ts/common/networks.ts +++ b/packages/coordinator/ts/common/networks.ts @@ -1,3 +1,23 @@ +import { + arbitrum, + arbitrumSepolia, + base, + baseSepolia, + bsc, + type Chain, + gnosis, + holesky, + linea, + lineaSepolia, + mainnet, + optimism, + optimismSepolia, + polygon, + scroll, + scrollSepolia, + sepolia, +} from "viem/chains"; + export enum ESupportedNetworks { ETHEREUM = "mainnet", OPTIMISM = "optimism", @@ -5,60 +25,60 @@ export enum ESupportedNetworks { BSC = "bsc", BSC_CHAPEL = "chapel", GNOSIS_CHAIN = "gnosis", - FUSE = "fuse", POLYGON = "matic", - FANTOM_OPERA = "fantom", - ZKSYNC_ERA_TESTNET = "zksync-era-testnet", - BOBA = "boba", - MOONBEAM = "moonbeam", - MOONRIVER = "moonriver", - MOONBASE_ALPHA = "mbase", - FANTOM_TESTNET = "fantom-testnet", ARBITRUM_ONE = "arbitrum-one", - CELO = "celo", - AVALANCHE_FUJI = "fuji", - AVALANCHE = "avalanche", - CELO_ALFAJORES = "celo-alfajores", HOLESKY = "holesky", - AURORA = "aurora", - AURORA_TESTNET = "aurora-testnet", - HARMONY = "harmony", LINEA_SEPOLIA = "linea-sepolia", - GNOSIS_CHIADO = "gnosis-chiado", - MODE_SEPOLIA = "mode-sepolia", - MODE = "mode-mainnet", BASE_SEPOLIA = "base-sepolia", - ZKSYNC_ERA_SEPOLIA = "zksync-era-sepolia", - POLYGON_ZKEVM = "polygon-zkevm", - ZKSYNC_ERA = "zksync-era", ETHEREUM_SEPOLIA = "sepolia", ARBITRUM_SEPOLIA = "arbitrum-sepolia", LINEA = "linea", BASE = "base", SCROLL_SEPOLIA = "scroll-sepolia", SCROLL = "scroll", - BLAST_MAINNET = "blast-mainnet", - ASTAR_ZKEVM_MAINNET = "astar-zkevm-mainnet", - SEI_TESTNET = "sei-testnet", - BLAST_TESTNET = "blast-testnet", - ETHERLINK_TESTNET = "etherlink-testnet", - XLAYER_SEPOLIA = "xlayer-sepolia", - XLAYER_MAINNET = "xlayer-mainnet", - POLYGON_AMOY = "polygon-amoy", - ZKYOTO_TESTNET = "zkyoto-testnet", - POLYGON_ZKEVM_CARDONA = "polygon-zkevm-cardona", - SEI_MAINNET = "sei-mainnet", - ROOTSTOCK_MAINNET = "rootstock", - IOTEX_MAINNET = "iotex", - NEAR_MAINNET = "near-mainnet", - NEAR_TESTNET = "near-testnet", - COSMOS = "cosmoshub-4", - COSMOS_HUB = "theta-testnet-001", - OSMOSIS = "osmosis-1", - OSMO_TESTNET = "osmo-test-4", - ARWEAVE = "arweave-mainnet", - BITCOIN = "btc", - SOLANA = "solana-mainnet-beta", - INJECTIVE_MAINNET = "injective-mainnet", - INJECTIVE_TESTNET = "injective-testnet", } + +/** + * Get the Viem chain for a given network + * + * @param network - the network to get the chain for + * @returns the Viem chain + */ +export const viemChain = (network: ESupportedNetworks): Chain => { + switch (network) { + case ESupportedNetworks.ETHEREUM: + return mainnet; + case ESupportedNetworks.ETHEREUM_SEPOLIA: + return sepolia; + case ESupportedNetworks.ARBITRUM_ONE: + return arbitrum; + case ESupportedNetworks.ARBITRUM_SEPOLIA: + return arbitrumSepolia; + case ESupportedNetworks.BASE_SEPOLIA: + return baseSepolia; + case ESupportedNetworks.LINEA_SEPOLIA: + return lineaSepolia; + case ESupportedNetworks.SCROLL_SEPOLIA: + return scrollSepolia; + case ESupportedNetworks.SCROLL: + return scroll; + case ESupportedNetworks.BASE: + return base; + case ESupportedNetworks.HOLESKY: + return holesky; + case ESupportedNetworks.LINEA: + return linea; + case ESupportedNetworks.BSC: + return bsc; + case ESupportedNetworks.GNOSIS_CHAIN: + return gnosis; + case ESupportedNetworks.POLYGON: + return polygon; + case ESupportedNetworks.OPTIMISM: + return optimism; + case ESupportedNetworks.OPTIMISM_SEPOLIA: + return optimismSepolia; + default: + throw new Error(`Unsupported network: ${network}`); + } +}; diff --git a/packages/coordinator/ts/deployer/__tests__/deployer.controller.test.ts b/packages/coordinator/ts/deployer/__tests__/deployer.controller.test.ts new file mode 100644 index 00000000..5beef323 --- /dev/null +++ b/packages/coordinator/ts/deployer/__tests__/deployer.controller.test.ts @@ -0,0 +1,16 @@ +describe("SessionKeysController", () => { + beforeEach(async () => {}); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe("v1/deploy/maci", () => { + test("should deploy all contract", async () => {}); + test("should only deploy the contracts that are not deployed", async () => {}); + }); + + describe("v1/deploy/poll", () => { + test("should deploy a new poll", () => {}); + }); +}); diff --git a/packages/coordinator/ts/deployer/__tests__/deployer.service.test.ts b/packages/coordinator/ts/deployer/__tests__/deployer.service.test.ts new file mode 100644 index 00000000..f1f66dd5 --- /dev/null +++ b/packages/coordinator/ts/deployer/__tests__/deployer.service.test.ts @@ -0,0 +1,59 @@ +import dotenv from "dotenv"; +import { ErrorCodes, ESupportedNetworks } from "../../common"; +import { DeployerService } from "../deployer.service"; +import { FileService } from "../../file/file.service"; +import { testMaciDeploymentConfig } from "./utils"; +import { SessionKeysService } from "../../sessionKeys/sessionKeys.service"; +import { CryptoService } from "../../crypto/crypto.service"; + +dotenv.config(); + +describe("DeployerService", () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + const chain = ESupportedNetworks.OPTIMISM_SEPOLIA; + + const fileService = new FileService(); + const deployerService = new DeployerService(fileService); + + const sessionKeyService = new SessionKeysService(new CryptoService(), fileService); + + let approval: string; + let sessionKeyAddress: string; + + before(() => { + sessionKeyAddress = sessionKeyService.generateSessionKey().sessionKeyAddress; + sessionKeyAddress = sessionKeyService.generateSessionKey().sessionKeyAddress; + }); + + describe("deployMaci", () => { + test("should throw when passing a non existent session key address", async () => { + await expect( + deployerService.deployMaci({ + config: testMaciDeploymentConfig, + chain, + approval: "", + sessionKeyAddress: "0x", + }), + ).rejects.toThrow(ErrorCodes.SESSION_KEY_NOT_FOUND); + }); + + // test("should deploy maci contracts", async () => { + // const maciAddress = await deployerService.deployMaci({ + // config: testMaciDeploymentConfig, + // chain, + // approval: "", + // sessionKeyAddress: "0x" + // }) + // }); + }); + + describe("deployPoll", () => { + test("should throw when passing a non existent maci address", async () => {}); + test("should deploy a poll", () => {}); + }); + + test("should deploy a poll", () => {}); +}); diff --git a/packages/coordinator/ts/deployer/__tests__/utils.ts b/packages/coordinator/ts/deployer/__tests__/utils.ts new file mode 100644 index 00000000..b93f69f7 --- /dev/null +++ b/packages/coordinator/ts/deployer/__tests__/utils.ts @@ -0,0 +1,31 @@ +import { EGatekeepers, EInitialVoiceCreditProxies } from "maci-contracts"; +import { IDeployMaciConfig } from "../types"; + +/** + * MACI deployment configuration + */ +export const testMaciDeploymentConfig: IDeployMaciConfig = { + gatekeeper: { + type: EGatekeepers.FreeForAll, + args: [], + }, + initialVoiceCreditsProxy: { + type: EInitialVoiceCreditProxies.Constant, + args: { + amount: 100, + }, + }, + MACI: { + gatekeeper: EGatekeepers.FreeForAll, + stateTreeDepth: 10, + }, + VkRegistry: { + args: { + stateTreeDepth: 10, + messageTreeDepth: 2, + voteOptionTreeDepth: 2, + messageBatchDepth: 1, + intStateTreeDepth: 1, + }, + }, +}; diff --git a/packages/coordinator/ts/deployer/deployer.controller.ts b/packages/coordinator/ts/deployer/deployer.controller.ts new file mode 100644 index 00000000..19d0db76 --- /dev/null +++ b/packages/coordinator/ts/deployer/deployer.controller.ts @@ -0,0 +1,59 @@ +/* eslint-disable @typescript-eslint/no-shadow */ +import { Body, Controller, HttpException, HttpStatus, Logger, Post, UseGuards } from "@nestjs/common"; +import { ApiBearerAuth, ApiResponse, ApiTags } from "@nestjs/swagger"; + +import { AccountSignatureGuard } from "../auth/AccountSignatureGuard.service"; +import { DeployerService } from "./deployer.service"; +import { DeployerServiceDeployMaciDto, DeployerServiceDeployPollDto } from "./dto"; + +@ApiTags("v1/deploy") +@ApiBearerAuth() +@Controller("v1/deploy") +@UseGuards(AccountSignatureGuard) +export class DeployerController { + /** + * Logger + */ + private readonly logger = new Logger(DeployerController.name); + + /** + * Initialize DeployerController + * + * @param deployerService - deployer service + */ + constructor(private readonly deployerService: DeployerService) {} + + /** + * Deploy MACI contracts api method + * + * @param args - deploy maci dto + * @returns maci contract address + */ + @ApiResponse({ status: HttpStatus.CREATED, description: "The MACI contracts were successfully deployed" }) + @ApiResponse({ status: HttpStatus.FORBIDDEN, description: "Forbidden" }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: "BadRequest" }) + @Post("maci") + async deployMACIContracts(@Body() args: DeployerServiceDeployMaciDto): Promise { + return this.deployerService.deployMaci(args).catch((error) => { + this.logger.error(`Error:`, error); + throw new HttpException(error.message, HttpStatus.BAD_REQUEST); + }); + } + + /** + * Delete a session key api method + * + * @param args - delete session key dto + * @returns deleted session key address + */ + @ApiResponse({ status: HttpStatus.CREATED, description: "The Poll was successfully deployed" }) + @ApiResponse({ status: HttpStatus.FORBIDDEN, description: "Forbidden" }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: "BadRequest" }) + @Post("poll") + async deployPoll(@Body() args: DeployerServiceDeployPollDto): Promise { + return this.deployerService.deployPoll(args).catch((error) => { + this.logger.error(`Error:`, error); + throw new HttpException(error.message, HttpStatus.BAD_REQUEST); + }); + } +} diff --git a/packages/coordinator/ts/deployer/deployer.module.ts b/packages/coordinator/ts/deployer/deployer.module.ts new file mode 100644 index 00000000..95f95ce8 --- /dev/null +++ b/packages/coordinator/ts/deployer/deployer.module.ts @@ -0,0 +1,15 @@ +import { Module } from "@nestjs/common"; + +import { CryptoModule } from "../crypto/crypto.module"; +import { FileModule } from "../file/file.module"; +import { SessionKeysModule } from "../sessionKeys/sessionKeys.module"; + +import { DeployerController } from "./deployer.controller"; +import { DeployerService } from "./deployer.service"; + +@Module({ + imports: [FileModule, CryptoModule, SessionKeysModule], + controllers: [DeployerController], + providers: [DeployerService], +}) +export class DeployerModule {} diff --git a/packages/coordinator/ts/deployer/deployer.service.ts b/packages/coordinator/ts/deployer/deployer.service.ts new file mode 100644 index 00000000..754f37fe --- /dev/null +++ b/packages/coordinator/ts/deployer/deployer.service.ts @@ -0,0 +1,757 @@ +import { Injectable, Logger } from "@nestjs/common"; +import { + AccQueueQuinaryMaci__factory as AccQueueQuinaryMaciFactory, + ConstantInitialVoiceCreditProxy__factory as ConstantInitialVoiceCreditProxyFactory, + ContractStorage, + EGatekeepers, + FreeForAllGatekeeper__factory as FreeForAllGatekeeperFactory, + EASGatekeeper__factory as EASGatekeeperFactory, + ZupassGatekeeper__factory as ZupassGatekeeperFactory, + HatsGatekeeperSingle__factory as HatsGatekeeperSingleFactory, + SemaphoreGatekeeper__factory as SemaphoreGatekeeperFactory, + GitcoinPassportGatekeeper__factory as GitcoinPassportGatekeeperFactory, + Verifier__factory as VerifierFactory, + PoseidonT3__factory as PoseidonT3Factory, + PoseidonT4__factory as PoseidonT4Factory, + PoseidonT5__factory as PoseidonT5Factory, + PoseidonT6__factory as PoseidonT6Factory, + VkRegistry__factory as VkRegistryFactory, + TallyFactory__factory as TallyFactoryFactory, + PollFactory__factory as PollFactoryFactory, + MessageProcessorFactory__factory as MessageProcessorFactoryFactory, + MessageProcessor__factory as MessageProcessorFactory, + Tally__factory as TallyFactory, + Poll__factory as PollFactory, + MACI__factory as MACIFactory, + EContracts, + EInitialVoiceCreditProxies, + genEmptyBallotRoots, + EMode, +} from "maci-contracts"; + +import path from "path"; + +import { FileService } from "../file/file.service"; + +import { IDeployMaciArgs, IDeployPollArgs, IGatekeeperArgs } from "./types"; +import { getDeployedContractAddress, getKernelClient, getPublicClient } from "../common/accountAbstraction"; +import { ErrorCodes } from "../common"; +import { + Abi, + Chain, + encodeFunctionData, + HttpTransport, + PublicClient, + Transport, + type Hex, + keccak256, + toBytes, +} from "viem"; +import { BaseContract, InterfaceAbi } from "ethers"; +import { KernelAccountClient, KernelSmartAccount } from "@zerodev/sdk"; +import { ENTRYPOINT_ADDRESS_V07_TYPE } from "permissionless/types"; +import { SessionKeysService } from "../sessionKeys/sessionKeys.service"; +import { CryptoService } from "../crypto/crypto.service"; +import { PubKey } from "maci-domainobjs"; + +/** + * DeployerService is responsible for deploying contracts. + */ +@Injectable() +export class DeployerService { + /** + * Logger + */ + private readonly logger = new Logger(DeployerService.name); + + /** + * Contract storage instance + */ + private readonly storage: ContractStorage; + + /** + * Session keys service + */ + private readonly sessionKeysService: SessionKeysService; + + /** + * Create a new instance of DeployerService + * + * @param fileService - file service + */ + constructor(private readonly fileService: FileService) { + this.fileService = fileService; + this.logger = new Logger(DeployerService.name); + this.sessionKeysService = new SessionKeysService(new CryptoService(), this.fileService); + this.storage = ContractStorage.getInstance(path.join(__dirname, "..", "..", "deployed-contracts.json")); + } + + /** + * Get the gatekeeper abi and bytecode based on the gatekeeper type + * + * @param gatekeeperType - the gatekeeper type + * @returns - the gatekeeper abi and bytecode + */ + private getGatekeeperAbiAndBytecode(gatekeeperType: EGatekeepers): { abi: Abi; bytecode: Hex } { + // based on the gatekeeper type, we need to deploy the correct gatekeeper + switch (gatekeeperType) { + case EGatekeepers.FreeForAll: + return { + abi: FreeForAllGatekeeperFactory.abi, + bytecode: FreeForAllGatekeeperFactory.bytecode, + }; + case EGatekeepers.EAS: + return { + abi: EASGatekeeperFactory.abi, + bytecode: EASGatekeeperFactory.bytecode, + }; + case EGatekeepers.Zupass: + return { + abi: ZupassGatekeeperFactory.abi, + bytecode: ZupassGatekeeperFactory.bytecode, + }; + case EGatekeepers.HatsSingle: + return { + abi: HatsGatekeeperSingleFactory.abi, + bytecode: HatsGatekeeperSingleFactory.bytecode, + }; + case EGatekeepers.Semaphore: + return { + abi: SemaphoreGatekeeperFactory.abi, + bytecode: SemaphoreGatekeeperFactory.bytecode, + }; + case EGatekeepers.GitcoinPassport: + return { + abi: GitcoinPassportGatekeeperFactory.abi, + bytecode: GitcoinPassportGatekeeperFactory.bytecode, + }; + default: + throw new Error(ErrorCodes.UNSUPPORTED_GATEKEEPER); + } + } + + /** + * Get the voice credit proxy abi and bytecode based on the voice credit proxy type + * + * @param voiceCreditProxyType - the voice credit proxy type + * @returns - the voice credit proxy abi and bytecode + */ + private getVoiceCreditProxyAbiAndBytecode(voiceCreditProxyType: EInitialVoiceCreditProxies): { + abi: Abi; + bytecode: Hex; + } { + switch (voiceCreditProxyType) { + case EInitialVoiceCreditProxies.Constant: + return { + abi: ConstantInitialVoiceCreditProxyFactory.abi, + bytecode: ConstantInitialVoiceCreditProxyFactory.bytecode, + }; + default: + throw new Error(ErrorCodes.UNSUPPORTED_VOICE_CREDIT_PROXY); + } + } + + /** + * Flatten an object into an array of strings + * + * @param obj - the object to flatten + * @returns - the flattened array + */ + private flattenObject(obj: Record): string[] { + return Object.values(obj).flatMap((value) => + typeof value === "object" && value !== null ? this.flattenObject(value) : String(value), + ); + } + + /** + * Check if the gatekeeper is already deployed based on the name and the args + * + * @param gatekeeperType - the gatekeeper type + * @param args - the gatekeeper args + * @returns - true if the gatekeeper is already deployed, false otherwise + */ + private checkIfAlreadyDeployed(gatekeeperType: EContracts, args: IGatekeeperArgs, network: string): boolean { + const storedArgs = this.storage.getContractArgs(gatekeeperType, network); + if (storedArgs) { + const flattenedArgs = this.flattenObject(args); + return ( + storedArgs.length === flattenedArgs.length && + storedArgs.every((storedArg, index) => storedArg === flattenedArgs[index]) + ); + } + + return false; + } + + /** + * Add linked libraries to the bytecode + * + * @param bytecode - the bytecode + * @param libraries - the libraries + * @returns - the bytecode with the linked libraries + */ + private addLinkedLibariesToBytecode(bytecode: Hex, libraries: Record): Hex { + let linkedBytecode = bytecode; + + for (const [libName, libAddress] of Object.entries(libraries)) { + const placeholder = `__$${keccak256(toBytes(libName)).slice(2, 36)}$__`; + const regex = new RegExp(placeholder, "g"); + linkedBytecode = linkedBytecode.replace(regex, libAddress.slice(2)) as Hex; + } + + return linkedBytecode; + } + + /** + * Deploy a contract and get the address + * @param kernelClient - the kernel client + * @param abi - the abi + * @param bytecode - the bytecode + * @param args - the args + * @param publicClient - the public client + * @returns - the address + */ + private async deployAndGetAddress( + kernelClient: KernelAccountClient< + ENTRYPOINT_ADDRESS_V07_TYPE, + Transport, + Chain, + KernelSmartAccount + >, + abi: Abi, + bytecode: Hex, + args: any[], + publicClient: PublicClient, + ): Promise { + const deployTx = await kernelClient.deployContract({ + abi, + args: args, + bytecode, + account: kernelClient.account.address, + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: deployTx, + }); + + const address = getDeployedContractAddress(receipt); + + return address; + } + + /** + * Deploy MACI contracts + * + * @param args - deploy maci arguments + * @param options - ws hooks + * @returns - deployed maci contract + * @returns the address of the deployed maci contract + */ + async deployMaci({ approval, sessionKeyAddress, chain, config }: IDeployMaciArgs): Promise { + const publicClient = getPublicClient(process.env.COORDINATOR_RPC_URL!, chain); + + // const kernelClient = await getKernelClient(sessionKey, approval, chain); + const kernelClient = await this.sessionKeysService.generateClientFromSessionKey(sessionKeyAddress, approval, chain); + + let initialVoiceCreditProxyAddress = this.storage.getAddress( + config.initialVoiceCreditsProxy.type as unknown as EContracts, + chain, + ); + + // if the initial voice credit proxy is not already deployed, we need to deploy it + if ( + !this.checkIfAlreadyDeployed( + config.initialVoiceCreditsProxy.type as unknown as EContracts, + config.initialVoiceCreditsProxy.args, + chain, + ) + ) { + const voiceCreditProxyAbiAndBytecode = this.getVoiceCreditProxyAbiAndBytecode( + config.initialVoiceCreditsProxy.type, + ); + + initialVoiceCreditProxyAddress = await this.deployAndGetAddress( + kernelClient, + voiceCreditProxyAbiAndBytecode.abi, + voiceCreditProxyAbiAndBytecode.bytecode, + Object.values(config.initialVoiceCreditsProxy.args), + publicClient, + ); + + if (!initialVoiceCreditProxyAddress) { + this.logger.error(`Failed to deploy voice credit proxy: ${config.initialVoiceCreditsProxy.type}`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_VOICE_CREDIT_PROXY); + } + + await this.storage.register({ + id: config.initialVoiceCreditsProxy.type as unknown as EContracts, + contract: new BaseContract( + initialVoiceCreditProxyAddress, + voiceCreditProxyAbiAndBytecode.abi as unknown as InterfaceAbi, + ), + args: Object.values(config.initialVoiceCreditsProxy.args), + network: chain, + }); + } + + let gatekeeperAddress = this.storage.getAddress(config.gatekeeper.type as unknown as EContracts, chain); + const gatekeeperAbiAndBytecode = this.getGatekeeperAbiAndBytecode(config.gatekeeper.type); + + // if the gatekeeper is not already deployed, we need to deploy it + if (!this.checkIfAlreadyDeployed(config.gatekeeper.type as unknown as EContracts, config.gatekeeper.args, chain)) { + gatekeeperAddress = await this.deployAndGetAddress( + kernelClient, + gatekeeperAbiAndBytecode.abi, + gatekeeperAbiAndBytecode.bytecode, + Object.values(config.gatekeeper.args), + publicClient, + ); + + // if the gatekeeper address is not found, we need to throw an error + if (!gatekeeperAddress) { + this.logger.error(`Failed to deploy gatekeeper: ${config.gatekeeper.type}`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_GATEKEEPER); + } + + // store the gatekeeper address in the storage + await this.storage.register({ + id: config.gatekeeper.type as unknown as EContracts, + contract: new BaseContract(gatekeeperAddress, gatekeeperAbiAndBytecode.abi as InterfaceAbi), + args: Object.values(config.gatekeeper.args), + network: chain, + }); + } + + // deploy all maci contracts + + // 1. verifier + let verifierAddress = this.storage.getAddress(EContracts.Verifier, chain); + + if (!verifierAddress) { + verifierAddress = await this.deployAndGetAddress( + kernelClient, + VerifierFactory.abi, + VerifierFactory.bytecode, + [], + publicClient, + ); + + if (!verifierAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_VERIFIER); + } + + await this.storage.register({ + id: EContracts.Verifier, + contract: new BaseContract(verifierAddress, VerifierFactory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + // 2. poseidon + let poseidonT3Address = this.storage.getAddress(EContracts.PoseidonT3, chain); + + if (!poseidonT3Address) { + poseidonT3Address = await this.deployAndGetAddress( + kernelClient, + PoseidonT3Factory.abi, + PoseidonT3Factory.bytecode, + [], + publicClient, + ); + + if (!poseidonT3Address) { + this.logger.error(`Failed to deploy poseidon t3`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POSEIDON_T3); + } + + await this.storage.register({ + id: EContracts.PoseidonT3, + contract: new BaseContract(poseidonT3Address, PoseidonT3Factory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + let poseidonT4Address = this.storage.getAddress(EContracts.PoseidonT4, chain); + + if (!poseidonT4Address) { + poseidonT4Address = await this.deployAndGetAddress( + kernelClient, + PoseidonT4Factory.abi, + PoseidonT4Factory.bytecode, + [], + publicClient, + ); + + if (!poseidonT4Address) { + this.logger.error(`Failed to deploy poseidon t4`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POSEIDON_T4); + } + + await this.storage.register({ + id: EContracts.PoseidonT4, + contract: new BaseContract(poseidonT4Address, PoseidonT4Factory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + let poseidonT5Address = this.storage.getAddress(EContracts.PoseidonT5, chain); + + if (!poseidonT5Address) { + poseidonT5Address = await this.deployAndGetAddress( + kernelClient, + PoseidonT5Factory.abi, + PoseidonT5Factory.bytecode, + [], + publicClient, + ); + + if (!poseidonT5Address) { + this.logger.error(`Failed to deploy poseidon t5`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POSEIDON_T5); + } + + await this.storage.register({ + id: EContracts.PoseidonT5, + contract: new BaseContract(poseidonT5Address, PoseidonT5Factory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + let poseidonT6Address = this.storage.getAddress(EContracts.PoseidonT6, chain); + + if (!poseidonT6Address) { + poseidonT6Address = await this.deployAndGetAddress( + kernelClient, + PoseidonT6Factory.abi, + PoseidonT6Factory.bytecode, + [], + publicClient, + ); + + if (!poseidonT6Address) { + this.logger.error(`Failed to deploy poseidon t6`); + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POSEIDON_T6); + } + + await this.storage.register({ + id: EContracts.PoseidonT6, + contract: new BaseContract(poseidonT6Address, PoseidonT6Factory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + // 2. factories + let pollFactoryAddress = this.storage.getAddress(EContracts.PollFactory, chain); + + if (!pollFactoryAddress) { + pollFactoryAddress = await this.deployAndGetAddress( + kernelClient, + PollFactoryFactory.abi, + this.addLinkedLibariesToBytecode(PollFactoryFactory.bytecode, { + PoseidonT3: poseidonT3Address, + PoseidonT4: poseidonT4Address, + PoseidonT5: poseidonT5Address, + PoseidonT6: poseidonT6Address, + }), + [], + publicClient, + ); + + if (!pollFactoryAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POLL_FACTORY); + } + + await this.storage.register({ + id: EContracts.PollFactory, + contract: new BaseContract(pollFactoryAddress, PollFactoryFactory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + let tallyFactoryAddress = this.storage.getAddress(EContracts.TallyFactory, chain); + + if (!tallyFactoryAddress) { + tallyFactoryAddress = await this.deployAndGetAddress( + kernelClient, + TallyFactoryFactory.abi, + this.addLinkedLibariesToBytecode(TallyFactoryFactory.bytecode, { + PoseidonT3: poseidonT3Address, + PoseidonT4: poseidonT4Address, + PoseidonT5: poseidonT5Address, + PoseidonT6: poseidonT6Address, + }), + [], + publicClient, + ); + + if (!tallyFactoryAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_TALLY_FACTORY); + } + + await this.storage.register({ + id: EContracts.TallyFactory, + contract: new BaseContract(tallyFactoryAddress, TallyFactoryFactory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + let messageProcessorFactoryAddress = this.storage.getAddress(EContracts.MessageProcessorFactory, chain); + + if (!messageProcessorFactoryAddress) { + messageProcessorFactoryAddress = await this.deployAndGetAddress( + kernelClient, + MessageProcessorFactoryFactory.abi, + this.addLinkedLibariesToBytecode(MessageProcessorFactoryFactory.bytecode, { + PoseidonT3: poseidonT3Address, + PoseidonT4: poseidonT4Address, + PoseidonT5: poseidonT5Address, + PoseidonT6: poseidonT6Address, + }), + [], + publicClient, + ); + + if (!messageProcessorFactoryAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_MESSAGE_PROCESSOR_FACTORY); + } + + await this.storage.register({ + id: EContracts.MessageProcessorFactory, + contract: new BaseContract( + messageProcessorFactoryAddress, + MessageProcessorFactoryFactory.abi as unknown as InterfaceAbi, + ), + args: [], + network: chain, + }); + } + + // 3. VkRegistry + let vkRegistryAddress = this.storage.getAddress(EContracts.VkRegistry, chain); + + if (!vkRegistryAddress) { + vkRegistryAddress = await this.deployAndGetAddress( + kernelClient, + VkRegistryFactory.abi, + VkRegistryFactory.bytecode, + [], + publicClient, + ); + + if (!vkRegistryAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_VK_REGISTRY); + } + + await this.storage.register({ + id: EContracts.VkRegistry, + contract: new BaseContract(vkRegistryAddress, VkRegistryFactory.abi as unknown as InterfaceAbi), + args: [], + network: chain, + }); + } + + // 3. maci (here we don't check whether one is already deployed, we just deploy it) + const emptyBallotRoots = genEmptyBallotRoots(config.MACI.stateTreeDepth); + const maciAddress = await this.deployAndGetAddress( + kernelClient, + MACIFactory.abi, + this.addLinkedLibariesToBytecode(MACIFactory.bytecode, { + PoseidonT3: poseidonT3Address, + PoseidonT4: poseidonT4Address, + PoseidonT5: poseidonT5Address, + PoseidonT6: poseidonT6Address, + }), + [ + pollFactoryAddress, + messageProcessorFactoryAddress, + tallyFactoryAddress, + gatekeeperAddress, + initialVoiceCreditProxyAddress, + config.MACI.stateTreeDepth, + emptyBallotRoots, + ], + publicClient, + ); + + if (!maciAddress) { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_MACI); + } + + await this.storage.register({ + id: EContracts.MACI, + contract: new BaseContract(maciAddress, MACIFactory.abi as unknown as InterfaceAbi), + args: [ + pollFactoryAddress, + messageProcessorFactoryAddress, + tallyFactoryAddress, + gatekeeperAddress, + initialVoiceCreditProxyAddress, + config.MACI.stateTreeDepth, + emptyBallotRoots.map((root) => root.toString()), + ], + network: chain, + }); + + // set the gate on the gatekeeper + const userOpHash = await kernelClient.sendUserOperation({ + userOperation: { + callData: await kernelClient.account.encodeCallData({ + to: gatekeeperAddress! as Hex, + value: 0n, + data: encodeFunctionData({ + abi: gatekeeperAbiAndBytecode.abi, + functionName: "setMaciInstance", + args: [maciAddress], + }), + }), + }, + account: kernelClient.account as any, + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: userOpHash, + }); + + if (receipt.status !== "success") { + throw new Error(ErrorCodes.FAILED_TO_SET_MACI_INSTANCE_ON_GATEKEEPER); + } + + return maciAddress; + } + + /** + * Deploy a poll + * + * @param args - deploy poll dto + * @returns poll id + */ + async deployPoll({ approval, sessionKeyAddress, chain, config }: IDeployPollArgs): Promise { + const kernelClient = await this.sessionKeysService.generateClientFromSessionKey(sessionKeyAddress, approval, chain); + + const publicClient = getPublicClient(process.env.COORDINATOR_RPC_URL!, chain); + + const maciAddress = this.storage.mustGetAddress(EContracts.MACI, chain); + const verifierAddress = this.storage.mustGetAddress(EContracts.Verifier, chain); + const vkRegistryAddress = this.storage.mustGetAddress(EContracts.VkRegistry, chain); + const mode = config.useQuadraticVoting ? EMode.QV : EMode.NON_QV; + + const pollId = await publicClient.readContract({ + address: maciAddress as Hex, + abi: MACIFactory.abi, + functionName: "nextPollId", + }); + + if (!pollId) { + throw new Error(ErrorCodes.FAILED_TO_GET_NEXT_POLL_ID); + } + + const userOpHash = await kernelClient.sendUserOperation({ + userOperation: { + callData: await kernelClient.account.encodeCallData({ + to: maciAddress! as Hex, + value: 0n, + data: encodeFunctionData({ + abi: MACIFactory.abi, + functionName: "deployPoll", + args: [ + BigInt(config.pollDuration), + { + intStateTreeDepth: config.intStateTreeDepth, + messageTreeSubDepth: config.messageTreeSubDepth, + messageTreeDepth: config.messageTreeDepth, + voteOptionTreeDepth: config.voteOptionTreeDepth, + }, + PubKey.deserialize(config.coordinatorPubkey).asContractParam() as { x: bigint; y: bigint }, + verifierAddress as Hex, + vkRegistryAddress as Hex, + mode, + ], + }), + }), + }, + account: kernelClient.account as any, + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: userOpHash, + }); + + if (receipt.status !== "success") { + throw new Error(ErrorCodes.FAILED_TO_DEPLOY_POLL); + } + + // get the addresses so we can store this information + const pollAddresses = await publicClient.readContract({ + address: maciAddress as Hex, + abi: MACIFactory.abi, + functionName: "getPoll", + args: [pollId], + }); + + // read the emptyBallotRoot + const emptyBallotRoot = await publicClient.readContract({ + address: pollAddresses.poll as Hex, + abi: PollFactory.abi, + functionName: "emptyBallotRoot", + }); + + const extContracts = await publicClient.readContract({ + address: pollAddresses.poll as Hex, + abi: PollFactory.abi, + functionName: "extContracts", + }); + + // store to storage + await Promise.all([ + this.storage.register({ + id: EContracts.Poll, + key: `poll-${pollId}`, + contract: new BaseContract(pollAddresses.poll as Hex, PollFactory.abi as unknown as InterfaceAbi), + args: [ + config.pollDuration, + { + intStateTreeDepth: config.intStateTreeDepth, + messageTreeSubDepth: config.messageTreeSubDepth, + messageTreeDepth: config.messageTreeDepth, + voteOptionTreeDepth: config.voteOptionTreeDepth, + }, + PubKey.deserialize(config.coordinatorPubkey).asContractParam() as { x: bigint; y: bigint }, + extContracts, + emptyBallotRoot.toString(), + ], + network: chain, + }), + this.storage.register({ + id: EContracts.MessageProcessor, + key: `poll-${pollId}`, + contract: new BaseContract(pollAddresses.messageProcessor as Hex, MessageProcessorFactory.abi), + args: [verifierAddress, vkRegistryAddress, pollAddresses.poll, mode], + network: chain, + }), + this.storage.register({ + id: EContracts.Tally, + key: `poll-${pollId}`, + contract: new BaseContract(pollAddresses.tally as Hex, TallyFactory.abi), + args: [verifierAddress, vkRegistryAddress, pollAddresses.poll, pollAddresses.messageProcessor, mode], + network: chain, + }), + this.storage.register({ + id: EContracts.AccQueueQuinaryMaci, + key: `poll-${pollId}`, + name: "contracts/trees/AccQueueQuinaryMaci.sol:AccQueueQuinaryMaci", + contract: new BaseContract(extContracts[1], AccQueueQuinaryMaciFactory.abi), + args: [config.messageTreeSubDepth], + network: chain, + }), + ]); + + return pollId.toString(); + } +} diff --git a/packages/coordinator/ts/deployer/dto.ts b/packages/coordinator/ts/deployer/dto.ts new file mode 100644 index 00000000..cdd77edd --- /dev/null +++ b/packages/coordinator/ts/deployer/dto.ts @@ -0,0 +1,94 @@ +import { ApiProperty } from "@nestjs/swagger"; +import { IsString } from "class-validator"; + +import type { IDeployMaciConfig, IDeployPollConfig } from "./types"; +import type { Hex } from "viem"; +import { ESupportedNetworks } from "../common"; + +/** + * Data transfer object for MACI contracts deployment + */ +export class DeployerServiceDeployMaciDto { + /** + * Session Key Approval string + */ + @ApiProperty({ + description: "Session Key Approval string", + type: String, + }) + @IsString() + approval!: string; + + /** + * Address of the session key + */ + @ApiProperty({ + description: "Address of the session key", + type: String, + }) + @IsString() + sessionKeyAddress!: Hex; + + /** + * Chain Name + */ + @ApiProperty({ + description: "Chain to which to deploy the contract(s)", + type: ESupportedNetworks, + }) + @IsString() + chain!: ESupportedNetworks; + + /** + * Config + */ + @ApiProperty({ + description: "Deployment configuration", + type: Object, + }) + config!: IDeployMaciConfig; +} + +/** + * Data transfer object for Poll contract deployment + */ +export class DeployerServiceDeployPollDto { + /** + * Session Key Approval string + */ + @ApiProperty({ + description: "Session Key Approval string", + type: String, + }) + @IsString() + approval!: string; + + /** + * Address of the session key + */ + @ApiProperty({ + description: "Address of the session key", + type: String, + }) + @IsString() + sessionKeyAddress!: Hex; + + /** + * Chain Name + */ + @ApiProperty({ + description: "Chain to which to deploy the contract(s)", + type: ESupportedNetworks, + }) + @IsString() + chain!: ESupportedNetworks; + + /** + * Config + */ + @ApiProperty({ + description: "Deployment configuration", + type: Object, + }) + config!: IDeployPollConfig; +} diff --git a/packages/coordinator/ts/deployer/types.ts b/packages/coordinator/ts/deployer/types.ts new file mode 100644 index 00000000..8247bf67 --- /dev/null +++ b/packages/coordinator/ts/deployer/types.ts @@ -0,0 +1,249 @@ +import { EGatekeepers, EInitialVoiceCreditProxies } from "maci-contracts"; + +import type { Hex } from "viem"; +import { ESupportedNetworks } from "../common"; + +/** + * IDeployMACIArgs represents the arguments for deploying MACI + */ +export interface IDeployMaciArgs { + /** + * The address of the session key + */ + sessionKeyAddress: Hex; + /** + * The approval for the session key + */ + approval: string; + /** + * The chain name + */ + chain: ESupportedNetworks; + /** + * The configuration for deploying MACI + */ + config: IDeployMaciConfig; +} + +/** + * IDeployPollArgs represents the arguments for deploying a poll + */ +export interface IDeployPollArgs { + /** + * The address of the session key + */ + sessionKeyAddress: Hex; + /** + * The approval for the session key + */ + approval: string; + /** + * The chain name + */ + chain: ESupportedNetworks; + /** + * The configuration for deploying a poll + */ + config: IDeployPollConfig; +} + +/** + * IConstantInitialVoiceCreditProxyArgs represents the arguments for deploying a constant initial voice credit proxy + */ +export interface IConstantInitialVoiceCreditProxyArgs { + /** + * The amount of initial voice credits to deploy + */ + amount: number; +} + +/** + * IFreeForAllGatekeeperArgs represents the arguments for deploying a free for all gatekeeper + */ +export interface IFreeForAllGatekeeperArgs {} + +/** + * IEASGatekeeperArgs represents the arguments for deploying an EAS gatekeeper + */ +export interface IEASGatekeeperArgs { + /** + * The address of the EAS contract + */ + easAddress: string; + /** + * The attestation schema to be used + */ + schema: string; + /** + * The trusted attester + */ + attester: string; +} + +/** + * IZupassGatekeeperArgs represents the arguments for deploying a Zupass gatekeeper + */ +export interface IZupassGatekeeperArgs { + /** + * The first signer + */ + signer1: string; + /** + * The second signer + */ + signer2: string; + /** + * The event ID + */ + eventId: string; + /** + * The Zupass verifier address + */ + zupassVerifier: string; +} + +/** + * IHatsGatekeeperArgs represents the arguments for deploying a Hats gatekeeper + */ +export interface IHatsGatekeeperArgs { + /** + * The hats protocol address + */ + hatsProtocolAddress: string; + /** + * The criterion hats + */ + critrionHats: string[]; +} + +/** + * ISemaphoreGatekeeperArgs represents the arguments for deploying a semaphore gatekeeper + */ +export interface ISemaphoreGatekeeperArgs { + /** + * The semaphore contract address + */ + semaphoreContract: string; + /** + * The group ID + */ + groupId: number; +} + +/** + * IGitcoinPassportGatekeeperArgs represents the arguments for deploying a gitcoin passport gatekeeper + */ +export interface IGitcoinPassportGatekeeperArgs { + /** + * The decoder address + */ + decoderAddress: string; + /** + * The passing score + */ + passingScore: number; +} + +/** + * IVkRegistryArgs represents the arguments for deploying a VkRegistry + */ +export interface IVkRegistryArgs { + /** + * The state tree depth + */ + stateTreeDepth: number; + /** + * The int state tree depth determines the tally batch size + */ + intStateTreeDepth: number; + /** + * The message tree depth + */ + messageTreeDepth: number; + /** + * The vote option tree depth + */ + voteOptionTreeDepth: number; + /** + * The message batch depth + */ + messageBatchDepth: number; +} + +/** + * IGatekeeperArgs represents the arguments for deploying a gatekeeper + */ +export type IGatekeeperArgs = + | IFreeForAllGatekeeperArgs + | IEASGatekeeperArgs + | IZupassGatekeeperArgs + | IHatsGatekeeperArgs + | ISemaphoreGatekeeperArgs + | IGitcoinPassportGatekeeperArgs; + +/** + * DeployMaciConfig is the configuration for deploying MACI + */ +export interface IDeployMaciConfig { + /** + * The gatekeeper configuration + */ + gatekeeper: { + type: EGatekeepers; + args: IGatekeeperArgs; + }; + /** + * The initial voice credits proxy configuration + */ + initialVoiceCreditsProxy: { + type: EInitialVoiceCreditProxies; + args: IConstantInitialVoiceCreditProxyArgs; + }; + /** + * The MACI configuration + */ + MACI: { + stateTreeDepth: number; + gatekeeper: EGatekeepers; + }; + /** + * The VkRegistry configuration + */ + VkRegistry: { + args: IVkRegistryArgs; + }; +} + +/** + * DeployPollConfig is the configuration for deploying a poll + */ +export interface IDeployPollConfig { + /** + * The poll duration + */ + pollDuration: number; + /** + * The coordinator pubkey + */ + coordinatorPubkey: string; + /** + * Whether to use quadratic voting + */ + useQuadraticVoting: boolean; + /** + * Determines the tally batch size + */ + intStateTreeDepth: number; + /** + * Determines the message batch size + */ + messageTreeSubDepth: number; + /** + * Message tree depth + */ + messageTreeDepth: number; + /** + * Vote option tree depth + */ + voteOptionTreeDepth: number; +} diff --git a/packages/coordinator/ts/file/file.service.ts b/packages/coordinator/ts/file/file.service.ts index e98e14ec..c9b93998 100644 --- a/packages/coordinator/ts/file/file.service.ts +++ b/packages/coordinator/ts/file/file.service.ts @@ -38,7 +38,7 @@ export class FileService { */ constructor() { this.logger = new Logger(FileService.name); - this.db = low(new FileSync(path.resolve(__dirname, "..", "..", "./session-keys.json"))); + this.db = low(new FileSync(path.resolve(process.cwd(), "./session-keys.json"))); } /** diff --git a/packages/coordinator/ts/sessionKeys/sessionKeys.module.ts b/packages/coordinator/ts/sessionKeys/sessionKeys.module.ts index fdc40cb3..a7f2cd4f 100644 --- a/packages/coordinator/ts/sessionKeys/sessionKeys.module.ts +++ b/packages/coordinator/ts/sessionKeys/sessionKeys.module.ts @@ -10,5 +10,6 @@ import { SessionKeysService } from "./sessionKeys.service"; imports: [FileModule, CryptoModule], controllers: [SessionKeysController], providers: [SessionKeysService], + exports: [SessionKeysService], }) export class SessionKeysModule {} diff --git a/packages/coordinator/ts/sessionKeys/sessionKeys.service.ts b/packages/coordinator/ts/sessionKeys/sessionKeys.service.ts index 425226b9..cbd271b1 100644 --- a/packages/coordinator/ts/sessionKeys/sessionKeys.service.ts +++ b/packages/coordinator/ts/sessionKeys/sessionKeys.service.ts @@ -8,12 +8,13 @@ import { ENTRYPOINT_ADDRESS_V07_TYPE } from "permissionless/types"; import { type Chain, createPublicClient, type Hex, http, type HttpTransport, type Transport } from "viem"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { ErrorCodes } from "../common"; -import { genPimlicoRPCUrl } from "../common/accountAbstraction"; +import { ErrorCodes, ESupportedNetworks } from "../common"; +import { genPimlicoRPCUrl, getPublicClient } from "../common/accountAbstraction"; import { CryptoService } from "../crypto/crypto.service"; import { FileService } from "../file/file.service"; import { IGenerateSessionKeyReturn } from "./types"; +import { viemChain } from "../common/networks"; /** * SessionKeysService is responsible for generating and managing session keys. @@ -66,18 +67,18 @@ export class SessionKeysService { * @param sessionKeyAddress - the address of the session key * @param encryptedApproval - the encrypted approval string * @param chain - the chain to use - * @returns + * @returns - the kernel client */ async generateClientFromSessionKey( sessionKeyAddress: Hex, encryptedApproval: string, - chain: Chain, + chain: ESupportedNetworks, ): Promise< KernelAccountClient< ENTRYPOINT_ADDRESS_V07_TYPE, Transport, - undefined, - KernelSmartAccount + Chain, + KernelSmartAccount > > { // the approval will have been encrypted so we need to decrypt it @@ -93,10 +94,8 @@ export class SessionKeysService { } // get the bundler url and create a public client - const bundlerUrl = genPimlicoRPCUrl(chain.name); - const publicClient = createPublicClient({ - transport: http(bundlerUrl), - }); + const bundlerUrl = genPimlicoRPCUrl(chain); + const publicClient = getPublicClient(bundlerUrl, chain); // Using a stored private key const sessionKeySigner = toECDSASigner({ @@ -116,6 +115,7 @@ export class SessionKeysService { bundlerTransport: http(bundlerUrl), entryPoint: ENTRYPOINT_ADDRESS_V07, account: sessionKeyAccount, + chain: viemChain(chain), }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb86b514..f10da45a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -185,10 +185,10 @@ importers: version: 10.3.10(@nestjs/common@10.3.10(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.3.10)(@nestjs/platform-socket.io@10.3.10)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nomicfoundation/hardhat-ethers': specifier: ^3.0.6 - version: 3.0.6(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)) + version: 3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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': specifier: ^5.0.0 - version: 5.0.0(qc2x6fg2hvcwib2hi3ibxymkay) + version: 5.0.0(ghpydlnuczymvhitoqi7argaia) '@zerodev/ecdsa-validator': specifier: ^5.3.1 version: 5.3.1(@zerodev/sdk@5.3.9(permissionless@0.1.44(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.44(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)) @@ -214,8 +214,8 @@ importers: specifier: ^6.13.1 version: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) hardhat: - specifier: ^2.22.6 - version: 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) + specifier: ^2.22.9 + version: 2.22.9(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) helmet: specifier: ^7.1.0 version: 7.1.0 @@ -223,20 +223,20 @@ importers: specifier: ^1.0.0 version: 1.0.0 maci-circuits: - specifier: ^2.1.0 - version: 2.1.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^2.2.0 + version: 2.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-cli: - specifier: ^2.1.0 - version: 2.1.0(kp6mbe6ih3mck4yt24st7gzjpa) + specifier: ^2.2.0 + version: 2.2.1(5ndnp5vus77sksj5wp7h6axuom) maci-contracts: - specifier: ^2.1.0 - version: 2.1.0(7htv7pg2ka7ncyn53uwoaz3m6q) + specifier: ^2.2.1 + version: 2.2.1(n3k274vagrqph7hyx7gebacu6e) maci-domainobjs: - specifier: ^2.0.0 - version: 2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^2.2.0 + version: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-subgraph: - specifier: ^2.1.0 - version: 2.1.0(ux5q3l2djucetsca4fb5qxvpmu) + specifier: ^2.2.0 + version: 2.2.1(mg6phbsezkyassblb6tevovlzm) mustache: specifier: ^4.2.0 version: 4.2.0 @@ -7748,6 +7748,18 @@ packages: typescript: optional: true + hardhat@2.22.9: + resolution: {integrity: sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg==} + hasBin: true + peerDependencies: + ts-node: '*' + typescript: '*' + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -9260,24 +9272,13 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - maci-circuits@2.1.0: - resolution: {integrity: sha512-nYk8OM8NigLPhod+hPRK2sNpfoKjsOakBflsYqOKTA6N/fWHsMsfQUS83Qg6v7y5s1m5Nr/cATj+eWea2esd2Q==} - maci-circuits@2.2.0: resolution: {integrity: sha512-KKAQaFGuIXXzxXZOcpVys9fFRI8GKsA9gdgnTjC/YRf0ieBF8LvsArTsRVxdtSNSHVi/m6jPITMqjn7PlimIbQ==} - maci-cli@2.1.0: - resolution: {integrity: sha512-nrbzEqwtRAoGtW1L34blmyEtXMRJsrZ0ovV2GY++yEZFiaYLLdPGzbDcrxBHMoViIrIjo/nNQn9CxqwzSI5+tw==} - hasBin: true - maci-cli@2.2.1: resolution: {integrity: sha512-byWUEeoZ7Z/QvMhe+/321sMNsLWwDAYEfYxTgyW4BJX0X4yX2SldcRIcQWs5U5tEqszlcwz4FH3oBMuYrjBZqQ==} hasBin: true - maci-contracts@2.1.0: - resolution: {integrity: sha512-OwYSYPEmcyXlyrd9LauMsJwbXKftYcdWdcGvcl4o0W8EqlC1ujrav/nWLXDbl6EiHB7QL/mhhlNIP/RQSCstDQ==} - hasBin: true - maci-contracts@2.2.1: resolution: {integrity: sha512-X6NK47fDZ5Gt9K9V0MMFmkU4HwdwhX5bZ34pfme3oTnuagpOXhOWbnALfyKqPwikTjwPwj5190ahiwfTUCFnyw==} hasBin: true @@ -9285,20 +9286,14 @@ packages: maci-core@2.2.0: resolution: {integrity: sha512-jHS40/uGJZMYvslfDls3LUPXK8gAijVrc8L8o51SJQX44iocgR3aWpWycD8df9rBCGBxScZPbtn04CmtFT0lhQ==} - maci-crypto@2.0.0: - resolution: {integrity: sha512-bkgOoDA1ABG49MXDzzsQPsFVEijAkLk8ocJKGyeNQS7YpNhC3YEVVz/SE4g0td+N4xJhD3PbXsyHeaTM3ApIjw==} - maci-crypto@2.2.0: resolution: {integrity: sha512-kSbWfuAdDWOdtQsEyofvgDIdAE//+iRjFdYjluDpvXnk7//x4t+/U4VEQJlE0kJ3TbCVjmsAaGNcbkmwmU977Q==} - maci-domainobjs@2.0.0: - resolution: {integrity: sha512-FmQdIC1omsWR/98wt8WvEJj0SDfnVTl9/2FMDp3N4WwUy1lzmmlVjUGKSFKj2+dj2Rx26DmBWsmKhbTIQeoPOQ==} - maci-domainobjs@2.2.0: resolution: {integrity: sha512-pPHqtdIHaPPvMGmWnmx7zXcXQM5+Q8ZGObeSEXgmH60ZKJTQgdoh5z+hs0TfLWEfoWmwWcetLl94EEfZQj0+vg==} - maci-subgraph@2.1.0: - resolution: {integrity: sha512-WRyuBoQLO6kf3ZXrrzwKH3IW0IWnQBSL8JL6OZzKYpcw6+ZUG6PO5eS/JSEg6zsSZk3sxdcCwALHMI862D1TOw==} + maci-subgraph@2.2.1: + resolution: {integrity: sha512-pO9Q0fvieFLrl0n6iy4p8dk8XNdlme/Wo/LIFNUBIjEOo2CfMq7P3pptuwt8RsTUQ7VIFqKhvNIX5g7Ee5k0rA==} magic-string@0.30.8: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} @@ -16113,6 +16108,17 @@ 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-chai-matchers@2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.9(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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) + deep-eql: 4.1.4 + ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + hardhat: 2.22.9(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) + ordinal: 1.0.3 + '@nomicfoundation/hardhat-ethers@3.0.6(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) @@ -16122,20 +16128,29 @@ snapshots: transitivePeerDependencies: - supports-color - '@nomicfoundation/hardhat-ethers@3.0.6(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-ethers@3.0.6(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))': 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.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: 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) lodash.isequal: 4.5.0 transitivePeerDependencies: - supports-color - '@nomicfoundation/hardhat-ethers@3.0.6(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))': + '@nomicfoundation/hardhat-ethers@3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.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) + hardhat: 2.22.9(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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))': + 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.9(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) lodash.isequal: 4.5.0 transitivePeerDependencies: - supports-color @@ -16156,6 +16171,14 @@ snapshots: 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) + '@nomicfoundation/hardhat-ignition-ethers@0.15.5(@nomicfoundation/hardhat-ethers@3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.9(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.9(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.9(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.9(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.9(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.9(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)': dependencies: '@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)) @@ -16186,6 +16209,21 @@ snapshots: - supports-color - utf-8-validate + '@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.9(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.9(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)': + dependencies: + '@nomicfoundation/hardhat-verify': 2.0.9(hardhat@2.22.9(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/ignition-core': 0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@nomicfoundation/ignition-ui': 0.15.5 + chalk: 4.1.2 + debug: 4.3.6(supports-color@8.1.1) + fs-extra: 10.1.0 + hardhat: 2.22.9(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) + prompts: 2.4.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@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))': dependencies: ethereumjs-util: 7.1.5 @@ -16196,26 +16234,10 @@ 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(73opvmet7kz3zbowkltdbofndi)': + '@nomicfoundation/hardhat-network-helpers@1.0.11(hardhat@2.22.9(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-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(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.6(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.6(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 + ethereumjs-util: 7.1.5 + hardhat: 2.22.9(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(croq2hzbpfcsi44fcj2jwym2jy)': dependencies: @@ -16238,7 +16260,28 @@ snapshots: typechain: 8.3.2(typescript@5.5.4) typescript: 5.5.4 - '@nomicfoundation/hardhat-toolbox@5.0.0(fxus7563hykhnskeghds65zmge)': + '@nomicfoundation/hardhat-toolbox@5.0.0(ghpydlnuczymvhitoqi7argaia)': + dependencies: + '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.9(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.9(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.9(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.9(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.9(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.9(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.9(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.9(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.9(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.9(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(mykfjeexazgyrgti4xzsh3pu5u)': dependencies: '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(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.6(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)) @@ -16252,17 +16295,17 @@ snapshots: '@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: 2.22.9(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(qc2x6fg2hvcwib2hi3ibxymkay)': + '@nomicfoundation/hardhat-toolbox@5.0.0(wutff4stwleov7fed6oyhfnbmq)': dependencies: '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(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.6(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.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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.6(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)) @@ -16273,13 +16316,34 @@ snapshots: '@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.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) + hardhat: 2.22.9(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(xt6dzf66mncmyblgnwrcilnrta)': + dependencies: + '@nomicfoundation/hardhat-chai-matchers': 2.0.7(@nomicfoundation/hardhat-ethers@3.0.6(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)) + '@nomicfoundation/hardhat-ethers': 3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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-ignition-ethers': 0.15.5(@nomicfoundation/hardhat-ethers@3.0.6(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)))(@nomicfoundation/hardhat-ignition@0.15.5(@nomicfoundation/hardhat-verify@2.0.9(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)))(bufferutil@4.0.8)(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))(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.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-network-helpers': 1.0.11(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-verify': 2.0.9(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)) + '@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.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))(typechain@8.3.2(typescript@5.5.4)) + '@types/chai': 4.3.17 + '@types/mocha': 10.0.7 + '@types/node': 22.2.0 + chai: 4.5.0 + ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + hardhat: 2.22.9(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) + hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(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))(utf-8-validate@5.0.10) + solidity-coverage: 0.8.12(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)) + ts-node: 10.9.2(@types/node@22.2.0)(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 @@ -16310,6 +16374,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@nomicfoundation/hardhat-verify@2.0.9(hardhat@2.22.9(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 + '@ethersproject/address': 5.7.0 + cbor: 8.1.0 + chalk: 2.4.2 + debug: 4.3.6(supports-color@8.1.1) + hardhat: 2.22.9(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.clonedeep: 4.5.0 + semver: 6.3.1 + table: 6.8.2 + undici: 5.28.4 + transitivePeerDependencies: + - supports-color + '@nomicfoundation/ignition-core@0.15.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/address': 5.6.1 @@ -16564,7 +16643,7 @@ snapshots: chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.6(supports-color@8.1.1) ejs: 3.1.10 get-package-type: 0.1.0 globby: 11.1.0 @@ -18051,6 +18130,14 @@ 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) typechain: 8.3.2(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.9(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))': + dependencies: + '@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) + fs-extra: 9.1.0 + hardhat: 2.22.9(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/aria-query@4.2.2': {} '@types/aria-query@5.0.4': {} @@ -21253,7 +21340,7 @@ snapshots: dns-over-http-resolver@1.2.3(node-fetch@2.7.0(encoding@0.1.13)): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.6(supports-color@8.1.1) native-fetch: 3.0.0(node-fetch@2.7.0(encoding@0.1.13)) receptacle: 1.3.2 transitivePeerDependencies: @@ -23280,6 +23367,18 @@ snapshots: - debug - utf-8-validate + hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.9(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): + dependencies: + array-uniq: 1.0.3 + eth-gas-reporter: 0.2.27(bufferutil@4.0.8)(utf-8-validate@5.0.10) + hardhat: 2.22.9(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) + sha1: 1.1.1 + transitivePeerDependencies: + - '@codechecks/client' + - bufferutil + - debug + - utf-8-validate + hardhat@2.22.1(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 @@ -23388,7 +23487,61 @@ snapshots: - supports-color - utf-8-validate - 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@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): + dependencies: + '@ethersproject/abi': 5.7.0 + '@metamask/eth-sig-util': 4.0.1 + '@nomicfoundation/edr': 0.5.2 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-tx': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 + '@nomicfoundation/solidity-analyzer': 0.1.2 + '@sentry/node': 5.30.0 + '@types/bn.js': 5.1.5 + '@types/lru-cache': 5.1.1 + adm-zip: 0.4.16 + aggregate-error: 3.1.0 + ansi-escapes: 4.3.2 + boxen: 5.1.2 + chalk: 2.4.2 + chokidar: 3.6.0 + ci-info: 2.0.0 + debug: 4.3.6(supports-color@8.1.1) + enquirer: 2.4.1 + env-paths: 2.2.1 + ethereum-cryptography: 1.2.0 + ethereumjs-abi: 0.6.8 + find-up: 2.1.0 + fp-ts: 1.19.3 + fs-extra: 7.0.1 + glob: 7.2.0 + immutable: 4.3.7 + io-ts: 1.10.4 + keccak: 3.0.4 + lodash: 4.17.21 + mnemonist: 0.38.5 + mocha: 10.7.0 + p-map: 4.0.0 + raw-body: 2.5.2 + resolve: 1.17.0 + semver: 6.3.1 + solc: 0.8.26(debug@4.3.6) + source-map-support: 0.5.21 + stacktrace-parser: 0.1.10 + tsort: 0.0.1 + undici: 5.28.4 + uuid: 8.3.2 + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + ts-node: 10.9.2(@types/node@22.2.0)(typescript@5.5.4) + typescript: 5.5.4 + transitivePeerDependencies: + - bufferutil + - c-kzg + - supports-color + - utf-8-validate + + hardhat@2.22.9(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 '@metamask/eth-sig-util': 4.0.1 @@ -23442,7 +23595,7 @@ snapshots: - supports-color - utf-8-validate - 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): + hardhat@2.22.9(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): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -23994,7 +24147,7 @@ snapshots: any-signal: 2.1.2 blob-to-it: 1.0.4 browser-readablestream-to-it: 1.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.6(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@2.7.0(encoding@0.1.13)) ipfs-unixfs: 6.0.9 @@ -25425,20 +25578,6 @@ snapshots: lz-string@1.5.0: {} - maci-circuits@2.1.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@zk-kit/circuits': 0.4.0 - circomkit: 0.2.1(@types/snarkjs@0.7.8)(snarkjs@0.7.4) - circomlib: 2.0.5 - maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-crypto: 2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-domainobjs: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - snarkjs: 0.7.4 - transitivePeerDependencies: - - '@types/snarkjs' - - bufferutil - - utf-8-validate - maci-circuits@2.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@zk-kit/circuits': 0.4.0 @@ -25453,18 +25592,18 @@ snapshots: - bufferutil - utf-8-validate - maci-cli@2.1.0(kp6mbe6ih3mck4yt24st7gzjpa): + maci-cli@2.2.1(5ndnp5vus77sksj5wp7h6axuom): dependencies: '@commander-js/extra-typings': 12.1.0(commander@12.1.0) - '@nomicfoundation/hardhat-toolbox': 5.0.0(qc2x6fg2hvcwib2hi3ibxymkay) + '@nomicfoundation/hardhat-toolbox': 5.0.0(ghpydlnuczymvhitoqi7argaia) 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.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) - maci-circuits: 2.1.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-contracts: 2.2.1(7htv7pg2ka7ncyn53uwoaz3m6q) + hardhat: 2.22.9(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.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + maci-contracts: 2.2.1(n3k274vagrqph7hyx7gebacu6e) maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-crypto: 2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + maci-crypto: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-domainobjs: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) prompt: 1.3.0 transitivePeerDependencies: @@ -25493,11 +25632,11 @@ snapshots: maci-cli@2.2.1(kp6mbe6ih3mck4yt24st7gzjpa): dependencies: '@commander-js/extra-typings': 12.1.0(commander@12.1.0) - '@nomicfoundation/hardhat-toolbox': 5.0.0(fxus7563hykhnskeghds65zmge) + '@nomicfoundation/hardhat-toolbox': 5.0.0(mykfjeexazgyrgti4xzsh3pu5u) 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) + hardhat: 2.22.9(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.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-contracts: 2.2.1(7htv7pg2ka7ncyn53uwoaz3m6q) maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -25527,20 +25666,20 @@ snapshots: - typescript - utf-8-validate - maci-contracts@2.1.0(7htv7pg2ka7ncyn53uwoaz3m6q): + maci-contracts@2.2.1(7htv7pg2ka7ncyn53uwoaz3m6q): dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.6(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(qc2x6fg2hvcwib2hi3ibxymkay) + '@nomicfoundation/hardhat-ethers': 3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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(wutff4stwleov7fed6oyhfnbmq) '@openzeppelin/contracts': 5.0.2 circomlibjs: 0.1.7(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) + hardhat: 2.22.9(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) lowdb: 1.0.0 - maci-circuits: 2.1.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + maci-circuits: 2.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - maci-crypto: 2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + maci-crypto: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-domainobjs: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - solidity-docgen: 0.6.0-beta.36(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)) + solidity-docgen: 0.6.0-beta.36(hardhat@2.22.9(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)) uuid: 10.0.0 transitivePeerDependencies: - '@nomicfoundation/hardhat-chai-matchers' @@ -25564,20 +25703,20 @@ snapshots: - typescript - utf-8-validate - maci-contracts@2.2.1(7htv7pg2ka7ncyn53uwoaz3m6q): + maci-contracts@2.2.1(flxhpragqyg57es62n2ruk56xe): dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.6(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(73opvmet7kz3zbowkltdbofndi) + '@nomicfoundation/hardhat-ethers': 3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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(xt6dzf66mncmyblgnwrcilnrta) '@openzeppelin/contracts': 5.0.2 circomlibjs: 0.1.7(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.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: 2.22.9(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) lowdb: 1.0.0 maci-circuits: 2.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-crypto: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-domainobjs: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - solidity-docgen: 0.6.0-beta.36(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)) + solidity-docgen: 0.6.0-beta.36(hardhat@2.22.9(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)) uuid: 10.0.0 transitivePeerDependencies: - '@nomicfoundation/hardhat-chai-matchers' @@ -25601,20 +25740,20 @@ snapshots: - typescript - utf-8-validate - maci-contracts@2.2.1(flxhpragqyg57es62n2ruk56xe): + maci-contracts@2.2.1(n3k274vagrqph7hyx7gebacu6e): dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.6(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)) - '@nomicfoundation/hardhat-toolbox': 5.0.0(croq2hzbpfcsi44fcj2jwym2jy) + '@nomicfoundation/hardhat-ethers': 3.0.6(ethers@6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.9(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(ghpydlnuczymvhitoqi7argaia) '@openzeppelin/contracts': 5.0.2 circomlibjs: 0.1.7(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.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) + hardhat: 2.22.9(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) lowdb: 1.0.0 maci-circuits: 2.2.0(@types/snarkjs@0.7.8)(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-core: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-crypto: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) maci-domainobjs: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - solidity-docgen: 0.6.0-beta.36(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)) + solidity-docgen: 0.6.0-beta.36(hardhat@2.22.9(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)) uuid: 10.0.0 transitivePeerDependencies: - '@nomicfoundation/hardhat-chai-matchers' @@ -25646,16 +25785,6 @@ snapshots: - bufferutil - utf-8-validate - maci-crypto@2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@zk-kit/baby-jubjub': 1.0.1 - '@zk-kit/eddsa-poseidon': 1.0.2 - '@zk-kit/poseidon-cipher': 0.3.1 - ethers: 6.13.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - maci-crypto@2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@zk-kit/baby-jubjub': 1.0.1 @@ -25666,13 +25795,6 @@ snapshots: - bufferutil - utf-8-validate - maci-domainobjs@2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - maci-crypto: 2.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - maci-domainobjs@2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: maci-crypto: 2.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -25680,11 +25802,11 @@ snapshots: - bufferutil - utf-8-validate - maci-subgraph@2.1.0(ux5q3l2djucetsca4fb5qxvpmu): + maci-subgraph@2.2.1(mg6phbsezkyassblb6tevovlzm): dependencies: '@graphprotocol/graph-cli': 0.80.0(@types/node@20.14.14)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.5.4)(utf-8-validate@5.0.10) '@graphprotocol/graph-ts': 0.35.1 - maci-contracts: 2.2.1(7htv7pg2ka7ncyn53uwoaz3m6q) + maci-contracts: 2.2.1(n3k274vagrqph7hyx7gebacu6e) transitivePeerDependencies: - '@nomicfoundation/hardhat-chai-matchers' - '@nomicfoundation/hardhat-ignition-ethers' @@ -28653,22 +28775,45 @@ snapshots: shelljs: 0.8.5 web3-utils: 1.10.4 - solidity-docgen@0.6.0-beta.36(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)): + solidity-coverage@0.8.12(hardhat@2.22.9(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 + '@solidity-parser/parser': 0.18.0 + chalk: 2.4.2 + death: 1.1.0 + difflib: 0.2.4 + fs-extra: 8.1.0 + ghost-testrpc: 0.0.2 + global-modules: 2.0.0 + globby: 10.0.2 + hardhat: 2.22.9(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) + jsonschema: 1.4.1 + lodash: 4.17.21 + mocha: 10.7.0 + node-emoji: 1.11.0 + pify: 4.0.1 + recursive-readdir: 2.2.3 + sc-istanbul: 0.4.6 + semver: 7.6.3 + shelljs: 0.8.5 + web3-utils: 1.10.4 + + solidity-docgen@0.6.0-beta.36(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)): dependencies: handlebars: 4.7.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) + 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) solidity-ast: 0.4.56 - solidity-docgen@0.6.0-beta.36(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)): + solidity-docgen@0.6.0-beta.36(hardhat@2.22.9(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: handlebars: 4.7.8 - 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: 2.22.9(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) solidity-ast: 0.4.56 - solidity-docgen@0.6.0-beta.36(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)): + solidity-docgen@0.6.0-beta.36(hardhat@2.22.9(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)): dependencies: handlebars: 4.7.8 - 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) + hardhat: 2.22.9(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) solidity-ast: 0.4.56 sonic-boom@2.8.0: