From e9fd8b0816afd6249a88b3c3556411e2c10ab631 Mon Sep 17 00:00:00 2001 From: Anton <14254374+0xmad@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:59:16 -0600 Subject: [PATCH] chore: update solidity version and cli fixes --- packages/cli/ts/index.ts | 124 +++++++++--------- packages/contracts/contracts/MACI.sol | 2 +- .../contracts/contracts/MessageProcessor.sol | 2 +- .../contracts/MessageProcessorFactory.sol | 2 +- packages/contracts/contracts/Poll.sol | 2 +- packages/contracts/contracts/PollFactory.sol | 2 +- packages/contracts/contracts/Tally.sol | 2 +- packages/contracts/contracts/TallyFactory.sol | 2 +- packages/contracts/contracts/VkRegistry.sol | 4 +- .../contracts/benchmarks/HasherBenchmarks.sol | 2 +- .../contracts/contracts/crypto/BabyJubJub.sol | 2 +- .../contracts/contracts/crypto/Hasher.sol | 2 +- .../contracts/contracts/crypto/Pairing.sol | 2 +- .../contracts/contracts/crypto/PoseidonT3.sol | 2 +- .../contracts/contracts/crypto/PoseidonT4.sol | 2 +- .../contracts/contracts/crypto/PoseidonT5.sol | 2 +- .../contracts/contracts/crypto/PoseidonT6.sol | 2 +- .../contracts/crypto/SnarkCommon.sol | 2 +- .../contracts/crypto/SnarkConstants.sol | 2 +- .../contracts/contracts/crypto/Verifier.sol | 2 +- .../gatekeepers/AnonAadhaarGatekeeper.sol | 2 +- .../contracts/gatekeepers/EASGatekeeper.sol | 2 +- .../gatekeepers/FreeForAllGatekeeper.sol | 2 +- .../gatekeepers/GitcoinPassportGatekeeper.sol | 2 +- .../gatekeepers/HatsGatekeeperBase.sol | 2 +- .../gatekeepers/HatsGatekeeperMultiple.sol | 2 +- .../gatekeepers/HatsGatekeeperSingle.sol | 2 +- .../gatekeepers/MerkleProofGatekeeper.sol | 2 +- .../gatekeepers/SemaphoreGatekeeper.sol | 2 +- .../gatekeepers/SignUpGatekeeper.sol | 2 +- .../gatekeepers/SignUpTokenGatekeeper.sol | 2 +- .../gatekeepers/interfaces/IAnonAadhaar.sol | 2 +- .../contracts/gatekeepers/interfaces/IEAS.sol | 2 +- .../interfaces/IGitcoinPassportDecoder.sol | 2 +- .../gatekeepers/interfaces/IHats.sol | 2 +- .../gatekeepers/interfaces/ISemaphore.sol | 2 +- .../gatekeepers/mocks/MockAnonAadhaar.sol | 2 +- .../contracts/gatekeepers/mocks/MockEAS.sol | 2 +- .../mocks/MockGitcoinPassportDecoder.sol | 2 +- .../gatekeepers/mocks/MockHatsProtocol.sol | 2 +- .../gatekeepers/mocks/MockSemaphore.sol | 2 +- .../gatekeepers/mocks/SignUpToken.sol | 2 +- .../gatekeepers/zupass/ZupassGatekeeper.sol | 2 +- .../zupass/ZupassGroth16Verifier.sol | 2 +- .../ConstantInitialVoiceCreditProxy.sol | 2 +- .../InitialVoiceCreditProxy.sol | 2 +- .../interfaces/IInitialVoiceCreditProxy.sol | 2 +- .../contracts/contracts/interfaces/IMACI.sol | 2 +- .../contracts/interfaces/IMPFactory.sol | 2 +- .../interfaces/IMessageProcessor.sol | 2 +- .../contracts/contracts/interfaces/IPoll.sol | 2 +- .../contracts/interfaces/IPollFactory.sol | 2 +- .../interfaces/ISignUpGatekeeper.sol | 2 +- .../contracts/contracts/interfaces/ITally.sol | 2 +- .../contracts/interfaces/ITallyFactory.sol | 2 +- .../contracts/interfaces/IVerifier.sol | 2 +- .../contracts/interfaces/IVkRegistry.sol | 2 +- .../contracts/contracts/mocks/MockERC20.sol | 2 +- .../contracts/contracts/mocks/MockTally.sol | 2 +- .../contracts/mocks/MockVerifier.sol | 2 +- .../contracts/contracts/trees/LazyIMT.sol | 2 +- .../contracts/contracts/trees/LeanIMT.sol | 2 +- .../contracts/utilities/CommonUtilities.sol | 2 +- .../contracts/utilities/DomainObjs.sol | 2 +- .../contracts/contracts/utilities/Params.sol | 2 +- .../contracts/utilities/Utilities.sol | 2 +- packages/contracts/hardhat.config.ts | 2 +- .../templates/MerkleZeros.sol.template | 2 +- packages/integrationTests/hardhat.config.ts | 2 +- 69 files changed, 132 insertions(+), 130 deletions(-) diff --git a/packages/cli/ts/index.ts b/packages/cli/ts/index.ts index 6b54944eb..6c77ec630 100644 --- a/packages/cli/ts/index.ts +++ b/packages/cli/ts/index.ts @@ -52,10 +52,10 @@ program "-p, --initialVoiceCreditsProxyAddress ", "the initial voice credits proxy contract address", ) - .option("-ph3, --poseidonT3Address ", "PoseidonT3 contract address") - .option("-ph4, --poseidonT4Address ", "PoseidonT4 contract address") - .option("-ph5, --poseidonT5Address ", "PoseidonT5 contract address") - .option("-ph6, --poseidonT6Address ", "PoseidonT6 contract address") + .option("--poseidonT3Address ", "PoseidonT3 contract address") + .option("--poseidonT4Address ", "PoseidonT4 contract address") + .option("--poseidonT5Address ", "PoseidonT5 contract address") + .option("--poseidonT6Address ", "PoseidonT6 contract address") .option("-g, --signupGatekeeperAddress ", "the signup gatekeeper contract address") .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") @@ -84,14 +84,14 @@ program .command("checkVerifyingKeys") .description("check that the verifying keys in the contract match the local ones") .option( - "-uq, --use-quadratic-voting ", + "-u, --use-quadratic-voting ", "whether to use quadratic voting", (value) => value === "true", true, ) .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") - .option("-vk, --vk-contract ", "the VkRegistry contract address") + .option("-k, --vk-contract ", "the VkRegistry contract address") .requiredOption("-s, --state-tree-depth ", "the state tree depth", parseInt) .requiredOption("-i, --int-state-tree-depth ", "the intermediate state tree depth", parseInt) .requiredOption("-v, --vote-option-tree-depth ", "the vote option tree depth", parseInt) @@ -105,7 +105,7 @@ program "the tally votes zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption( - "-pj, --poll-joining-zkey ", + "--poll-joining-zkey ", "the poll join zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .action(async (cmdOptions) => { @@ -132,7 +132,7 @@ program program .command("genMaciPubKey") .description("generate a new MACI public key") - .requiredOption("-sk, --privkey ", "the private key") + .requiredOption("-k, --privkey ", "the private key") .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") .action((cmdObj) => { @@ -141,7 +141,7 @@ program program .command("genMaciKeyPair") .description("generate a new MACI key pair") - .option("-sp, --seed ", "seed value for keypair", (value) => (value ? BigInt(value) : undefined), undefined) + .option("-s, --seed ", "seed value for keypair", (value) => (value ? BigInt(value) : undefined), undefined) .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") .action((cmdObj) => { @@ -176,20 +176,20 @@ program program .command("deployPoll") .description("deploy a new poll") - .option("-vk, --vkRegistryAddress ", "the vk registry contract address") + .option("-k, --vkRegistryAddress ", "the vk registry contract address") .requiredOption("-t, --duration ", "the poll duration", parseInt) .requiredOption("-i, --int-state-tree-depth ", "the int state tree depth", parseInt) .requiredOption("-b, --msg-batch-size ", "the message batch size", parseInt) .requiredOption("-v, --vote-option-tree-depth ", "the vote option tree depth", parseInt) - .requiredOption("-pk, --pubkey ", "the coordinator public key") + .requiredOption("-p, --pubkey ", "the coordinator public key") .option( - "-uq, --use-quadratic-voting ", + "-u, --use-quadratic-voting ", "whether to use quadratic voting", (value) => value === "true", true, ) .option("-x, --maci-address ", "the MACI contract address") - .option("-ra, --relayers ", "the relayer addresses", (value) => value.split(",").map((item) => item.trim())) + .option("-m, --relayers ", "the relayer addresses", (value) => value.split(",").map((item) => item.trim())) .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") .action(async (cmdObj) => { @@ -216,32 +216,32 @@ program program .command("joinPoll") .description("join the poll") - .requiredOption("-sk, --priv-key ", "the private key") + .requiredOption("-k, --priv-key ", "the private key") .option("-i, --state-index ", "the user's state index", BigInt) .requiredOption("-s, --sg-data ", "the signup gateway data") - .requiredOption("-esk, --poll-priv-key ", "the user ephemeral private key for the poll") - .option("-iv, --ivcp-data ", "the initial voice credit proxy data") + .requiredOption("-e, --poll-priv-key ", "the user ephemeral private key for the poll") + .option("-v, --ivcp-data ", "the initial voice credit proxy data") .option( - "-nv, --new-voice-credit-balance ", + "-n, --new-voice-credit-balance ", "the voice credit balance of the user for the poll", BigInt, ) - .requiredOption("-pid, --poll-id ", "the id of the poll", BigInt) + .requiredOption("-p, --poll-id ", "the id of the poll", BigInt) .option("-x, --maci-address ", "the MACI contract address") .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) - .option("-st, --state-file ", "the path to the state file containing the serialized maci state") - .option("-sb, --start-block ", "the block number to start looking for events from", parseInt) - .option("-eb, --end-block ", "the block number to end looking for events from", parseInt) - .option("-bb, --blocks-per-batch ", "the number of blocks to process per batch", parseInt) - .option("-tx, --transaction-hash ", "transaction hash of MACI contract creation") - .option("-pw, --poll-wasm ", "the path to the poll witness generation wasm binary") + .option("--state-file ", "the path to the state file containing the serialized maci state") + .option("--start-block ", "the block number to start looking for events from", parseInt) + .option("--end-block ", "the block number to end looking for events from", parseInt) + .option("--blocks-per-batch ", "the number of blocks to process per batch", parseInt) + .option("--transaction-hash ", "transaction hash of MACI contract creation") + .option("--poll-wasm ", "the path to the poll witness generation wasm binary") .requiredOption( - "-pj, --poll-joining-zkey ", + "--poll-joining-zkey ", "the poll join zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option("-w, --wasm", "whether to use the wasm binaries") .option("-r, --rapidsnark ", "the path to the rapidsnark binary") - .option("-wp, --poll-witnessgen ", "the path to the poll witness generation binary") + .option("-g, --poll-witnessgen ", "the path to the poll witness generation binary") .action(async (cmdObj) => { try { const signer = await getSigner(); @@ -283,27 +283,27 @@ program .requiredOption("-v, --vote-option-tree-depth ", "the vote option tree depth", parseInt) .requiredOption("-b, --msg-batch-size ", "the message batch size", parseInt) .option( - "-pj, --poll-joining-zkey ", + "--poll-joining-zkey ", "the poll join zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option( - "-pqv, --process-messages-zkey-qv ", + "--process-messages-zkey-qv ", "the process messages qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option( - "-tqv, --tally-votes-zkey-qv ", + "--tally-votes-zkey-qv ", "the tally votes qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option( - "-pnqv, --process-messages-zkey-non-qv ", + "--process-messages-zkey-non-qv ", "the process messages non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option( - "-tnqv, --tally-votes-zkey-non-qv ", + "--tally-votes-zkey-non-qv ", "the tally votes non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .option( - "-uq, --use-quadratic-voting ", + "-u, --use-quadratic-voting ", "whether to use quadratic voting", (value) => value === "true", true, @@ -342,7 +342,7 @@ program "the MACI public key which should replace the user's public key in the state tree", ) .option("-x, --maci-address ", "the MACI contract address") - .option("-sk, --privkey ", "your serialized MACI private key") + .option("-k, --privkey ", "your serialized MACI private key") .requiredOption("-i, --state-index ", "the user's state index", BigInt) .requiredOption("-v, --vote-option-index ", "the vote option index", BigInt) .requiredOption("-n, --nonce ", "the message nonce", BigInt) @@ -419,23 +419,23 @@ program .command("extractVkToFile") .description("extract vkey to json file") .requiredOption( - "-pj, --poll-joining-zkey ", + "--poll-joining-zkey ", "the poll join zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption( - "-pqv, --process-messages-zkey-qv ", + "--process-messages-zkey-qv ", "the process messages qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption( - "-tqv, --tally-votes-zkey-qv ", + "--tally-votes-zkey-qv ", "the tally votes qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption( - "-pnqv, --process-messages-zkey-non-qv ", + "--process-messages-zkey-non-qv ", "the process messages non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption( - "-tnqv, --tally-votes-zkey-non-qv ", + "--tally-votes-zkey-non-qv ", "the tally votes non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", ) .requiredOption("-o, --output-file ", "the output file path of extracted vkeys") @@ -509,9 +509,9 @@ program .option("-x, --maci-address ", "the MACI contract address") .requiredOption("-o, --poll-id ", "the poll id", BigInt) .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) - .option("-sb, --start-block ", "the block number to start looking for events from", parseInt) - .option("-eb, --end-block ", "the block number to end looking for events from", parseInt) - .option("-bb, --blocks-per-batch ", "the number of blocks to process per batch", parseInt) + .option("--start-block ", "the block number to start looking for events from", parseInt) + .option("--end-block ", "the block number to end looking for events from", parseInt) + .option("--blocks-per-batch ", "the number of blocks to process per batch", parseInt) .action(async (cmdObj) => { try { const signer = await getSigner(); @@ -611,7 +611,7 @@ program program .command("genProofs") .description("generate the proofs for a poll") - .option("-sk, --privkey ", "your serialized MACI private key") + .option("-k, --privkey ", "your serialized MACI private key") .option("-x, --maci-address ", "the MACI contract address") .requiredOption("-o, --poll-id ", "the poll id", BigInt) .requiredOption( @@ -619,26 +619,26 @@ program "the tally file with results, per vote option spent credits, spent voice credits total", ) .option("-r, --rapidsnark ", "the path to the rapidsnark binary") - .option("-wp, --process-witnessgen ", "the path to the process witness generation binary") - .option("-pd, --process-witnessdat ", "the path to the process witness dat file") - .option("-wt, --tally-witnessgen ", "the path to the tally witness generation binary") - .option("-td, --tally-witnessdat ", "the path to the tally witness dat file") - .requiredOption("-zpj, --poll-joining-zkey ", "the path to the poll join zkey") - .requiredOption("-zp, --process-zkey ", "the path to the process zkey") - .requiredOption("-zt, --tally-zkey ", "the path to the tally zkey") + .option("-g, --process-witnessgen ", "the path to the process witness generation binary") + .option("--process-witnessdat ", "the path to the process witness dat file") + .option("--tally-witnessgen ", "the path to the tally witness generation binary") + .option("--tally-witnessdat ", "the path to the tally witness dat file") + .requiredOption("--poll-joining-zkey ", "the path to the poll join zkey") + .requiredOption("--process-zkey ", "the path to the process zkey") + .requiredOption("--tally-zkey ", "the path to the tally zkey") .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-p, --rpc-provider ", "the rpc provider URL") .requiredOption("-f, --output ", "the output directory for proofs") - .option("-tx, --transaction-hash ", "transaction hash of MACI contract creation") + .option("--transaction-hash ", "transaction hash of MACI contract creation") .option("-w, --wasm", "whether to use the wasm binaries") - .option("-pw, --process-wasm ", "the path to the process witness generation wasm binary") - .option("-tw, --tally-wasm ", "the path to the tally witness generation wasm binary") - .option("-st, --state-file ", "the path to the state file containing the serialized maci state") - .option("-sb, --start-block ", "the block number to start looking for events from", parseInt) - .option("-eb, --end-block ", "the block number to end looking for events from", parseInt) - .option("-bb, --blocks-per-batch ", "the number of blocks to process per batch", parseInt) + .option("--process-wasm ", "the path to the process witness generation wasm binary") + .option("--tally-wasm ", "the path to the tally witness generation wasm binary") + .option("--state-file ", "the path to the state file containing the serialized maci state") + .option("--start-block ", "the block number to start looking for events from", parseInt) + .option("--end-block ", "the block number to end looking for events from", parseInt) + .option("--blocks-per-batch ", "the number of blocks to process per batch", parseInt) .option( - "-uq, --use-quadratic-voting ", + "-u, --use-quadratic-voting ", "whether to use quadratic voting", (value) => value === "true", true, @@ -682,11 +682,11 @@ program .requiredOption("-o, --output ", "the path where to write the state") .requiredOption("-p, --poll-id ", "the id of the poll", BigInt) .option("-x, --maci-address ", "the MACI contract address") - .option("-sk, --privkey ", "your serialized MACI private key") - .option("-eb, --end-block ", "the end block number", parseInt) - .option("-sb, --start-block ", "the start block number", parseInt) - .option("-bb, --blocks-per-batch ", "the blocks per batch", parseInt) - .option("-tx, --transaction-hash ", "the transaction hash") + .option("-k, --privkey ", "your serialized MACI private key") + .option("--start-block ", "the start block number", parseInt) + .option("--end-block ", "the end block number", parseInt) + .option("--blocks-per-batch ", "the blocks per batch", parseInt) + .option("--transaction-hash ", "the transaction hash") .option("-s, --sleep ", "the sleep time between batches", parseInt) .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") diff --git a/packages/contracts/contracts/MACI.sol b/packages/contracts/contracts/MACI.sol index 7b1c52e6c..8bbb8acc5 100644 --- a/packages/contracts/contracts/MACI.sol +++ b/packages/contracts/contracts/MACI.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IPollFactory } from "./interfaces/IPollFactory.sol"; import { IMessageProcessorFactory } from "./interfaces/IMPFactory.sol"; diff --git a/packages/contracts/contracts/MessageProcessor.sol b/packages/contracts/contracts/MessageProcessor.sol index 7ae1cad04..66a534c36 100644 --- a/packages/contracts/contracts/MessageProcessor.sol +++ b/packages/contracts/contracts/MessageProcessor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IMACI } from "./interfaces/IMACI.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/MessageProcessorFactory.sol b/packages/contracts/contracts/MessageProcessorFactory.sol index d096caf90..c55a7dae7 100644 --- a/packages/contracts/contracts/MessageProcessorFactory.sol +++ b/packages/contracts/contracts/MessageProcessorFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Params } from "./utilities/Params.sol"; import { DomainObjs } from "./utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/Poll.sol b/packages/contracts/contracts/Poll.sol index 2a73a0fac..bbd5c1e18 100644 --- a/packages/contracts/contracts/Poll.sol +++ b/packages/contracts/contracts/Poll.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Params } from "./utilities/Params.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; diff --git a/packages/contracts/contracts/PollFactory.sol b/packages/contracts/contracts/PollFactory.sol index fadebbceb..9d343c052 100644 --- a/packages/contracts/contracts/PollFactory.sol +++ b/packages/contracts/contracts/PollFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Params } from "./utilities/Params.sol"; import { DomainObjs } from "./utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/Tally.sol b/packages/contracts/contracts/Tally.sol index f0ead3590..788016d4c 100644 --- a/packages/contracts/contracts/Tally.sol +++ b/packages/contracts/contracts/Tally.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IMACI } from "./interfaces/IMACI.sol"; import { Hasher } from "./crypto/Hasher.sol"; diff --git a/packages/contracts/contracts/TallyFactory.sol b/packages/contracts/contracts/TallyFactory.sol index 9474f58d2..603d2668d 100644 --- a/packages/contracts/contracts/TallyFactory.sol +++ b/packages/contracts/contracts/TallyFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Tally } from "./Tally.sol"; import { ITallyFactory } from "./interfaces/ITallyFactory.sol"; diff --git a/packages/contracts/contracts/VkRegistry.sol b/packages/contracts/contracts/VkRegistry.sol index e65fc0d94..78b969120 100644 --- a/packages/contracts/contracts/VkRegistry.sol +++ b/packages/contracts/contracts/VkRegistry.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; @@ -43,6 +43,7 @@ contract VkRegistry is Ownable(msg.sender), DomainObjs, SnarkCommon, IVkRegistry function isPollVkSet(uint256 _sig) public view returns (bool isSet) { isSet = pollVkSet[_sig]; } + /// @notice Check if the process verifying key is set /// @param _sig The signature /// @param _mode QV or Non-QV @@ -65,6 +66,7 @@ contract VkRegistry is Ownable(msg.sender), DomainObjs, SnarkCommon, IVkRegistry function genPollVkSig(uint256 _stateTreeDepth, uint256 _voteOptionTreeDepth) public pure returns (uint256 sig) { sig = (_stateTreeDepth << 64) + _voteOptionTreeDepth; } + /// @notice generate the signature for the process verifying key /// @param _stateTreeDepth The state tree depth /// @param _voteOptionTreeDepth The vote option tree depth diff --git a/packages/contracts/contracts/benchmarks/HasherBenchmarks.sol b/packages/contracts/contracts/benchmarks/HasherBenchmarks.sol index 4a99af88a..f056a751a 100644 --- a/packages/contracts/contracts/benchmarks/HasherBenchmarks.sol +++ b/packages/contracts/contracts/benchmarks/HasherBenchmarks.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Hasher } from "../crypto/Hasher.sol"; diff --git a/packages/contracts/contracts/crypto/BabyJubJub.sol b/packages/contracts/contracts/crypto/BabyJubJub.sol index d2d74a5a7..4d53518f1 100644 --- a/packages/contracts/contracts/crypto/BabyJubJub.sol +++ b/packages/contracts/contracts/crypto/BabyJubJub.sol @@ -5,7 +5,7 @@ // https://eips.ethereum.org/EIPS/eip-2494#implementation // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; library CurveBabyJubJub { // Curve parameters diff --git a/packages/contracts/contracts/crypto/Hasher.sol b/packages/contracts/contracts/crypto/Hasher.sol index 9445bd6da..e59c978c5 100644 --- a/packages/contracts/contracts/crypto/Hasher.sol +++ b/packages/contracts/contracts/crypto/Hasher.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SnarkConstants } from "./SnarkConstants.sol"; import { PoseidonT3 } from "./PoseidonT3.sol"; diff --git a/packages/contracts/contracts/crypto/Pairing.sol b/packages/contracts/contracts/crypto/Pairing.sol index 4c65e101a..7dfd9f90a 100644 --- a/packages/contracts/contracts/crypto/Pairing.sol +++ b/packages/contracts/contracts/crypto/Pairing.sol @@ -18,7 +18,7 @@ // 2019 OKIMS -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title Pairing /// @notice A library implementing the alt_bn128 elliptic curve operations. diff --git a/packages/contracts/contracts/crypto/PoseidonT3.sol b/packages/contracts/contracts/crypto/PoseidonT3.sol index be8d47e06..1db90cb1f 100644 --- a/packages/contracts/contracts/crypto/PoseidonT3.sol +++ b/packages/contracts/contracts/crypto/PoseidonT3.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT3 { diff --git a/packages/contracts/contracts/crypto/PoseidonT4.sol b/packages/contracts/contracts/crypto/PoseidonT4.sol index 2187bc833..a2d889ad3 100644 --- a/packages/contracts/contracts/crypto/PoseidonT4.sol +++ b/packages/contracts/contracts/crypto/PoseidonT4.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT4 { diff --git a/packages/contracts/contracts/crypto/PoseidonT5.sol b/packages/contracts/contracts/crypto/PoseidonT5.sol index af57b2f31..abcb73485 100644 --- a/packages/contracts/contracts/crypto/PoseidonT5.sol +++ b/packages/contracts/contracts/crypto/PoseidonT5.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT5 { diff --git a/packages/contracts/contracts/crypto/PoseidonT6.sol b/packages/contracts/contracts/crypto/PoseidonT6.sol index 820613be6..f627bd699 100644 --- a/packages/contracts/contracts/crypto/PoseidonT6.sol +++ b/packages/contracts/contracts/crypto/PoseidonT6.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT6 { diff --git a/packages/contracts/contracts/crypto/SnarkCommon.sol b/packages/contracts/contracts/crypto/SnarkCommon.sol index acdd65e1b..f0799c65b 100644 --- a/packages/contracts/contracts/crypto/SnarkCommon.sol +++ b/packages/contracts/contracts/crypto/SnarkCommon.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Pairing } from "./Pairing.sol"; /// @title SnarkCommon diff --git a/packages/contracts/contracts/crypto/SnarkConstants.sol b/packages/contracts/contracts/crypto/SnarkConstants.sol index 782b5fa2b..6a48193db 100644 --- a/packages/contracts/contracts/crypto/SnarkConstants.sol +++ b/packages/contracts/contracts/crypto/SnarkConstants.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title SnarkConstants /// @notice This contract contains constants related to the SNARK diff --git a/packages/contracts/contracts/crypto/Verifier.sol b/packages/contracts/contracts/crypto/Verifier.sol index 195c761e5..6c6b34887 100644 --- a/packages/contracts/contracts/crypto/Verifier.sol +++ b/packages/contracts/contracts/crypto/Verifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Pairing } from "./Pairing.sol"; import { SnarkConstants } from "./SnarkConstants.sol"; diff --git a/packages/contracts/contracts/gatekeepers/AnonAadhaarGatekeeper.sol b/packages/contracts/contracts/gatekeepers/AnonAadhaarGatekeeper.sol index 446f3a7fc..e62e73e94 100644 --- a/packages/contracts/contracts/gatekeepers/AnonAadhaarGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/AnonAadhaarGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/EASGatekeeper.sol b/packages/contracts/contracts/gatekeepers/EASGatekeeper.sol index 0b79b6ec4..d08c3df9d 100644 --- a/packages/contracts/contracts/gatekeepers/EASGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/EASGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol b/packages/contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol index 0fac13e13..a0f74a63c 100644 --- a/packages/contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SignUpGatekeeper } from "./SignUpGatekeeper.sol"; diff --git a/packages/contracts/contracts/gatekeepers/GitcoinPassportGatekeeper.sol b/packages/contracts/contracts/gatekeepers/GitcoinPassportGatekeeper.sol index 60217d788..d97e1a160 100644 --- a/packages/contracts/contracts/gatekeepers/GitcoinPassportGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/GitcoinPassportGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/HatsGatekeeperBase.sol b/packages/contracts/contracts/gatekeepers/HatsGatekeeperBase.sol index 3dd35e275..97f2dd181 100644 --- a/packages/contracts/contracts/gatekeepers/HatsGatekeeperBase.sol +++ b/packages/contracts/contracts/gatekeepers/HatsGatekeeperBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/HatsGatekeeperMultiple.sol b/packages/contracts/contracts/gatekeepers/HatsGatekeeperMultiple.sol index ef8516e83..c5d373da0 100644 --- a/packages/contracts/contracts/gatekeepers/HatsGatekeeperMultiple.sol +++ b/packages/contracts/contracts/gatekeepers/HatsGatekeeperMultiple.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { HatsGatekeeperBase } from "./HatsGatekeeperBase.sol"; diff --git a/packages/contracts/contracts/gatekeepers/HatsGatekeeperSingle.sol b/packages/contracts/contracts/gatekeepers/HatsGatekeeperSingle.sol index e3a6f7f47..c00260dc0 100644 --- a/packages/contracts/contracts/gatekeepers/HatsGatekeeperSingle.sol +++ b/packages/contracts/contracts/gatekeepers/HatsGatekeeperSingle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { HatsGatekeeperBase } from "./HatsGatekeeperBase.sol"; diff --git a/packages/contracts/contracts/gatekeepers/MerkleProofGatekeeper.sol b/packages/contracts/contracts/gatekeepers/MerkleProofGatekeeper.sol index 3d8ea6501..3e5d30a40 100644 --- a/packages/contracts/contracts/gatekeepers/MerkleProofGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/MerkleProofGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; diff --git a/packages/contracts/contracts/gatekeepers/SemaphoreGatekeeper.sol b/packages/contracts/contracts/gatekeepers/SemaphoreGatekeeper.sol index ea448857a..a1011c54e 100644 --- a/packages/contracts/contracts/gatekeepers/SemaphoreGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/SemaphoreGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/SignUpGatekeeper.sol b/packages/contracts/contracts/gatekeepers/SignUpGatekeeper.sol index e33ff38cc..ce4da6f8f 100644 --- a/packages/contracts/contracts/gatekeepers/SignUpGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/SignUpGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title SignUpGatekeeper /// @notice A gatekeeper contract which allows users to sign up for a poll. diff --git a/packages/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol b/packages/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol index 36be6686a..9d405c452 100644 --- a/packages/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; diff --git a/packages/contracts/contracts/gatekeepers/interfaces/IAnonAadhaar.sol b/packages/contracts/contracts/gatekeepers/interfaces/IAnonAadhaar.sol index fce97fbba..977cafd48 100644 --- a/packages/contracts/contracts/gatekeepers/interfaces/IAnonAadhaar.sol +++ b/packages/contracts/contracts/gatekeepers/interfaces/IAnonAadhaar.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; interface IAnonAadhaar { function verifyAnonAadhaarProof( diff --git a/packages/contracts/contracts/gatekeepers/interfaces/IEAS.sol b/packages/contracts/contracts/gatekeepers/interfaces/IEAS.sol index 813095dff..d2d59758d 100644 --- a/packages/contracts/contracts/gatekeepers/interfaces/IEAS.sol +++ b/packages/contracts/contracts/gatekeepers/interfaces/IEAS.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title IEAS /// @notice An interface to the EAS contract. diff --git a/packages/contracts/contracts/gatekeepers/interfaces/IGitcoinPassportDecoder.sol b/packages/contracts/contracts/gatekeepers/interfaces/IGitcoinPassportDecoder.sol index fde9183fe..17382ae49 100644 --- a/packages/contracts/contracts/gatekeepers/interfaces/IGitcoinPassportDecoder.sol +++ b/packages/contracts/contracts/gatekeepers/interfaces/IGitcoinPassportDecoder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @dev A struct storing a passport credential struct Credential { diff --git a/packages/contracts/contracts/gatekeepers/interfaces/IHats.sol b/packages/contracts/contracts/gatekeepers/interfaces/IHats.sol index 6a6c75673..3ae34caac 100644 --- a/packages/contracts/contracts/gatekeepers/interfaces/IHats.sol +++ b/packages/contracts/contracts/gatekeepers/interfaces/IHats.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title IHats /// @notice Minimal interface for the Hats Protocol contract diff --git a/packages/contracts/contracts/gatekeepers/interfaces/ISemaphore.sol b/packages/contracts/contracts/gatekeepers/interfaces/ISemaphore.sol index 5364f2a2f..ab7278eb3 100644 --- a/packages/contracts/contracts/gatekeepers/interfaces/ISemaphore.sol +++ b/packages/contracts/contracts/gatekeepers/interfaces/ISemaphore.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title Semaphore contract interface. interface ISemaphore { diff --git a/packages/contracts/contracts/gatekeepers/mocks/MockAnonAadhaar.sol b/packages/contracts/contracts/gatekeepers/mocks/MockAnonAadhaar.sol index bf0d2779e..a8e0b3fe5 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/MockAnonAadhaar.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/MockAnonAadhaar.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IAnonAadhaar } from "../interfaces/IAnonAadhaar.sol"; diff --git a/packages/contracts/contracts/gatekeepers/mocks/MockEAS.sol b/packages/contracts/contracts/gatekeepers/mocks/MockEAS.sol index a8e1ca35a..7c893c4f7 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/MockEAS.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/MockEAS.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IEAS } from "../interfaces/IEAS.sol"; diff --git a/packages/contracts/contracts/gatekeepers/mocks/MockGitcoinPassportDecoder.sol b/packages/contracts/contracts/gatekeepers/mocks/MockGitcoinPassportDecoder.sol index e680ad684..245232b52 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/MockGitcoinPassportDecoder.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/MockGitcoinPassportDecoder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title MockGitcoinPassportDecoder /// @notice A mock contract to test the GitcoinPassportDecoder gatekeeper diff --git a/packages/contracts/contracts/gatekeepers/mocks/MockHatsProtocol.sol b/packages/contracts/contracts/gatekeepers/mocks/MockHatsProtocol.sol index ab7c9f340..9a05a0d1c 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/MockHatsProtocol.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/MockHatsProtocol.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title MockHatsProtocol /// @notice A mock contract to test the HatsProtocolSingle gatekeeper diff --git a/packages/contracts/contracts/gatekeepers/mocks/MockSemaphore.sol b/packages/contracts/contracts/gatekeepers/mocks/MockSemaphore.sol index abb560ac5..d379ecf75 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/MockSemaphore.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/MockSemaphore.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { ISemaphore } from "../interfaces/ISemaphore.sol"; diff --git a/packages/contracts/contracts/gatekeepers/mocks/SignUpToken.sol b/packages/contracts/contracts/gatekeepers/mocks/SignUpToken.sol index e069c0600..d2be86606 100644 --- a/packages/contracts/contracts/gatekeepers/mocks/SignUpToken.sol +++ b/packages/contracts/contracts/gatekeepers/mocks/SignUpToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/zupass/ZupassGatekeeper.sol b/packages/contracts/contracts/gatekeepers/zupass/ZupassGatekeeper.sol index 9ad636dc1..6da5ff01c 100644 --- a/packages/contracts/contracts/gatekeepers/zupass/ZupassGatekeeper.sol +++ b/packages/contracts/contracts/gatekeepers/zupass/ZupassGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/contracts/contracts/gatekeepers/zupass/ZupassGroth16Verifier.sol b/packages/contracts/contracts/gatekeepers/zupass/ZupassGroth16Verifier.sol index e38a91242..5cc60cd6b 100644 --- a/packages/contracts/contracts/gatekeepers/zupass/ZupassGroth16Verifier.sol +++ b/packages/contracts/contracts/gatekeepers/zupass/ZupassGroth16Verifier.sol @@ -18,7 +18,7 @@ along with snarkJS. If not, see . */ -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; contract ZupassGroth16Verifier { // Scalar field size diff --git a/packages/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol b/packages/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol index 54a72c9c5..4e7c6cc7b 100644 --- a/packages/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol +++ b/packages/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { InitialVoiceCreditProxy } from "./InitialVoiceCreditProxy.sol"; diff --git a/packages/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol b/packages/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol index 6531fdf7d..3db0451e5 100644 --- a/packages/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol +++ b/packages/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title InitialVoiceCreditProxy /// @notice This contract is the base contract for diff --git a/packages/contracts/contracts/interfaces/IInitialVoiceCreditProxy.sol b/packages/contracts/contracts/interfaces/IInitialVoiceCreditProxy.sol index 706e5a05f..35bac29d3 100644 --- a/packages/contracts/contracts/interfaces/IInitialVoiceCreditProxy.sol +++ b/packages/contracts/contracts/interfaces/IInitialVoiceCreditProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title IInitialVoiceCreditProxy /// @notice InitialVoiceCreditProxy interface diff --git a/packages/contracts/contracts/interfaces/IMACI.sol b/packages/contracts/contracts/interfaces/IMACI.sol index b1be21d46..0dfd938aa 100644 --- a/packages/contracts/contracts/interfaces/IMACI.sol +++ b/packages/contracts/contracts/interfaces/IMACI.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title IMACI /// @notice MACI interface diff --git a/packages/contracts/contracts/interfaces/IMPFactory.sol b/packages/contracts/contracts/interfaces/IMPFactory.sol index 80f988cf9..f78ecc652 100644 --- a/packages/contracts/contracts/interfaces/IMPFactory.sol +++ b/packages/contracts/contracts/interfaces/IMPFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { DomainObjs } from "../utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/interfaces/IMessageProcessor.sol b/packages/contracts/contracts/interfaces/IMessageProcessor.sol index c0aae843e..1339e206f 100644 --- a/packages/contracts/contracts/interfaces/IMessageProcessor.sol +++ b/packages/contracts/contracts/interfaces/IMessageProcessor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title IMessageProcessor /// @notice MessageProcessor interface diff --git a/packages/contracts/contracts/interfaces/IPoll.sol b/packages/contracts/contracts/interfaces/IPoll.sol index 5353f7b9a..6c19329b1 100644 --- a/packages/contracts/contracts/interfaces/IPoll.sol +++ b/packages/contracts/contracts/interfaces/IPoll.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { DomainObjs } from "../utilities/DomainObjs.sol"; import { IMACI } from "./IMACI.sol"; diff --git a/packages/contracts/contracts/interfaces/IPollFactory.sol b/packages/contracts/contracts/interfaces/IPollFactory.sol index 29002afe3..c4c703f8d 100644 --- a/packages/contracts/contracts/interfaces/IPollFactory.sol +++ b/packages/contracts/contracts/interfaces/IPollFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { Params } from "../utilities/Params.sol"; import { DomainObjs } from "../utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/interfaces/ISignUpGatekeeper.sol b/packages/contracts/contracts/interfaces/ISignUpGatekeeper.sol index f4c320438..d12ce12f6 100644 --- a/packages/contracts/contracts/interfaces/ISignUpGatekeeper.sol +++ b/packages/contracts/contracts/interfaces/ISignUpGatekeeper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title ISignUpGatekeeper /// @notice SignUpGatekeeper interface diff --git a/packages/contracts/contracts/interfaces/ITally.sol b/packages/contracts/contracts/interfaces/ITally.sol index dab66f678..b2ff03ae1 100644 --- a/packages/contracts/contracts/interfaces/ITally.sol +++ b/packages/contracts/contracts/interfaces/ITally.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title ITally /// @notice Tally interface diff --git a/packages/contracts/contracts/interfaces/ITallyFactory.sol b/packages/contracts/contracts/interfaces/ITallyFactory.sol index 1de2c50ed..9cc9bb148 100644 --- a/packages/contracts/contracts/interfaces/ITallyFactory.sol +++ b/packages/contracts/contracts/interfaces/ITallyFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { DomainObjs } from "../utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/interfaces/IVerifier.sol b/packages/contracts/contracts/interfaces/IVerifier.sol index 6de4dd46c..91698e30d 100644 --- a/packages/contracts/contracts/interfaces/IVerifier.sol +++ b/packages/contracts/contracts/interfaces/IVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SnarkCommon } from "../crypto/SnarkCommon.sol"; diff --git a/packages/contracts/contracts/interfaces/IVkRegistry.sol b/packages/contracts/contracts/interfaces/IVkRegistry.sol index a7c79f596..4c7a87cb8 100644 --- a/packages/contracts/contracts/interfaces/IVkRegistry.sol +++ b/packages/contracts/contracts/interfaces/IVkRegistry.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SnarkCommon } from "../crypto/SnarkCommon.sol"; import { DomainObjs } from "../utilities/DomainObjs.sol"; diff --git a/packages/contracts/contracts/mocks/MockERC20.sol b/packages/contracts/contracts/mocks/MockERC20.sol index d1977823d..cbc890921 100644 --- a/packages/contracts/contracts/mocks/MockERC20.sol +++ b/packages/contracts/contracts/mocks/MockERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/packages/contracts/contracts/mocks/MockTally.sol b/packages/contracts/contracts/mocks/MockTally.sol index 7feea03ef..3dcb85940 100644 --- a/packages/contracts/contracts/mocks/MockTally.sol +++ b/packages/contracts/contracts/mocks/MockTally.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { ITally } from "../interfaces/ITally.sol"; diff --git a/packages/contracts/contracts/mocks/MockVerifier.sol b/packages/contracts/contracts/mocks/MockVerifier.sol index 56c001130..c5130e297 100644 --- a/packages/contracts/contracts/mocks/MockVerifier.sol +++ b/packages/contracts/contracts/mocks/MockVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { SnarkConstants } from "../crypto/SnarkConstants.sol"; import { SnarkCommon } from "../crypto/SnarkCommon.sol"; diff --git a/packages/contracts/contracts/trees/LazyIMT.sol b/packages/contracts/contracts/trees/LazyIMT.sol index 2d1144fc8..091f5b584 100644 --- a/packages/contracts/contracts/trees/LazyIMT.sol +++ b/packages/contracts/contracts/trees/LazyIMT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { PoseidonT3 } from "../crypto/PoseidonT3.sol"; diff --git a/packages/contracts/contracts/trees/LeanIMT.sol b/packages/contracts/contracts/trees/LeanIMT.sol index c376f8052..b296cb708 100644 --- a/packages/contracts/contracts/trees/LeanIMT.sol +++ b/packages/contracts/contracts/trees/LeanIMT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { PoseidonT3 } from "../crypto/PoseidonT3.sol"; diff --git a/packages/contracts/contracts/utilities/CommonUtilities.sol b/packages/contracts/contracts/utilities/CommonUtilities.sol index 01d99ff0f..75135562b 100644 --- a/packages/contracts/contracts/utilities/CommonUtilities.sol +++ b/packages/contracts/contracts/utilities/CommonUtilities.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IPoll } from "../interfaces/IPoll.sol"; diff --git a/packages/contracts/contracts/utilities/DomainObjs.sol b/packages/contracts/contracts/utilities/DomainObjs.sol index dec3513b5..9d05d18e8 100644 --- a/packages/contracts/contracts/utilities/DomainObjs.sol +++ b/packages/contracts/contracts/utilities/DomainObjs.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; /// @title DomainObjs /// @notice An utility contract that holds diff --git a/packages/contracts/contracts/utilities/Params.sol b/packages/contracts/contracts/utilities/Params.sol index b6195451a..0294963c1 100644 --- a/packages/contracts/contracts/utilities/Params.sol +++ b/packages/contracts/contracts/utilities/Params.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { IMACI } from "../interfaces/IMACI.sol"; import { IVerifier } from "../interfaces/IVerifier.sol"; diff --git a/packages/contracts/contracts/utilities/Utilities.sol b/packages/contracts/contracts/utilities/Utilities.sol index 44c54c24e..ac18133ea 100644 --- a/packages/contracts/contracts/utilities/Utilities.sol +++ b/packages/contracts/contracts/utilities/Utilities.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; import { DomainObjs } from "./DomainObjs.sol"; import { Hasher } from "../crypto/Hasher.sol"; diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 9f3cf0820..23b571c9d 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -44,7 +44,7 @@ const getCommonNetworkConfig = (networkName: ESupportedChains, chainId: number, const config: HardhatUserConfig = { solidity: { - version: "0.8.20", + version: "0.8.28", settings: { optimizer: { enabled: true, diff --git a/packages/contracts/templates/MerkleZeros.sol.template b/packages/contracts/templates/MerkleZeros.sol.template index 0cc463c8f..da63380c9 100644 --- a/packages/contracts/templates/MerkleZeros.sol.template +++ b/packages/contracts/templates/MerkleZeros.sol.template @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.28; abstract contract MerkleZeros { uint256[<% NUM_ZEROS %>] internal zeros; diff --git a/packages/integrationTests/hardhat.config.ts b/packages/integrationTests/hardhat.config.ts index 3562d475d..0e7f0f648 100644 --- a/packages/integrationTests/hardhat.config.ts +++ b/packages/integrationTests/hardhat.config.ts @@ -19,7 +19,7 @@ const config: HardhatUserConfig = { }, }, solidity: { - version: "0.8.20", + version: "0.8.28", settings: { optimizer: { enabled: true,