From 7fe6a482d6b9ba5c8bd7e061ba1e4e7efb8856e6 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Fri, 8 Dec 2023 22:07:52 +0000 Subject: [PATCH] refactor(contracts): add natspec across contracts and cleanup --- contracts/contracts/DomainObjs.sol | 38 - contracts/contracts/HasherBenchmarks.sol | 14 - contracts/contracts/IMACI.sol | 14 - contracts/contracts/MACI.sol | 52 +- contracts/contracts/MessageProcessor.sol | 65 +- contracts/contracts/Params.sol | 24 - contracts/contracts/Poll.sol | 117 +- contracts/contracts/PollFactory.sol | 85 + contracts/contracts/SignUpToken.sol | 8 +- contracts/contracts/Subsidy.sol | 59 +- contracts/contracts/Tally.sol | 116 +- contracts/contracts/TopupCredit.sol | 15 +- contracts/contracts/VkRegistry.sol | 141 +- .../contracts/benchmarks/HasherBenchmarks.sol | 23 + contracts/contracts/crypto/Hasher.sol | 51 +- contracts/contracts/crypto/Pairing.sol | 12 +- contracts/contracts/crypto/SnarkCommon.sol | 4 + contracts/contracts/crypto/SnarkConstants.sol | 25 +- contracts/contracts/crypto/Verifier.sol | 45 +- .../FreeForAllSignUpGatekeeper.sol | 8 +- .../gatekeepers/SignUpGatekeeper.sol | 6 + .../gatekeepers/SignUpTokenGatekeeper.sol | 15 +- .../ConstantInitialVoiceCreditProxy.sol | 15 +- .../InitialVoiceCreditProxy.sol | 8 + contracts/contracts/interfaces/IMACI.sol | 38 + contracts/contracts/trees/AccQueue.sol | 224 +- contracts/contracts/utilities/DomainObjs.sol | 37 + contracts/contracts/utilities/Params.sol | 45 + contracts/contracts/utilities/Utilities.sol | 95 + contracts/contracts/utilities/Utility.sol | 59 - contracts/package-lock.json | 4618 +++++++++++++++-- contracts/package.json | 2 +- contracts/tests/HasherBenchmarks.test.ts | 1 - .../{DomainObjs.test.ts => Utilities.test.ts} | 14 +- core/ts/utils/utils.ts | 4 +- ...22-09-22-maci-v1-technical-introduction.md | 2 +- 36 files changed, 5037 insertions(+), 1062 deletions(-) delete mode 100644 contracts/contracts/DomainObjs.sol delete mode 100644 contracts/contracts/HasherBenchmarks.sol delete mode 100644 contracts/contracts/IMACI.sol delete mode 100644 contracts/contracts/Params.sol create mode 100644 contracts/contracts/PollFactory.sol create mode 100644 contracts/contracts/benchmarks/HasherBenchmarks.sol create mode 100644 contracts/contracts/interfaces/IMACI.sol create mode 100644 contracts/contracts/utilities/DomainObjs.sol create mode 100644 contracts/contracts/utilities/Params.sol create mode 100644 contracts/contracts/utilities/Utilities.sol delete mode 100644 contracts/contracts/utilities/Utility.sol rename contracts/tests/{DomainObjs.test.ts => Utilities.test.ts} (76%) diff --git a/contracts/contracts/DomainObjs.sol b/contracts/contracts/DomainObjs.sol deleted file mode 100644 index 8082f779f0..0000000000 --- a/contracts/contracts/DomainObjs.sol +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; - -import { Hasher } from "./crypto/Hasher.sol"; - -contract IPubKey { - struct PubKey { - uint256 x; - uint256 y; - } -} - -contract IMessage { - uint8 constant MESSAGE_DATA_LENGTH = 10; - - struct Message { - uint256 msgType; // 1: vote message (size 10), 2: topup message (size 2) - uint256[MESSAGE_DATA_LENGTH] data; // data length is padded to size 10 - } -} - -contract DomainObjs is IMessage, Hasher, IPubKey { - struct StateLeaf { - PubKey pubKey; - uint256 voiceCreditBalance; - uint256 timestamp; - } - - function hashStateLeaf(StateLeaf memory _stateLeaf) public pure returns (uint256) { - uint256[4] memory plaintext; - plaintext[0] = _stateLeaf.pubKey.x; - plaintext[1] = _stateLeaf.pubKey.y; - plaintext[2] = _stateLeaf.voiceCreditBalance; - plaintext[3] = _stateLeaf.timestamp; - - return hash4(plaintext); - } -} diff --git a/contracts/contracts/HasherBenchmarks.sol b/contracts/contracts/HasherBenchmarks.sol deleted file mode 100644 index 0fd6d9543b..0000000000 --- a/contracts/contracts/HasherBenchmarks.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; - -import { Hasher } from "./crypto/Hasher.sol"; - -contract HasherBenchmarks is Hasher { - function hash5Benchmark(uint256[5] memory array) public { - hash5(array); - } - - function hashLeftRightBenchmark(uint256 _left, uint256 _right) public { - hashLeftRight(_left, _right); - } -} diff --git a/contracts/contracts/IMACI.sol b/contracts/contracts/IMACI.sol deleted file mode 100644 index 82a9a62e27..0000000000 --- a/contracts/contracts/IMACI.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; -import { VkRegistry } from "./VkRegistry.sol"; -import { AccQueue } from "./trees/AccQueue.sol"; - -interface IMACI { - function stateTreeDepth() external view returns (uint8); - function vkRegistry() external view returns (VkRegistry); - function getStateAqRoot() external view returns (uint256); - function mergeStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) external; - function mergeStateAq(uint256 _pollId) external returns (uint256); - function numSignUps() external view returns (uint256); - function stateAq() external view returns (AccQueue); -} diff --git a/contracts/contracts/MACI.sol b/contracts/contracts/MACI.sol index bad877fc4e..d18cc37b3e 100644 --- a/contracts/contracts/MACI.sol +++ b/contracts/contracts/MACI.sol @@ -1,22 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import { Poll, PollFactory } from "./Poll.sol"; +import { Poll } from "./Poll.sol"; +import { PollFactory } from "./PollFactory.sol"; import { InitialVoiceCreditProxy } from "./initialVoiceCreditProxy/InitialVoiceCreditProxy.sol"; import { SignUpGatekeeper } from "./gatekeepers/SignUpGatekeeper.sol"; import { AccQueue, AccQueueQuinaryBlankSl } from "./trees/AccQueue.sol"; -import { IMACI } from "./IMACI.sol"; -import { Params } from "./Params.sol"; -import { DomainObjs } from "./DomainObjs.sol"; +import { IMACI } from "./interfaces/IMACI.sol"; +import { Params } from "./utilities/Params.sol"; +import { DomainObjs } from "./utilities/DomainObjs.sol"; import { VkRegistry } from "./VkRegistry.sol"; import { TopupCredit } from "./TopupCredit.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { SnarkConstants } from "./crypto/SnarkConstants.sol"; - +import { Hasher } from "./crypto/Hasher.sol"; +import { Utilities } from "./utilities/Utilities.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; /// @title MACI - Minimum Anti-Collusion Infrastructure Version 1 -contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { +/// @notice A contract which allows users to sign up, and deploy new polls +contract MACI is IMACI, DomainObjs, Params, Utilities, Ownable { /// @notice The state tree depth is fixed. As such it should be as large as feasible /// so that there can be as many users as possible. i.e. 5 ** 10 = 9765625 /// this should also match the parameter of the circom circuits. @@ -59,7 +62,7 @@ contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { PollFactory public pollFactory; /// @notice The state AccQueue. Represents a mapping between each user's public key - /// @notice and their voice credit balance. + /// and their voice credit balance. AccQueue public override stateAq; /// @notice Whether the init() function has been successfully executed yet. @@ -111,6 +114,11 @@ contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { error PreviousPollNotCompleted(uint256 pollId); error PollDoesNotExist(uint256 pollId); + /// @notice Create a new instance of the MACI contract. + /// @param _pollFactory The PollFactory contract + /// @param _signUpGatekeeper The SignUpGatekeeper contract + /// @param _initialVoiceCreditProxy The InitialVoiceCreditProxy contract + /// @param _stateTreeDepth The depth of the state tree constructor( PollFactory _pollFactory, SignUpGatekeeper _signUpGatekeeper, @@ -199,14 +207,16 @@ contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { /// @notice Deploy a new Poll contract. /// @param _duration How long should the Poll last for + /// @param _maxValues The maximum number of vote options, and messages /// @param _treeDepths The depth of the Merkle trees - /// @return a new Poll contract address + /// @param _coordinatorPubKey The coordinator's public key + /// @return pollAddr a new Poll contract address function deployPoll( uint256 _duration, MaxValues memory _maxValues, TreeDepths memory _treeDepths, PubKey memory _coordinatorPubKey - ) public afterInit onlyOwner returns (address) { + ) public afterInit onlyOwner returns (address pollAddr) { uint256 pollId = nextPollId; // Increment the poll ID for the next poll @@ -240,9 +250,9 @@ contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { polls[pollId] = p; - emit DeployPoll(pollId, address(p), _coordinatorPubKey); + pollAddr = address(p); - return address(p); + emit DeployPoll(pollId, pollAddr, _coordinatorPubKey); } /// @notice Allow Poll contracts to merge the state subroots @@ -256,26 +266,24 @@ contract MACI is IMACI, DomainObjs, Params, SnarkCommon, Ownable { /// @notice Allow Poll contracts to merge the state root /// @param _pollId The active Poll ID - /// @return uint256 The calculated Merkle root - function mergeStateAq(uint256 _pollId) public override onlyPoll(_pollId) afterInit returns (uint256) { - uint256 root = stateAq.merge(stateTreeDepth); + /// @return root The calculated Merkle root + function mergeStateAq(uint256 _pollId) public override onlyPoll(_pollId) afterInit returns (uint256 root) { + root = stateAq.merge(stateTreeDepth); emit MergeStateAq(_pollId); - - return root; } /// @notice Return the main root of the StateAq contract - /// @return uint256 The Merkle root - function getStateAqRoot() public view override returns (uint256) { - return stateAq.getMainRoot(stateTreeDepth); + /// @return root The Merkle root + function getStateAqRoot() public view override returns (uint256 root) { + root = stateAq.getMainRoot(stateTreeDepth); } /// @notice Get the Poll details /// @param _pollId The identifier of the Poll to retrieve - /// @return Poll The Poll data - function getPoll(uint256 _pollId) public view returns (Poll) { + /// @return poll The Poll contract object + function getPoll(uint256 _pollId) public view returns (Poll poll) { if (_pollId >= nextPollId) revert PollDoesNotExist(_pollId); - return polls[_pollId]; + poll = polls[_pollId]; } } diff --git a/contracts/contracts/MessageProcessor.sol b/contracts/contracts/MessageProcessor.sol index 8c8ceaa71d..0ee8ba7ff1 100644 --- a/contracts/contracts/MessageProcessor.sol +++ b/contracts/contracts/MessageProcessor.sol @@ -2,20 +2,21 @@ pragma solidity ^0.8.10; import { AccQueue } from "./trees/AccQueue.sol"; -import { IMACI } from "./IMACI.sol"; +import { IMACI } from "./interfaces/IMACI.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Poll } from "./Poll.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { Hasher } from "./crypto/Hasher.sol"; -import { CommonUtilities } from "./utilities/Utility.sol"; +import { CommonUtilities } from "./utilities/Utilities.sol"; import { Verifier } from "./crypto/Verifier.sol"; import { VkRegistry } from "./VkRegistry.sol"; /// @title MessageProcessor -/// @dev MessageProcessor is used to process messages published by signup users -/// it will process message by batch due to large size of messages -/// after it finishes processing, the sbCommitment will be used for Tally and Subsidy contracts +/// @dev MessageProcessor is used to process messages published by signup users. +/// It will process message by batch due to large size of messages. +/// After it finishes processing, the sbCommitment will be used for Tally and Subsidy contracts. contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { + /// @notice custom errors error NoMoreMessages(); error StateAqNotMerged(); error MessageAqNotMerged(); @@ -39,6 +40,8 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { Verifier public verifier; + /// @notice Create a new instance + /// @param _verifier The Verifier contract address constructor(Verifier _verifier) { verifier = _verifier; } @@ -124,6 +127,15 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { } } + /// @notice Verify the proof for processMessage + /// @dev used to update the sbCommitment + /// @param _poll The Poll contract address + /// @param _currentMessageBatchIndex The batch index of current message batch + /// @param _messageRoot The message tree root + /// @param _currentSbCommitment The current sbCommitment (state and ballot) + /// @param _newSbCommitment The new sbCommitment after we update this message batch + /// @param _proof The zk-SNARK proof + /// @return isValid Whether the proof is valid function verifyProcessProof( Poll _poll, uint256 _currentMessageBatchIndex, @@ -131,7 +143,7 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { uint256 _currentSbCommitment, uint256 _newSbCommitment, uint256[8] memory _proof - ) internal view returns (bool) { + ) internal view returns (bool isValid) { (, , uint8 messageTreeDepth, uint8 voteOptionTreeDepth) = _poll.treeDepths(); (uint256 messageBatchSize, , ) = _poll.batchSizes(); (uint256 numSignUps, ) = _poll.numSignUpsAndMessages(); @@ -159,7 +171,7 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { messageBatchSize ); - return verifier.verify(_proof, vk, publicInputHash); + isValid = verifier.verify(_proof, vk, publicInputHash); } /// @notice Returns the SHA256 hash of the packed values (see @@ -168,13 +180,13 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { /// ballot root. By passing the SHA256 hash of these values to the circuit /// as a single public input and the preimage as private inputs, we reduce /// its verification gas cost though the number of constraints will be - /// higher and proving time will be higher. - /// @param _poll: contract address - /// @param _currentMessageBatchIndex: batch index of current message batch - /// @param _numSignUps: number of users that signup - /// @param _currentSbCommitment: current sbCommitment - /// @param _newSbCommitment: new sbCommitment after we update this message batch - /// @return returns the SHA256 hash of the packed values + /// higher and proving time will be longer. + /// @param _poll The Poll contract address + /// @param _currentMessageBatchIndex The batch index of current message batch + /// @param _numSignUps The number of users that signup + /// @param _currentSbCommitment The current sbCommitment (state and ballot root) + /// @param _newSbCommitment The new sbCommitment after we update this message batch + /// @return inputHash Returns the SHA256 hash of the packed values function genProcessMessagesPublicInputHash( Poll _poll, uint256 _currentMessageBatchIndex, @@ -182,7 +194,7 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { uint256 _numSignUps, uint256 _currentSbCommitment, uint256 _newSbCommitment - ) public view returns (uint256) { + ) public view returns (uint256 inputHash) { uint256 coordinatorPubKeyHash = _poll.coordinatorPubKeyHash(); uint256 packedVals = genProcessMessagesPackedVals(_poll, _currentMessageBatchIndex, _numSignUps); @@ -196,9 +208,7 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { input[3] = _currentSbCommitment; input[4] = _newSbCommitment; input[5] = deployTime + duration; - uint256 inputHash = sha256Hash(input); - - return inputHash; + inputHash = sha256Hash(input); } /// @notice One of the inputs to the ProcessMessages circuit is a 250-bit @@ -206,14 +216,15 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { /// 250-bit value, which consists of the maximum number of vote options, the /// number of signups, the current message batch index, and the end index of /// the current batch. - /// @param _poll: the poll contract - /// @param _currentMessageBatchIndex: batch index of current message batch - /// @param _numSignUps: number of users that signup + /// @param _poll the poll contract + /// @param _currentMessageBatchIndex batch index of current message batch + /// @param _numSignUps number of users that signup + /// @return result The packed value function genProcessMessagesPackedVals( Poll _poll, uint256 _currentMessageBatchIndex, uint256 _numSignUps - ) public view returns (uint256) { + ) public view returns (uint256 result) { (, uint256 maxVoteOptions) = _poll.maxValues(); (, uint256 numMessages) = _poll.numSignUpsAndMessages(); (uint24 mbs, , ) = _poll.batchSizes(); @@ -229,15 +240,13 @@ contract MessageProcessor is Ownable, SnarkCommon, CommonUtilities, Hasher { if (_currentMessageBatchIndex >= 2 ** 50) revert CurrentMessageBatchIndexTooLarge(); if (batchEndIndex >= 2 ** 50) revert BatchEndIndexTooLarge(); - uint256 result = maxVoteOptions + (_numSignUps << 50) + (_currentMessageBatchIndex << 100) + (batchEndIndex << 150); - - return result; + result = maxVoteOptions + (_numSignUps << 50) + (_currentMessageBatchIndex << 100) + (batchEndIndex << 150); } /// @notice update message processing state variables - /// @param _newSbCommitment: sbCommitment to be updated - /// @param _currentMessageBatchIndex: currentMessageBatchIndex to be updated - /// @param _processingComplete: update flag that indicate processing is finished or not + /// @param _newSbCommitment sbCommitment to be updated + /// @param _currentMessageBatchIndex currentMessageBatchIndex to be updated + /// @param _processingComplete update flag that indicate processing is finished or not function updateMessageProcessingData( uint256 _newSbCommitment, uint256 _currentMessageBatchIndex, diff --git a/contracts/contracts/Params.sol b/contracts/contracts/Params.sol deleted file mode 100644 index 4afabfa6fa..0000000000 --- a/contracts/contracts/Params.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; - -contract Params { - // This structs help to reduce the number of parameters to the constructor - // and avoid a stack overflow error during compilation - struct TreeDepths { - uint8 intStateTreeDepth; - uint8 messageTreeSubDepth; - uint8 messageTreeDepth; - uint8 voteOptionTreeDepth; - } - - struct BatchSizes { - uint24 messageBatchSize; - uint24 tallyBatchSize; - uint24 subsidyBatchSize; - } - - struct MaxValues { - uint256 maxMessages; - uint256 maxVoteOptions; - } -} diff --git a/contracts/contracts/Poll.sol b/contracts/contracts/Poll.sol index 3a52bc3167..87f3b08605 100644 --- a/contracts/contracts/Poll.sol +++ b/contracts/contracts/Poll.sol @@ -1,97 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import { IMACI } from "./IMACI.sol"; -import { Params } from "./Params.sol"; +import { Params } from "./utilities/Params.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; -import { DomainObjs, IPubKey, IMessage } from "./DomainObjs.sol"; +import { DomainObjs } from "./utilities/DomainObjs.sol"; import { AccQueue, AccQueueQuinaryMaci } from "./trees/AccQueue.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import { VkRegistry } from "./VkRegistry.sol"; import { Verifier } from "./crypto/Verifier.sol"; import { EmptyBallotRoots } from "./trees/EmptyBallotRoots.sol"; import { TopupCredit } from "./TopupCredit.sol"; -import { Utilities } from "./utilities/Utility.sol"; +import { Utilities } from "./utilities/Utilities.sol"; import { MessageProcessor } from "./MessageProcessor.sol"; -contract PollDeploymentParams { - struct ExtContracts { - VkRegistry vkRegistry; - IMACI maci; - AccQueue messageAq; - TopupCredit topupCredit; - } -} - -/// @title PollFactory -/// A factory contract which deploys Poll contracts. It allows the MACI contract -/// size to stay within the limit set by EIP-170. -contract PollFactory is Params, IPubKey, Ownable, PollDeploymentParams { - error InvalidMaxValues(); - - /// @notice Deploy a new Poll contract and AccQueue contract for messages. - function deploy( - uint256 _duration, - MaxValues memory _maxValues, - TreeDepths memory _treeDepths, - BatchSizes memory _batchSizes, - PubKey memory _coordinatorPubKey, - VkRegistry _vkRegistry, - IMACI _maci, - TopupCredit _topupCredit, - address _pollOwner - ) public onlyOwner returns (Poll) { - uint256 treeArity = 5; - - // Validate _maxValues - // NOTE: these checks may not be necessary. Removing them will save - // 0.28 Kb of bytecode. - - // maxVoteOptions must be less than 2 ** 50 due to circuit limitations; - // it will be packed as a 50-bit value along with other values as one - // of the inputs (aka packedVal) - if ( - _maxValues.maxMessages > treeArity ** uint256(_treeDepths.messageTreeDepth) || - _maxValues.maxMessages < _batchSizes.messageBatchSize || - _maxValues.maxMessages % _batchSizes.messageBatchSize != 0 || - _maxValues.maxVoteOptions > treeArity ** uint256(_treeDepths.voteOptionTreeDepth) || - _maxValues.maxVoteOptions >= (2 ** 50) - ) { - revert InvalidMaxValues(); - } - - AccQueue messageAq = new AccQueueQuinaryMaci(_treeDepths.messageTreeSubDepth); - - ExtContracts memory extContracts; - - // TODO: remove _vkRegistry; only PollProcessorAndTallyer needs it - extContracts.vkRegistry = _vkRegistry; - extContracts.maci = _maci; - extContracts.messageAq = messageAq; - extContracts.topupCredit = _topupCredit; - - Poll poll = new Poll(_duration, _maxValues, _treeDepths, _batchSizes, _coordinatorPubKey, extContracts); - - // Make the Poll contract own the messageAq contract, so only it can - // run enqueue/merge - messageAq.transferOwnership(address(poll)); - - // init messageAq - poll.init(); - - // TODO: should this be _maci.owner() instead? - poll.transferOwnership(_pollOwner); - - return poll; - } -} - /// @title Poll +/// @notice A Poll contract allows voters to submit encrypted messages +/// which can be either votes, key change messages or topup messages. /// @dev Do not deploy this directly. Use PollFactory.deploy() which performs some /// checks on the Poll constructor arguments. -contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, EmptyBallotRoots { +contract Poll is Params, Utilities, SnarkCommon, Ownable, EmptyBallotRoots { using SafeERC20 for ERC20; bool internal isInit = false; @@ -110,10 +38,6 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, // The duration of the polling period, in seconds uint256 internal duration; - function getDeployTimeAndDuration() public view returns (uint256, uint256) { - return (deployTime, duration); - } - // Whether the MACI contract's stateAq has been merged by this contract bool public stateAqMerged; @@ -128,9 +52,13 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, uint256 internal numMessages; - function numSignUpsAndMessages() public view returns (uint256, uint256) { - uint256 numSignUps = extContracts.maci.numSignUps(); - return (numSignUps, numMessages); + /// @notice The number of messages which have been processed and the number of + /// signups + /// @return numSignups The number of signups + /// @return numMsgs The number of messages sent by voters + function numSignUpsAndMessages() public view returns (uint256 numSignups, uint256 numMsgs) { + numSignups = extContracts.maci.numSignUps(); + numMsgs = numMessages; } MaxValues public maxValues; @@ -157,6 +85,12 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, /// @notice Each MACI instance can have multiple Polls. /// When a Poll is deployed, its voting period starts immediately. + /// @param _duration The duration of the voting period, in seconds + /// @param _maxValues The maximum number of signups and messages + /// @param _treeDepths The depths of the merkle trees + /// @param _batchSizes The batch sizes for processing + /// @param _coordinatorPubKey The coordinator's public key + /// @param _extContracts The external contracts constructor( uint256 _duration, MaxValues memory _maxValues, @@ -186,13 +120,16 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, _; } + /// @notice A modifier that causes the function to revert if the voting period is + /// over modifier isWithinVotingDeadline() { uint256 secondsPassed = block.timestamp - deployTime; if (secondsPassed >= duration) revert VotingPeriodOver(); _; } - /// @notice Should be called immediately after Poll creation + /// @notice The initialization function. + /// @dev Should be called immediately after Poll creation /// and messageAq ownership transferred function init() public { if (isInit) revert PollAlreadyInit(); @@ -310,4 +247,12 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, PollDeploymentParams, uint256 root = extContracts.messageAq.merge(treeDepths.messageTreeDepth); emit MergeMessageAq(root); } + + /// @notice Returns the Poll's deploy time and duration + /// @return _deployTime The deployment timestamp + /// @return _duration The duration of the poll + function getDeployTimeAndDuration() public view returns (uint256 _deployTime, uint256 _duration) { + _deployTime = deployTime; + _duration = duration; + } } diff --git a/contracts/contracts/PollFactory.sol b/contracts/contracts/PollFactory.sol new file mode 100644 index 0000000000..1ec3d4d29e --- /dev/null +++ b/contracts/contracts/PollFactory.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import { IMACI } from "./interfaces/IMACI.sol"; +import { AccQueue, AccQueueQuinaryMaci } from "./trees/AccQueue.sol"; +import { TopupCredit } from "./TopupCredit.sol"; +import { Params } from "./utilities/Params.sol"; +import { DomainObjs } from "./utilities/DomainObjs.sol"; +import { VkRegistry } from "./VkRegistry.sol"; +import { Poll } from "./Poll.sol"; + +import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; + +/// @title PollFactory +/// @notice A factory contract which deploys Poll contracts. It allows the MACI contract +/// size to stay within the limit set by EIP-170. +contract PollFactory is Params, DomainObjs, Ownable { + // The number of children each node in the message tree has + uint256 public constant TREE_ARITY = 5; + // custom error + error InvalidMaxValues(); + + /// @notice Deploy a new Poll contract and AccQueue contract for messages. + /// @param _duration The duration of the poll + /// @param _maxValues The max values for the poll + /// @param _treeDepths The depths of the merkle trees + /// @param _batchSizes The batch sizes for processing + /// @param _coordinatorPubKey The coordinator's public key + /// @param _vkRegistry The vkRegistry contract + /// @param _maci The MACI contract interface reference + /// @param _topupCredit The TopupCredit contract + /// @param _pollOwner The owner of the poll + /// @return poll The deployed Poll contract + function deploy( + uint256 _duration, + MaxValues memory _maxValues, + TreeDepths memory _treeDepths, + BatchSizes memory _batchSizes, + PubKey memory _coordinatorPubKey, + VkRegistry _vkRegistry, + IMACI _maci, + TopupCredit _topupCredit, + address _pollOwner + ) public onlyOwner returns (Poll poll) { + /// @notice Validate _maxValues + /// maxVoteOptions must be less than 2 ** 50 due to circuit limitations; + /// it will be packed as a 50-bit value along with other values as one + /// of the inputs (aka packedVal) + if ( + _maxValues.maxMessages > TREE_ARITY ** uint256(_treeDepths.messageTreeDepth) || + _maxValues.maxMessages < _batchSizes.messageBatchSize || + _maxValues.maxMessages % _batchSizes.messageBatchSize != 0 || + _maxValues.maxVoteOptions > TREE_ARITY ** uint256(_treeDepths.voteOptionTreeDepth) || + _maxValues.maxVoteOptions >= (2 ** 50) + ) { + revert InvalidMaxValues(); + } + + /// @notice deploy a new AccQueue contract to store messages + AccQueue messageAq = new AccQueueQuinaryMaci(_treeDepths.messageTreeSubDepth); + + /// @notice the smart contracts that a Poll would interact with + ExtContracts memory extContracts = ExtContracts({ + vkRegistry: _vkRegistry, + maci: _maci, + messageAq: messageAq, + topupCredit: _topupCredit + }); + + // deploy the poll + poll = new Poll(_duration, _maxValues, _treeDepths, _batchSizes, _coordinatorPubKey, extContracts); + + // Make the Poll contract own the messageAq contract, so only it can + // run enqueue/merge + messageAq.transferOwnership(address(poll)); + + // init Poll + poll.init(); + + // TODO: should this be _maci.owner() instead? + poll.transferOwnership(_pollOwner); + + return poll; + } +} diff --git a/contracts/contracts/SignUpToken.sol b/contracts/contracts/SignUpToken.sol index 6694015f8b..48b0fad8c4 100644 --- a/contracts/contracts/SignUpToken.sol +++ b/contracts/contracts/SignUpToken.sol @@ -4,10 +4,16 @@ pragma solidity ^0.8.10; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; +/// @title SignUpToken +/// @notice This contract is an ERC721 token contract which +/// can be used to allow users to sign up for a poll. contract SignUpToken is ERC721, Ownable { + /// @notice The constructor which calls the ERC721 constructor constructor() ERC721("SignUpToken", "SignUpToken") {} - // Gives an ERC721 token to an address + /// @notice Gives an ERC721 token to an address + /// @param to The address to give the token to + /// @param curTokenId The token id to give function giveToken(address to, uint256 curTokenId) public onlyOwner { _mint(to, curTokenId); } diff --git a/contracts/contracts/Subsidy.sol b/contracts/contracts/Subsidy.sol index 3c4423404c..77443e1018 100644 --- a/contracts/contracts/Subsidy.sol +++ b/contracts/contracts/Subsidy.sol @@ -1,16 +1,20 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import { IMACI } from "./IMACI.sol"; +import { IMACI } from "./interfaces/IMACI.sol"; import { MessageProcessor } from "./MessageProcessor.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Poll } from "./Poll.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { Hasher } from "./crypto/Hasher.sol"; -import { CommonUtilities } from "./utilities/Utility.sol"; +import { CommonUtilities } from "./utilities/Utilities.sol"; import { Verifier } from "./crypto/Verifier.sol"; import { VkRegistry } from "./VkRegistry.sol"; +/// @title Subsidy +/// @notice This contract is used to verify that the subsidy calculations +/// are correct. It is also used to update the subsidy commitment if the +/// proof is valid. contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { uint256 public rbi; // row batch index uint256 public cbi; // column batch index @@ -31,10 +35,15 @@ contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { Verifier public verifier; + /// @notice Create a new Subsidy contract + /// @param _verifier The Verifier contract constructor(Verifier _verifier) { verifier = _verifier; } + /// @notice Update the currentSbCommitment if the proof is valid. + /// @dev currentSbCommitment is the commitment to the state and ballot roots + /// @param _mp The MessageProcessor contract function updateSbCommitment(MessageProcessor _mp) public onlyOwner { // Require that all messages have been processed if (!_mp.processingComplete()) { @@ -45,26 +54,38 @@ contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { } } - function genSubsidyPackedVals(uint256 _numSignUps) public view returns (uint256) { + /// @notice Generate the packed values for the subsidy proof + /// @param _numSignUps The number of signups + /// @return result The packed values + function genSubsidyPackedVals(uint256 _numSignUps) public view returns (uint256 result) { if (_numSignUps >= 2 ** 50) revert NumSignUpsTooLarge(); if (rbi >= 2 ** 50) revert RbiTooLarge(); if (cbi >= 2 ** 50) revert CbiTooLarge(); - uint256 result = (_numSignUps << 100) + (rbi << 50) + cbi; - - return result; + result = (_numSignUps << 100) + (rbi << 50) + cbi; } - function genSubsidyPublicInputHash(uint256 _numSignUps, uint256 _newSubsidyCommitment) public view returns (uint256) { + /// @notice Generate the public input hash for the subsidy proof + /// @param _numSignUps The number of signups + /// @param _newSubsidyCommitment The new subsidy commitment + /// @return inputHash The public input hash + function genSubsidyPublicInputHash( + uint256 _numSignUps, + uint256 _newSubsidyCommitment + ) public view returns (uint256 inputHash) { uint256 packedVals = genSubsidyPackedVals(_numSignUps); uint256[] memory input = new uint256[](4); input[0] = packedVals; input[1] = sbCommitment; input[2] = subsidyCommitment; input[3] = _newSubsidyCommitment; - uint256 inputHash = sha256Hash(input); - return inputHash; + inputHash = sha256Hash(input); } + /// @notice Update the subsidy commitment if the proof is valid + /// @param _poll The Poll contract + /// @param _mp The MessageProcessor contract + /// @param _newSubsidyCommitment The new subsidy commitment + /// @param _proof The proof function updateSubsidy( Poll _poll, MessageProcessor _mp, @@ -94,12 +115,12 @@ contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { increaseSubsidyIndex(subsidyBatchSize, numLeaves); } - /// @notice increase subsidy batch index (rbi, cbi) to next, + /// @notice Increase the subsidy batch index (rbi, cbi) to next, /// it will try to cbi++ if the whole batch can fit into numLeaves - /// otherwise it will increase row index: rbi++ - /// @param batchSize: the size of 1 dimensional batch over the signup users, - /// @notice each batch for subsidy calculation is 2 dimenional: batchSize*batchSize - /// @param numLeaves: total number of leaves in stateTree, i.e. number of signup users + /// otherwise it will increase row index: rbi++. + /// Each batch for subsidy calculation is 2 dimensional: batchSize*batchSize + /// @param batchSize the size of 1 dimensional batch over the signup users + /// @param numLeaves total number of leaves in stateTree, i.e. number of signup users function increaseSubsidyIndex(uint256 batchSize, uint256 numLeaves) internal { if (cbi * batchSize + batchSize < numLeaves) { cbi++; @@ -109,12 +130,18 @@ contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { } } + /// @notice Verify the subsidy proof using the Groth16 on chain verifier + /// @param _poll The Poll contract + /// @param _proof The proof + /// @param _numSignUps The number of signups + /// @param _newSubsidyCommitment The new subsidy commitment + /// @return isValid True if the proof is valid function verifySubsidyProof( Poll _poll, uint256[8] memory _proof, uint256 _numSignUps, uint256 _newSubsidyCommitment - ) public view returns (bool) { + ) public view returns (bool isValid) { (uint8 intStateTreeDepth, , , uint8 voteOptionTreeDepth) = _poll.treeDepths(); (VkRegistry vkRegistry, IMACI maci, , ) = _poll.extContracts(); @@ -129,6 +156,6 @@ contract Subsidy is Ownable, CommonUtilities, Hasher, SnarkCommon { uint256 publicInputHash = genSubsidyPublicInputHash(_numSignUps, _newSubsidyCommitment); // Verify the proof - return verifier.verify(_proof, vk, publicInputHash); + isValid = verifier.verify(_proof, vk, publicInputHash); } } diff --git a/contracts/contracts/Tally.sol b/contracts/contracts/Tally.sol index 2aca8dc5df..4d6e4a46f2 100644 --- a/contracts/contracts/Tally.sol +++ b/contracts/contracts/Tally.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.10; import { AccQueue } from "./trees/AccQueue.sol"; -import { IMACI } from "./IMACI.sol"; +import { IMACI } from "./interfaces/IMACI.sol"; import { Hasher } from "./crypto/Hasher.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Poll } from "./Poll.sol"; @@ -10,9 +10,11 @@ import { MessageProcessor } from "./MessageProcessor.sol"; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; import { Verifier } from "./crypto/Verifier.sol"; import { VkRegistry } from "./VkRegistry.sol"; -import { CommonUtilities } from "./utilities/Utility.sol"; +import { CommonUtilities } from "./utilities/Utilities.sol"; /// @title Tally +/// @notice The Tally contract is used during votes tallying +/// and by users to verify the tally results. contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { // custom errors error ProcessingNotComplete(); @@ -53,19 +55,17 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { /// @param _numSignUps: number of signups /// @param _batchStartIndex: the start index of given batch /// @param _tallyBatchSize: size of batch - /// @return an uint256 representing 3 inputs together + /// @return result an uint256 representing the 3 inputs packed together function genTallyVotesPackedVals( uint256 _numSignUps, uint256 _batchStartIndex, uint256 _tallyBatchSize - ) public pure returns (uint256) { + ) public pure returns (uint256 result) { if (_numSignUps >= 2 ** 50) revert NumSignUpsTooLarge(); if (_batchStartIndex >= 2 ** 50) revert BatchStartIndexTooLarge(); if (_tallyBatchSize >= 2 ** 50) revert TallyBatchSizeTooLarge(); - uint256 result = (_batchStartIndex / _tallyBatchSize) + (_numSignUps << uint256(50)); - - return result; + result = (_batchStartIndex / _tallyBatchSize) + (_numSignUps << uint256(50)); } /// @notice generate hash of public inputs for tally circuit @@ -73,23 +73,24 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { /// @param _batchStartIndex: the start index of given batch /// @param _tallyBatchSize: size of batch /// @param _newTallyCommitment: the new tally commitment to be updated - /// @return hash of public inputs + /// @return inputHash hash of public inputs function genTallyVotesPublicInputHash( uint256 _numSignUps, uint256 _batchStartIndex, uint256 _tallyBatchSize, uint256 _newTallyCommitment - ) public view returns (uint256) { + ) public view returns (uint256 inputHash) { uint256 packedVals = genTallyVotesPackedVals(_numSignUps, _batchStartIndex, _tallyBatchSize); uint256[] memory input = new uint256[](4); input[0] = packedVals; input[1] = sbCommitment; input[2] = tallyCommitment; input[3] = _newTallyCommitment; - uint256 inputHash = sha256Hash(input); - return inputHash; + inputHash = sha256Hash(input); } + /// @notice Update the state and ballot root commitment + /// @param _mp the address of the MessageProcessor contract function updateSbCommitment(MessageProcessor _mp) public onlyOwner { // Require that all messages have been processed if (!_mp.processingComplete()) { @@ -100,6 +101,11 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { } } + /// @notice Verify the result of a tally batch + /// @param _poll contract address of the poll proof to be verified + /// @param _mp the address of the MessageProcessor contract + /// @param _newTallyCommitment the new tally commitment to be verified + /// @param _proof the proof generated after tallying this batch function tallyVotes( Poll _poll, MessageProcessor _mp, @@ -128,14 +134,14 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { tallyBatchNum++; } - /// @notice Verify the tally proof using the verifiying key + /// @notice Verify the tally proof using the verifying key /// @param _poll contract address of the poll proof to be verified /// @param _proof the proof generated after processing all messages /// @param _numSignUps number of signups for a given poll /// @param _batchStartIndex the number of batches multiplied by the size of the batch /// @param _tallyBatchSize batch size for the tally /// @param _newTallyCommitment the tally commitment to be verified at a given batch index - /// @return valid a boolean representing successful verification + /// @return isValid whether the proof is valid function verifyTallyProof( Poll _poll, uint256[8] memory _proof, @@ -143,7 +149,7 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { uint256 _batchStartIndex, uint256 _tallyBatchSize, uint256 _newTallyCommitment - ) public view returns (bool) { + ) public view returns (bool isValid) { (uint8 intStateTreeDepth, , , uint8 voteOptionTreeDepth) = _poll.treeDepths(); (VkRegistry vkRegistry, IMACI maci, , ) = _poll.extContracts(); @@ -160,17 +166,24 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { ); // Verify the proof - return verifier.verify(_proof, vk, publicInputHash); + isValid = verifier.verify(_proof, vk, publicInputHash); } + /// @notice Compute the merkle root from the path elements + /// and a leaf + /// @param _depth the depth of the merkle tree + /// @param _index the index of the leaf + /// @param _leaf the leaf + /// @param _pathElements the path elements to reconstruct the merkle root + /// @return current The merkle root function computeMerkleRootFromPath( uint8 _depth, uint256 _index, uint256 _leaf, uint256[][] memory _pathElements - ) internal pure returns (uint256) { + ) internal pure returns (uint256 current) { uint256 pos = _index % LEAVES_PER_NODE; - uint256 current = _leaf; + current = _leaf; uint8 k; uint256[LEAVES_PER_NODE] memory level; @@ -193,42 +206,38 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { pos = _index % LEAVES_PER_NODE; current = hash5(level); } - return current; } - /** - * @notice Verify the number of spent voice credits from the tally.json - * @param _totalSpent spent field retrieved in the totalSpentVoiceCredits object - * @param _totalSpentSalt the corresponding salt in the totalSpentVoiceCredit object - * @param _resultCommitment hashLeftRight(merkle root of the results.tally, results.salt) in tally.json file - * @param _perVOSpentVoiceCreditsHash hashLeftRight(merkle root of the no spent voice credits per vote option, perVOSpentVoiceCredits salt) - * @return a boolean representing the status of the verification (could be either true or false) - */ + /// @notice Verify the number of spent voice credits from the tally.json + /// @param _totalSpent spent field retrieved in the totalSpentVoiceCredits object + /// @param _totalSpentSalt the corresponding salt in the totalSpentVoiceCredit object + /// @param _resultCommitment hashLeftRight(merkle root of the results.tally, results.salt) in tally.json file + /// @param _perVOSpentVoiceCreditsHash hashLeftRight(merkle root of the no spent voice credits per vote option, perVOSpentVoiceCredits salt) + /// @return isValid Whether the provided values are valid function verifySpentVoiceCredits( uint256 _totalSpent, uint256 _totalSpentSalt, uint256 _resultCommitment, uint256 _perVOSpentVoiceCreditsHash - ) public view returns (bool) { + ) public view returns (bool isValid) { uint256[3] memory tally; tally[0] = _resultCommitment; tally[1] = hashLeftRight(_totalSpent, _totalSpentSalt); tally[2] = _perVOSpentVoiceCreditsHash; - return hash3(tally) == tallyCommitment; + isValid = hash3(tally) == tallyCommitment; } - /** - * @notice Verify the number of spent voice credits per vote option from the tally.json - * @param _voteOptionIndex the index of the vote option where credits were spent - * @param _spent the spent voice credits for a given vote option index - * @param _spentProof proof generated for the perVOSpentVoiceCredits - * @param _spentSalt the corresponding salt given in the tally perVOSpentVoiceCredits object - * @param _voteOptionTreeDepth depth of the vote option tree - * @param _spentVoiceCreditsHash hashLeftRight(number of spent voice credits, spent salt) - * @param _resultCommitment hashLeftRight(merkle root of the results.tally, results.salt) in tally.json file - * @return a boolean representing the status of the verification (could be either true or false) - */ + /// @notice Verify the number of spent voice credits per vote option from the tally.json + /// @param _voteOptionIndex the index of the vote option where credits were spent + /// @param _spent the spent voice credits for a given vote option index + /// @param _spentProof proof generated for the perVOSpentVoiceCredits + /// @param _spentSalt the corresponding salt given in the tally perVOSpentVoiceCredits object + /// @param _voteOptionTreeDepth depth of the vote option tree + /// @param _spentVoiceCreditsHash hashLeftRight(number of spent voice credits, spent salt) + /// @param _resultCommitment hashLeftRight(merkle root of the results.tally, results.salt) + // in the tally.json file + /// @return isValid Whether the provided proof is valid function verifyPerVOSpentVoiceCredits( uint256 _voteOptionIndex, uint256 _spent, @@ -237,7 +246,7 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { uint8 _voteOptionTreeDepth, uint256 _spentVoiceCreditsHash, uint256 _resultCommitment - ) public view returns (bool) { + ) public view returns (bool isValid) { uint256 computedRoot = computeMerkleRootFromPath(_voteOptionTreeDepth, _voteOptionIndex, _spent, _spentProof); uint256[3] memory tally; @@ -245,20 +254,19 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { tally[1] = _spentVoiceCreditsHash; tally[2] = hashLeftRight(computedRoot, _spentSalt); - return hash3(tally) == tallyCommitment; + isValid = hash3(tally) == tallyCommitment; } - /** - * @notice Verify the result generated from the tally.json - * @param _voteOptionIndex the index of the vote option to verify the correctness of the tally - * @param _tallyResult Flattened array of the tally - * @param _tallyResultProof Corresponding proof of the tally result - * @param _tallyResultSalt the respective salt in the results object in the tally.json - * @param _voteOptionTreeDepth depth of the vote option tree - * @param _spentVoiceCreditsHash hashLeftRight(number of spent voice credits, spent salt) - * @param _perVOSpentVoiceCreditsHash hashLeftRight(merkle root of the no spent voice credits per vote option, perVOSpentVoiceCredits salt) - * @return a boolean representing the status of the verification (could be either true or false) - */ + /// @notice Verify the result generated from the tally.json + /// @param _voteOptionIndex the index of the vote option to verify the correctness of the tally + /// @param _tallyResult Flattened array of the tally + /// @param _tallyResultProof Corresponding proof of the tally result + /// @param _tallyResultSalt the respective salt in the results object in the tally.json + /// @param _voteOptionTreeDepth depth of the vote option tree + /// @param _spentVoiceCreditsHash hashLeftRight(number of spent voice credits, spent salt) + /// @param _perVOSpentVoiceCreditsHash hashLeftRight(merkle root of the no spent voice + /// credits per vote option, perVOSpentVoiceCredits salt) + /// @return isValid Whether the provided proof is valid function verifyTallyResult( uint256 _voteOptionIndex, uint256 _tallyResult, @@ -267,7 +275,7 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { uint8 _voteOptionTreeDepth, uint256 _spentVoiceCreditsHash, uint256 _perVOSpentVoiceCreditsHash - ) public view returns (bool) { + ) public view returns (bool isValid) { uint256 computedRoot = computeMerkleRootFromPath( _voteOptionTreeDepth, _voteOptionIndex, @@ -280,6 +288,6 @@ contract Tally is Ownable, SnarkCommon, CommonUtilities, Hasher { tally[1] = _spentVoiceCreditsHash; tally[2] = _perVOSpentVoiceCreditsHash; - return hash3(tally) == tallyCommitment; + isValid = hash3(tally) == tallyCommitment; } } diff --git a/contracts/contracts/TopupCredit.sol b/contracts/contracts/TopupCredit.sol index 8519339a00..b2a40577a3 100644 --- a/contracts/contracts/TopupCredit.sol +++ b/contracts/contracts/TopupCredit.sol @@ -4,21 +4,26 @@ pragma solidity ^0.8.10; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; +/// @title TopupCredit +/// @notice A contract representing a token used to topup a MACI's voter +/// credits contract TopupCredit is ERC20, Ownable { - uint8 private constant _decimals = 1; + uint8 public constant _decimals = 1; uint256 public constant MAXIMUM_AIRDROP_AMOUNT = 100000 * 10 ** _decimals; + /// @notice create a new TopupCredit token constructor() ERC20("TopupCredit", "TopupCredit") {} - function decimals() public pure override returns (uint8) { - return _decimals; - } - + /// @notice mint tokens to an account + /// @param account the account to mint tokens to + /// @param amount the amount of tokens to mint function airdropTo(address account, uint256 amount) public onlyOwner { require(amount < MAXIMUM_AIRDROP_AMOUNT); _mint(account, amount); } + /// @notice mint tokens to the contract owner + /// @param amount the amount of tokens to mint function airdrop(uint256 amount) public onlyOwner { require(amount < MAXIMUM_AIRDROP_AMOUNT, "amount exceed maximum limit"); _mint(msg.sender, amount); diff --git a/contracts/contracts/VkRegistry.sol b/contracts/contracts/VkRegistry.sol index 69cb3715a2..1ab6176415 100644 --- a/contracts/contracts/VkRegistry.sol +++ b/contracts/contracts/VkRegistry.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.10; import { SnarkCommon } from "./crypto/SnarkCommon.sol"; + import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; /// @title VkRegistry @@ -29,43 +30,76 @@ contract VkRegistry is Ownable, SnarkCommon { error TallyVkNotSet(); error SubsidyVkNotSet(); - function isProcessVkSet(uint256 _sig) public view returns (bool) { - return processVkSet[_sig]; + /// @notice Check if the process verifying key is set + /// @param _sig The signature + /// @return isSet whether the verifying key is set + function isProcessVkSet(uint256 _sig) public view returns (bool isSet) { + isSet = processVkSet[_sig]; } - function isTallyVkSet(uint256 _sig) public view returns (bool) { - return tallyVkSet[_sig]; + /// @notice Check if the tally verifying key is set + /// @param _sig The signature + /// @return isSet whether the verifying key is set + function isTallyVkSet(uint256 _sig) public view returns (bool isSet) { + isSet = tallyVkSet[_sig]; } - function isSubsidyVkSet(uint256 _sig) public view returns (bool) { - return subsidyVkSet[_sig]; + /// @notice Check if the subsidy verifying key is set + /// @param _sig The signature + /// @return isSet whether the verifying key is set + function isSubsidyVkSet(uint256 _sig) public view returns (bool isSet) { + isSet = subsidyVkSet[_sig]; } + /// @notice generate the signature for the process verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _messageTreeDepth The message tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @param _messageBatchSize The message batch size function genProcessVkSig( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize - ) public pure returns (uint256) { - return (_messageBatchSize << 192) + (_stateTreeDepth << 128) + (_messageTreeDepth << 64) + _voteOptionTreeDepth; + ) public pure returns (uint256 sig) { + sig = (_messageBatchSize << 192) + (_stateTreeDepth << 128) + (_messageTreeDepth << 64) + _voteOptionTreeDepth; } + /// @notice generate the signature for the tally verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return sig The signature function genTallyVkSig( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public pure returns (uint256) { - return (_stateTreeDepth << 128) + (_intStateTreeDepth << 64) + _voteOptionTreeDepth; + ) public pure returns (uint256 sig) { + sig = (_stateTreeDepth << 128) + (_intStateTreeDepth << 64) + _voteOptionTreeDepth; } + /// @notice generate the signature for the subsidy verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return sig The signature function genSubsidyVkSig( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public pure returns (uint256) { - return (_stateTreeDepth << 128) + (_intStateTreeDepth << 64) + _voteOptionTreeDepth; + ) public pure returns (uint256 sig) { + sig = (_stateTreeDepth << 128) + (_intStateTreeDepth << 64) + _voteOptionTreeDepth; } + /// @notice Set the process and tally verifying keys for a certain combination + /// of parameters + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _messageTreeDepth The message tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @param _messageBatchSize The message batch size + /// @param _processVk The process verifying key + /// @param _tallyVk The tally verifying key function setVerifyingKeys( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, @@ -108,6 +142,12 @@ contract VkRegistry is Ownable, SnarkCommon { emit ProcessVkSet(processVkSig); } + /// @notice Set the process verifying key for a certain combination + /// of parameters + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @param _subsidyVk The verifying key function setSubsidyKeys( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, @@ -131,82 +171,123 @@ contract VkRegistry is Ownable, SnarkCommon { emit SubsidyVkSet(subsidyVkSig); } + /// @notice Check if the process verifying key is set + /// @param _stateTreeDepth The state tree depth + /// @param _messageTreeDepth The message tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @param _messageBatchSize The message batch size + /// @return isSet whether the verifying key is set function hasProcessVk( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize - ) public view returns (bool) { + ) public view returns (bool isSet) { uint256 sig = genProcessVkSig(_stateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize); - return processVkSet[sig]; + isSet = processVkSet[sig]; } - function getProcessVkBySig(uint256 _sig) public view returns (VerifyingKey memory) { + /// @notice Get the process verifying key by signature + /// @param _sig The signature + /// @return vk The verifying key + function getProcessVkBySig(uint256 _sig) public view returns (VerifyingKey memory vk) { if (!processVkSet[_sig]) revert ProcessVkNotSet(); - return processVks[_sig]; + vk = processVks[_sig]; } + /// @notice Get the process verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _messageTreeDepth The message tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @param _messageBatchSize The message batch size + /// @return vk The verifying key function getProcessVk( uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize - ) public view returns (VerifyingKey memory) { + ) public view returns (VerifyingKey memory vk) { uint256 sig = genProcessVkSig(_stateTreeDepth, _messageTreeDepth, _voteOptionTreeDepth, _messageBatchSize); - return getProcessVkBySig(sig); + vk = getProcessVkBySig(sig); } + /// @notice Check if the tally verifying key is set + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return isSet whether the verifying key is set function hasTallyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public view returns (bool) { + ) public view returns (bool isSet) { uint256 sig = genTallyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); - return tallyVkSet[sig]; + isSet = tallyVkSet[sig]; } - function getTallyVkBySig(uint256 _sig) public view returns (VerifyingKey memory) { + /// @notice Get the tally verifying key by signature + /// @param _sig The signature + /// @return vk The verifying key + function getTallyVkBySig(uint256 _sig) public view returns (VerifyingKey memory vk) { if (!tallyVkSet[_sig]) revert TallyVkNotSet(); - return tallyVks[_sig]; + vk = tallyVks[_sig]; } + /// @notice Get the tally verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return vk The verifying key function getTallyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public view returns (VerifyingKey memory) { + ) public view returns (VerifyingKey memory vk) { uint256 sig = genTallyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); - return getTallyVkBySig(sig); + vk = getTallyVkBySig(sig); } + /// @notice Check if the subsidy verifying key is set + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return isSet whether the verifying key is set function hasSubsidyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public view returns (bool) { + ) public view returns (bool isSet) { uint256 sig = genSubsidyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); - return subsidyVkSet[sig]; + isSet = subsidyVkSet[sig]; } - function getSubsidyVkBySig(uint256 _sig) public view returns (VerifyingKey memory) { + /// @notice Get the subsidy verifying key by signature + /// @param _sig The signature + /// @return vk The verifying key + function getSubsidyVkBySig(uint256 _sig) public view returns (VerifyingKey memory vk) { if (!subsidyVkSet[_sig]) revert SubsidyVkNotSet(); - return subsidyVks[_sig]; + vk = subsidyVks[_sig]; } + /// @notice Get the subsidy verifying key + /// @param _stateTreeDepth The state tree depth + /// @param _intStateTreeDepth The intermediate state tree depth + /// @param _voteOptionTreeDepth The vote option tree depth + /// @return vk The verifying key function getSubsidyVk( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth - ) public view returns (VerifyingKey memory) { + ) public view returns (VerifyingKey memory vk) { uint256 sig = genSubsidyVkSig(_stateTreeDepth, _intStateTreeDepth, _voteOptionTreeDepth); - return getSubsidyVkBySig(sig); + vk = getSubsidyVkBySig(sig); } } diff --git a/contracts/contracts/benchmarks/HasherBenchmarks.sol b/contracts/contracts/benchmarks/HasherBenchmarks.sol new file mode 100644 index 0000000000..7ceedc1a05 --- /dev/null +++ b/contracts/contracts/benchmarks/HasherBenchmarks.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import { Hasher } from "../crypto/Hasher.sol"; + +/// @title HasherBenchmarks +/// @notice A contract used to benchmark the poseidon hash function +contract HasherBenchmarks is Hasher { + /// @notice Benchmark the poseidon hash function with 5 inputs + /// @param array The array of inputs to hash + /// @return result The hash of the inputs + function hash5Benchmark(uint256[5] memory array) public returns (uint256 result) { + result = hash5(array); + } + + /// @notice Benchmark the poseidon hash function with 2 inputs + /// @param _left The left input to hash + /// @param _right The right input to hash + /// @return result The hash of the two inputs + function hashLeftRightBenchmark(uint256 _left, uint256 _right) public returns (uint256 result) { + result = hashLeftRight(_left, _right); + } +} diff --git a/contracts/contracts/crypto/Hasher.sol b/contracts/contracts/crypto/Hasher.sol index d9ee1f8e57..47bf831824 100644 --- a/contracts/contracts/crypto/Hasher.sol +++ b/contracts/contracts/crypto/Hasher.sol @@ -3,18 +3,22 @@ pragma solidity ^0.8.10; import { SnarkConstants } from "./SnarkConstants.sol"; +/// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT3 { function poseidon(uint256[2] memory input) public pure returns (uint256) {} } +/// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT4 { function poseidon(uint256[3] memory input) public pure returns (uint256) {} } +/// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT5 { function poseidon(uint256[4] memory input) public pure returns (uint256) {} } +/// @notice A library which provides functions for computing Pedersen hashes. library PoseidonT6 { function poseidon(uint256[5] memory input) public pure returns (uint256) {} } @@ -22,30 +26,49 @@ library PoseidonT6 { /// @notice A SHA256 hash function for any number of input elements, and Poseidon hash /// functions for 2, 3, 4, 5, and 12 input elements. contract Hasher is SnarkConstants { - function sha256Hash(uint256[] memory array) public pure returns (uint256) { - return uint256(sha256(abi.encodePacked(array))) % SNARK_SCALAR_FIELD; + /// @notice Computes the SHA256 hash of an array of uint256 elements. + /// @param array The array of uint256 elements. + /// @return result The SHA256 hash of the array. + function sha256Hash(uint256[] memory array) public pure returns (uint256 result) { + result = uint256(sha256(abi.encodePacked(array))) % SNARK_SCALAR_FIELD; } - function hash2(uint256[2] memory array) public pure returns (uint256) { - return PoseidonT3.poseidon(array); + /// @notice Computes the Poseidon hash of two uint256 elements. + /// @param array An array of two uint256 elements. + /// @return result The Poseidon hash of the two elements. + function hash2(uint256[2] memory array) public pure returns (uint256 result) { + result = PoseidonT3.poseidon(array); } - function hash3(uint256[3] memory array) public pure returns (uint256) { - return PoseidonT4.poseidon(array); + /// @notice Computes the Poseidon hash of three uint256 elements. + /// @param array An array of three uint256 elements. + /// @return result The Poseidon hash of the three elements. + function hash3(uint256[3] memory array) public pure returns (uint256 result) { + result = PoseidonT4.poseidon(array); } - function hash4(uint256[4] memory array) public pure returns (uint256) { - return PoseidonT5.poseidon(array); + /// @notice Computes the Poseidon hash of four uint256 elements. + /// @param array An array of four uint256 elements. + /// @return result The Poseidon hash of the four elements. + function hash4(uint256[4] memory array) public pure returns (uint256 result) { + result = PoseidonT5.poseidon(array); } - function hash5(uint256[5] memory array) public pure returns (uint256) { - return PoseidonT6.poseidon(array); + /// @notice Computes the Poseidon hash of five uint256 elements. + /// @param array An array of five uint256 elements. + /// @return result The Poseidon hash of the five elements. + function hash5(uint256[5] memory array) public pure returns (uint256 result) { + result = PoseidonT6.poseidon(array); } - function hashLeftRight(uint256 _left, uint256 _right) public pure returns (uint256) { + /// @notice Computes the Poseidon hash of two uint256 elements. + /// @param left the first element to hash. + /// @param right the second element to hash. + /// @return result The Poseidon hash of the two elements. + function hashLeftRight(uint256 left, uint256 right) public pure returns (uint256 result) { uint256[2] memory input; - input[0] = _left; - input[1] = _right; - return hash2(input); + input[0] = left; + input[1] = right; + result = hash2(input); } } diff --git a/contracts/contracts/crypto/Pairing.sol b/contracts/contracts/crypto/Pairing.sol index 0a814ff38a..1e318ae7eb 100644 --- a/contracts/contracts/crypto/Pairing.sol +++ b/contracts/contracts/crypto/Pairing.sol @@ -20,6 +20,8 @@ pragma solidity ^0.8.10; +/// @title Pairing +/// @notice A library implementing the alt_bn128 elliptic curve operations. library Pairing { uint256 constant PRIME_Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; @@ -44,7 +46,7 @@ library Pairing { } } - /// @notice Returns the sum of two points of G1 + /// @notice r Returns the sum of two points of G1. function plus(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) { uint256[4] memory input; input[0] = p1.x; @@ -66,7 +68,7 @@ library Pairing { require(success, "pairing-add-failed"); } - /// @notice Return te product of a point on G1 and a scalar, i.e. + /// @notice r Return the product of a point on G1 and a scalar, i.e. /// p == p.scalar_mul(1) and p.plus(p) == p.scalar_mul(2) for all /// points p. function scalar_mul(G1Point memory p, uint256 s) internal view returns (G1Point memory r) { @@ -87,7 +89,7 @@ library Pairing { require(success, "pairing-mul-failed"); } - /// @return The result of computing the pairing check + /// @return isValid The result of computing the pairing check /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1 /// For example, /// pairing([P1(), P1().negate()], [P2(), P2()]) should return true. @@ -100,7 +102,7 @@ library Pairing { G2Point memory c2, G1Point memory d1, G2Point memory d2 - ) internal view returns (bool) { + ) internal view returns (bool isValid) { G1Point[4] memory p1 = [a1, b1, c1, d1]; G2Point[4] memory p2 = [a2, b2, c2, d2]; @@ -132,6 +134,6 @@ library Pairing { require(success, "pairing-opcode-failed"); - return out[0] != 0; + isValid = out[0] != 0; } } diff --git a/contracts/contracts/crypto/SnarkCommon.sol b/contracts/contracts/crypto/SnarkCommon.sol index 768366738c..e63bd8ec5f 100644 --- a/contracts/contracts/crypto/SnarkCommon.sol +++ b/contracts/contracts/crypto/SnarkCommon.sol @@ -2,7 +2,11 @@ pragma solidity ^0.8.10; import { Pairing } from "./Pairing.sol"; +/// @title SnarkCommon +/// @notice a Contract which holds a struct +/// representing a Groth16 verifying key contract SnarkCommon { + /// @notice a struct representing a Groth16 verifying key struct VerifyingKey { Pairing.G1Point alpha1; Pairing.G2Point beta2; diff --git a/contracts/contracts/crypto/SnarkConstants.sol b/contracts/contracts/crypto/SnarkConstants.sol index 7457f5918b..e263121fce 100644 --- a/contracts/contracts/crypto/SnarkConstants.sol +++ b/contracts/contracts/crypto/SnarkConstants.sol @@ -1,23 +1,28 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; +/// @title SnarkConstants +/// @notice This contract contains constants related to the SNARK +/// components of MACI. contract SnarkConstants { - // The scalar field + /// @notice The scalar field uint256 internal constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; - // The public key here is the first Pedersen base - // point from iden3's circomlib implementation of the Pedersen hash. - // Since it is generated using a hash-to-curve function, we are - // confident that no-one knows the private key associated with this - // public key. See: - // https://github.com/iden3/circomlib/blob/d5ed1c3ce4ca137a6b3ca48bec4ac12c1b38957a/src/pedersen_printbases.js - // Its hash should equal - // 6769006970205099520508948723718471724660867171122235270773600567925038008762. + + /// @notice The public key here is the first Pedersen base + /// point from iden3's circomlib implementation of the Pedersen hash. + /// Since it is generated using a hash-to-curve function, we are + /// confident that no-one knows the private key associated with this + /// public key. See: + /// https://github.com/iden3/circomlib/blob/d5ed1c3ce4ca137a6b3ca48bec4ac12c1b38957a/src/pedersen_printbases.js + /// Its hash should equal + /// 6769006970205099520508948723718471724660867171122235270773600567925038008762. uint256 internal constant PAD_PUBKEY_X = 10457101036533406547632367118273992217979173478358440826365724437999023779287; uint256 internal constant PAD_PUBKEY_Y = 19824078218392094440610104313265183977899662750282163392862422243483260492317; - // The Keccack256 hash of 'Maci' + + /// @notice The Keccack256 hash of 'Maci' uint256 internal constant NOTHING_UP_MY_SLEEVE = 8370432830353022751713833565135785980866757267633941821328460903436894336785; } diff --git a/contracts/contracts/crypto/Verifier.sol b/contracts/contracts/crypto/Verifier.sol index 44a91d2f37..72ca7f3d60 100644 --- a/contracts/contracts/crypto/Verifier.sol +++ b/contracts/contracts/crypto/Verifier.sol @@ -5,18 +5,32 @@ import { Pairing } from "./Pairing.sol"; import { SnarkConstants } from "./SnarkConstants.sol"; import { SnarkCommon } from "./SnarkCommon.sol"; +/// @title IVerifier +/// @notice an interface for a Groth16 verifier contract abstract contract IVerifier is SnarkCommon { + /// @notice Verify a zk-SNARK proof function verify(uint256[8] memory, VerifyingKey memory, uint256) public view virtual returns (bool); } +/// @title MockVerifier +/// @notice a MockVerifier to be used for testing contract MockVerifier is IVerifier, SnarkConstants { - bool result = true; - - function verify(uint256[8] memory, VerifyingKey memory, uint256) public view override returns (bool) { - return result; + /// @notice Verify a zk-SNARK proof (test only return always true) + /// @param proof The proof + /// @param vk The verifying key + /// @param input The public inputs to the circuit + /// @return result Whether the proof is valid given the verifying key and public + function verify( + uint256[8] memory proof, + VerifyingKey memory vk, + uint256 input + ) public view override returns (bool result) { + result = true; } } +/// @title Verifier +/// @notice a Groth16 verifier contract contract Verifier is IVerifier, SnarkConstants { struct Proof { Pairing.G1Point a; @@ -30,11 +44,19 @@ contract Verifier is IVerifier, SnarkConstants { string constant ERROR_PROOF_Q = "VE1"; string constant ERROR_INPUT_VAL = "VE2"; - /// @return Whether the proof is valid given the verifying key and public + /// @notice Verify a zk-SNARK proof + /// @param _proof The proof + /// @param vk The verifying key + /// @param input The public inputs to the circuit + /// @return isValid Whether the proof is valid given the verifying key and public /// input. Note that this function only supports one public input. /// Refer to the Semaphore source code for a verifier that supports /// multiple public inputs. - function verify(uint256[8] memory _proof, VerifyingKey memory vk, uint256 input) public view override returns (bool) { + function verify( + uint256[8] memory _proof, + VerifyingKey memory vk, + uint256 input + ) public view override returns (bool isValid) { Proof memory proof; proof.a = Pairing.G1Point(_proof[0], _proof[1]); proof.b = Pairing.G2Point([_proof[2], _proof[3]], [_proof[4], _proof[5]]); @@ -63,6 +85,15 @@ contract Verifier is IVerifier, SnarkConstants { vk_x = Pairing.plus(vk_x, vk.ic[0]); - return Pairing.pairing(Pairing.negate(proof.a), proof.b, vk.alpha1, vk.beta2, vk_x, vk.gamma2, proof.c, vk.delta2); + isValid = Pairing.pairing( + Pairing.negate(proof.a), + proof.b, + vk.alpha1, + vk.beta2, + vk_x, + vk.gamma2, + proof.c, + vk.delta2 + ); } } diff --git a/contracts/contracts/gatekeepers/FreeForAllSignUpGatekeeper.sol b/contracts/contracts/gatekeepers/FreeForAllSignUpGatekeeper.sol index 99e07f205c..02b33d4805 100644 --- a/contracts/contracts/gatekeepers/FreeForAllSignUpGatekeeper.sol +++ b/contracts/contracts/gatekeepers/FreeForAllSignUpGatekeeper.sol @@ -4,9 +4,15 @@ pragma solidity ^0.8.10; import { SignUpGatekeeper } from "./SignUpGatekeeper.sol"; import { MACI } from "../MACI.sol"; +/// @title FreeForAllGatekeeper +/// @notice A SignUpGatekeeper which allows anyone to sign up. contract FreeForAllGatekeeper is SignUpGatekeeper { + /// @notice setMaciInstance does nothing in this gatekeeper + /// @param _maci The MACI contract function setMaciInstance(MACI _maci) public override {} /// @notice Registers the user without any restrictions. - function register(address, bytes memory) public override {} + /// @param _address The address of the user + /// @param _data memory additional data + function register(address _address, bytes memory _data) public override {} } diff --git a/contracts/contracts/gatekeepers/SignUpGatekeeper.sol b/contracts/contracts/gatekeepers/SignUpGatekeeper.sol index 54de8dac5c..97788711b3 100644 --- a/contracts/contracts/gatekeepers/SignUpGatekeeper.sol +++ b/contracts/contracts/gatekeepers/SignUpGatekeeper.sol @@ -3,8 +3,14 @@ pragma solidity ^0.8.10; import { MACI } from "../MACI.sol"; +/// @title SignUpGatekeeper +/// @notice A gatekeeper contract which allows users to sign up for a poll. abstract contract SignUpGatekeeper { + /// @notice Allows to set the MACI contract function setMaciInstance(MACI _maci) public virtual {} + /// @notice Registers the user + /// @param _user The address of the user + /// @param _data additional data function register(address _user, bytes memory _data) public virtual {} } diff --git a/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol b/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol index 02b0c5bac0..1b92c007cd 100644 --- a/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol +++ b/contracts/contracts/gatekeepers/SignUpTokenGatekeeper.sol @@ -8,28 +8,37 @@ import { SignUpToken } from "../SignUpToken.sol"; import { MACI } from "../MACI.sol"; +/// @title SignUpTokenGatekeeper +/// @notice This contract allows to gatekeep MACI signups +/// by requiring new voters to own a certain ERC721 token contract SignUpTokenGatekeeper is SignUpGatekeeper, Ownable { + /// @notice the reference to the SignUpToken contract SignUpToken public token; + /// @notice the reference to the MACI contract MACI public maci; - mapping(uint256 => bool) internal registeredTokenIds; + /// @notice a mapping of tokenIds to whether they have been used to sign up + mapping(uint256 => bool) public registeredTokenIds; + /// @notice custom errors error AlreadyRegistered(); error NotTokenOwner(); error OnlyMACI(); + /// @notice creates a new SignUpTokenGatekeeper + /// @param _token the address of the SignUpToken contract constructor(SignUpToken _token) Ownable() { token = _token; } - /// @notice Adds an uninitialised MACI instance to allow for token singups + /// @notice Adds an uninitialised MACI instance to allow for token signups /// @param _maci The MACI contract interface to be stored function setMaciInstance(MACI _maci) public override onlyOwner { maci = _maci; } /// @notice Registers the user if they own the token with the token ID encoded in - /// _data. Throws if the user is does not own the token or if the token has + /// _data. Throws if the user does not own the token or if the token has /// already been used to sign up. /// @param _user The user's Ethereum address. /// @param _data The ABI-encoded tokenId as a uint256. diff --git a/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol b/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol index 81ce8e7fd7..851336085b 100644 --- a/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol +++ b/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol @@ -1,18 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -abstract contract InitialVoiceCreditProxy { - function getVoiceCredits(address _user, bytes memory _data) public view virtual returns (uint256) {} -} +import { InitialVoiceCreditProxy } from "./InitialVoiceCreditProxy.sol"; +/// @title ConstantInitialVoiceCreditProxy +/// @notice This contract allows to set a constant initial voice credit balance +/// for MACI's voters. contract ConstantInitialVoiceCreditProxy is InitialVoiceCreditProxy { + /// @notice the balance to be returned by getVoiceCredits uint256 internal balance; + /// @notice creates a new ConstantInitialVoiceCreditProxy constructor(uint256 _balance) { balance = _balance; } - function getVoiceCredits(address, bytes memory) public view override returns (uint256) { + /// @notice Returns the constant balance for any new MACI's voter + /// @param _address the address of the voter + /// @param _data additional data + /// @return the balance + function getVoiceCredits(address _address, bytes memory _data) public view override returns (uint256) { return balance; } } diff --git a/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol b/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol index 49d258f2fb..6d6e86d6cc 100644 --- a/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol +++ b/contracts/contracts/initialVoiceCreditProxy/InitialVoiceCreditProxy.sol @@ -1,6 +1,14 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; +/// @title InitialVoiceCreditProxy +/// @notice This contract is the base contract for +/// InitialVoiceCreditProxy contracts. It allows to set a custom initial voice +/// credit balance for MACI's voters. abstract contract InitialVoiceCreditProxy { + /// @notice Returns the initial voice credit balance for a new MACI's voter + /// @param _user the address of the voter + /// @param _data additional data + /// @return the balance function getVoiceCredits(address _user, bytes memory _data) public view virtual returns (uint256) {} } diff --git a/contracts/contracts/interfaces/IMACI.sol b/contracts/contracts/interfaces/IMACI.sol new file mode 100644 index 0000000000..53b69b7838 --- /dev/null +++ b/contracts/contracts/interfaces/IMACI.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import { VkRegistry } from "../VkRegistry.sol"; +import { AccQueue } from "../trees/AccQueue.sol"; + +/// @title IMACI interface +interface IMACI { + /// @notice Get the depth of the state tree + /// @return The depth of the state tree + function stateTreeDepth() external view returns (uint8); + + /// @notice Get the VkRegistry + /// @return The VkRegistry instance + function vkRegistry() external view returns (VkRegistry); + + /// @notice Get the root of the state accumulator queue + /// @return The root of the state accumulator queue + function getStateAqRoot() external view returns (uint256); + + /// @notice Merge the sub roots of the state accumulator queue + /// @param _numSrQueueOps The number of queue operations + /// @param _pollId The poll identifier + function mergeStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) external; + + /// @notice Merge the state accumulator queue + /// @param _pollId The poll identifier + /// @return The new root of the state accumulator queue after merging + function mergeStateAq(uint256 _pollId) external returns (uint256); + + /// @notice Get the number of signups + /// @return The number of signups + function numSignUps() external view returns (uint256); + + /// @notice Get the state accumulator queue + /// @return The state accumulator queue + function stateAq() external view returns (AccQueue); +} diff --git a/contracts/contracts/trees/AccQueue.sol b/contracts/contracts/trees/AccQueue.sol index 60fd26ef59..21bab55fb4 100644 --- a/contracts/contracts/trees/AccQueue.sol +++ b/contracts/contracts/trees/AccQueue.sol @@ -20,13 +20,13 @@ abstract contract AccQueue is Ownable, Hasher { // The maximum tree depth uint256 constant MAX_DEPTH = 32; - // A Queue is a 2D array of Merkle roots and indices which represents nodes - // in a Merkle tree while it is progressively updated. + /// @notice A Queue is a 2D array of Merkle roots and indices which represents nodes + /// in a Merkle tree while it is progressively updated. struct Queue { - // IMPORTANT: the following declares an array of b elements of type T: T[b] - // And the following declares an array of b elements of type T[a]: T[a][b] - // As such, the following declares an array of MAX_DEPTH+1 arrays of - // uint256[4] arrays, **not the other way round**: + /// @notice IMPORTANT: the following declares an array of b elements of type T: T[b] + /// And the following declares an array of b elements of type T[a]: T[a][b] + /// As such, the following declares an array of MAX_DEPTH+1 arrays of + /// uint256[4] arrays, **not the other way round**: uint256[4][MAX_DEPTH + 1] levels; uint256[MAX_DEPTH + 1] indices; } @@ -78,6 +78,7 @@ abstract contract AccQueue is Ownable, Hasher { // The number of leaves inserted across all subtrees so far uint256 public numLeaves; + /// @notice custom errors error SubDepthCannotBeZero(); error SubdepthTooLarge(uint256 _subDepth, uint256 max); error InvalidHashLength(); @@ -89,7 +90,11 @@ abstract contract AccQueue is Ownable, Hasher { error DepthTooSmall(uint256 _depth, uint256 min); error InvalidIndex(uint256 _index); + /// @notice Create a new AccQueue + /// @param _subDepth The depth of each subtree. + /// @param _hashLength The number of leaves per node (2 or 5). constructor(uint256 _subDepth, uint256 _hashLength) { + /// validation if (_subDepth == 0) revert SubDepthCannotBeZero(); if (_subDepth > MAX_DEPTH) revert SubdepthTooLarge(_subDepth, MAX_DEPTH); if (_hashLength != 2 && _hashLength != 5) revert InvalidHashLength(); @@ -106,10 +111,17 @@ abstract contract AccQueue is Ownable, Hasher { /// different input array lengths. /// @param _level The level to hash. /// @param _leaf The leaf include with the level. - /// @return The hash of the level and leaf. - function hashLevel(uint256 _level, uint256 _leaf) internal virtual returns (uint256) {} + /// @return _hash The hash of the level and leaf. + function hashLevel(uint256 _level, uint256 _leaf) internal virtual returns (uint256 _hash) {} - function hashLevelLeaf(uint256 _level, uint256 _leaf) public view virtual returns (uint256) {} + /// @notice Hash the contents of the specified level and the specified leaf. + /// This is a virtual function as the hash function which the overriding + /// contract uses will be either hashLeftRight or hash5, which require + /// different input array lengths. + /// @param _level The level to hash. + /// @param _leaf The leaf include with the level. + /// @return _hash The hash of the level and leaf. + function hashLevelLeaf(uint256 _level, uint256 _leaf) public view virtual returns (uint256 _hash) {} /// @notice Returns the zero leaf at a specified level. /// This is a virtual function as the hash function which the overriding @@ -117,12 +129,15 @@ abstract contract AccQueue is Ownable, Hasher { /// different zero values (e.g. hashLeftRight(0, 0) vs /// hash5([0, 0, 0, 0, 0]). Moreover, the zero value may be a /// nothing-up-my-sleeve value. - function getZero(uint256 _level) internal virtual returns (uint256) {} + /// @param _level The level at which to return the zero leaf. + /// @return zero The zero leaf at the specified level. + function getZero(uint256 _level) internal virtual returns (uint256 zero) {} - /// Add a leaf to the queue for the current subtree. + /// @notice Add a leaf to the queue for the current subtree. /// @param _leaf The leaf to add. - function enqueue(uint256 _leaf) public onlyOwner returns (uint256) { - uint256 leafIndex = numLeaves; + /// @return leafIndex The index of the leaf in the queue. + function enqueue(uint256 _leaf) public onlyOwner returns (uint256 leafIndex) { + leafIndex = numLeaves; // Recursively queue the leaf _enqueue(_leaf, 0); @@ -147,12 +162,10 @@ abstract contract AccQueue is Ownable, Hasher { delete leafQueue.levels[subDepth][0]; delete leafQueue.indices; } - - return leafIndex; } - /// Updates the queue at a given level and hashes any subroots that need to - /// be hashed. + /// @notice Updates the queue at a given level and hashes any subroots + /// that need to be hashed. /// @param _leaf The leaf to add. /// @param _level The level at which to queue the leaf. function _enqueue(uint256 _leaf, uint256 _level) internal { @@ -239,34 +252,31 @@ abstract contract AccQueue is Ownable, Hasher { subTreesMerged = false; } - /// @notice Calculate the lowest possible height of a tree with all the subroots - /// merged together. - function calcMinHeight() public view returns (uint256) { - uint256 depth = 1; + /// @notice Calculate the lowest possible height of a tree with + /// all the subroots merged together. + /// @return depth The lowest possible height of a tree with all the + function calcMinHeight() public view returns (uint256 depth) { + depth = 1; while (true) { if (hashLength ** depth >= currentSubtreeIndex) { break; } depth++; } - - return depth; } /// @notice Merge all subtrees to form the shortest possible tree. /// This function can be called either once to merge all subtrees in a /// single transaction, or multiple times to do the same in multiple - /// transactions. If _numSrQueueOps is set to 0, this function will attempt - /// to merge all subtrees in one go. If it is set to a number greater than - /// 0, it will perform up to that number of queueSubRoot() operations. + /// transactions. /// @param _numSrQueueOps The number of times this function will call /// queueSubRoot(), up to the maximum number of times - /// is necessary. If it is set to 0, it will call - /// queueSubRoot() as many times as is necessary. Set - /// this to a low number and call this function - /// multiple times if there are many subroots to - /// merge, or a single transaction would run out of - /// gas. + /// necessary. If it is set to 0, it will call + /// queueSubRoot() as many times as is necessary. Set + /// this to a low number and call this function + /// multiple times if there are many subroots to + /// merge, or a single transaction could run out of + /// gas. function mergeSubRoots(uint256 _numSrQueueOps) public onlyOwner { // This function can only be called once unless a new subtree is created if (subTreesMerged) revert SubTreesAlreadyMerged(); @@ -364,7 +374,8 @@ abstract contract AccQueue is Ownable, Hasher { /// @notice Merge all subtrees to form a main tree with a desired depth. /// @param _depth The depth of the main tree. It must fit all the leaves or /// this function will revert. - function merge(uint256 _depth) public onlyOwner returns (uint256) { + /// @return root The root of the main tree. + function merge(uint256 _depth) public onlyOwner returns (uint256 root) { // The tree depth must be more than 0 if (_depth == 0) revert DepthCannotBeZero(); @@ -391,7 +402,7 @@ abstract contract AccQueue is Ownable, Hasher { treeMerged = true; return smallSRTroot; } else { - uint256 root = smallSRTroot; + root = smallSRTroot; // Calculate the main root @@ -416,57 +427,73 @@ abstract contract AccQueue is Ownable, Hasher { mainRoots[_depth] = root; treeMerged = true; - return root; } } /// @notice Returns the subroot at the specified index. Reverts if the index refers /// to a subtree which has not been filled yet. /// @param _index The subroot index. - function getSubRoot(uint256 _index) public view returns (uint256) { + /// @return subRoot The subroot at the specified index. + function getSubRoot(uint256 _index) public view returns (uint256 subRoot) { if (currentSubtreeIndex <= _index) revert InvalidIndex(_index); - return subRoots[_index]; + subRoot = subRoots[_index]; } /// @notice Returns the subroot tree (SRT) root. Its value must first be computed /// using mergeSubRoots. - function getSmallSRTroot() public view returns (uint256) { + /// @return smallSubTreeRoot The SRT root. + function getSmallSRTroot() public view returns (uint256 smallSubTreeRoot) { if (!subTreesMerged) revert SubTreesNotMerged(); - return smallSRTroot; + smallSubTreeRoot = smallSRTroot; } /// @notice Return the merged Merkle root of all the leaves at a desired depth. - /// merge() or merged(_depth) must be called first. + /// @dev merge() or merged(_depth) must be called first. /// @param _depth The depth of the main tree. It must first be computed /// using mergeSubRoots() and merge(). - function getMainRoot(uint256 _depth) public view returns (uint256) { + /// @return mainRoot The root of the main tree. + function getMainRoot(uint256 _depth) public view returns (uint256 mainRoot) { if (hashLength ** _depth < numLeaves) revert DepthTooSmall(_depth, numLeaves); - return mainRoots[_depth]; + mainRoot = mainRoots[_depth]; } - function getSrIndices() public view returns (uint256, uint256) { - return (nextSubRootIndex, currentSubtreeIndex); + /// @notice Get the next subroot index and the current subtree index. + function getSrIndices() public view returns (uint256 next, uint256 current) { + next = nextSubRootIndex; + current = currentSubtreeIndex; } } +/// @title AccQueueBinary +/// @notice This contract defines a Merkle tree where each leaf insertion only updates a +/// subtree. To obtain the main tree root, the contract owner must merge the +/// subtrees together. Merging subtrees requires at least 2 operations: +/// mergeSubRoots(), and merge(). To get around the gas limit, +/// the mergeSubRoots() can be performed in multiple transactions. +/// @dev This contract is for a binary tree (2 leaves per node) abstract contract AccQueueBinary is AccQueue { + /// @notice Create a new AccQueueBinary constructor(uint256 _subDepth) AccQueue(_subDepth, 2) {} - function hashLevel(uint256 _level, uint256 _leaf) internal override returns (uint256) { - uint256 hashed = hashLeftRight(leafQueue.levels[_level][0], _leaf); + /// @notice Hash the contents of the specified level and the specified leaf. + /// @param _level The level to hash. + /// @param _leaf The leaf include with the level. + /// @return hashed The hash of the level and leaf. + function hashLevel(uint256 _level, uint256 _leaf) internal override returns (uint256 hashed) { + hashed = hashLeftRight(leafQueue.levels[_level][0], _leaf); // Free up storage slots to refund gas. delete leafQueue.levels[_level][0]; - - return hashed; } - function hashLevelLeaf(uint256 _level, uint256 _leaf) public view override returns (uint256) { - uint256 hashed = hashLeftRight(leafQueue.levels[_level][0], _leaf); - return hashed; + /// @notice Hash the contents of the specified level and the specified leaf. + function hashLevelLeaf(uint256 _level, uint256 _leaf) public view override returns (uint256 hashed) { + hashed = hashLeftRight(leafQueue.levels[_level][0], _leaf); } + /// @notice An internal function which fills a subtree. + /// @param _level The level at which to fill the subtree. function _fill(uint256 _level) internal override { while (_level < subDepth) { uint256 n = leafQueue.indices[_level]; @@ -493,37 +520,52 @@ abstract contract AccQueueBinary is AccQueue { } } +/// @title AccQueueQuinary +/// @notice This contract defines a Merkle tree where each leaf insertion only updates a +/// subtree. To obtain the main tree root, the contract owner must merge the +/// subtrees together. Merging subtrees requires at least 2 operations: +/// mergeSubRoots(), and merge(). To get around the gas limit, +/// the mergeSubRoots() can be performed in multiple transactions. +/// @dev This contract is for a quinary tree (5 leaves per node) abstract contract AccQueueQuinary is AccQueue { + /// @notice Create a new AccQueueQuinary instance constructor(uint256 _subDepth) AccQueue(_subDepth, 5) {} - function hashLevel(uint256 _level, uint256 _leaf) internal override returns (uint256) { + /// @notice Hash the contents of the specified level and the specified leaf. + /// @dev it also frees up storage slots to refund gas. + /// @param _level The level to hash. + /// @param _leaf The leaf include with the level. + /// @return hashed The hash of the level and leaf. + function hashLevel(uint256 _level, uint256 _leaf) internal override returns (uint256 hashed) { uint256[5] memory inputs; inputs[0] = leafQueue.levels[_level][0]; inputs[1] = leafQueue.levels[_level][1]; inputs[2] = leafQueue.levels[_level][2]; inputs[3] = leafQueue.levels[_level][3]; inputs[4] = _leaf; - uint256 hashed = hash5(inputs); + hashed = hash5(inputs); // Free up storage slots to refund gas. Note that using a loop here // would result in lower gas savings. delete leafQueue.levels[_level]; - - return hashed; } - function hashLevelLeaf(uint256 _level, uint256 _leaf) public view override returns (uint256) { + /// @notice Hash the contents of the specified level and the specified leaf. + /// @param _level The level to hash. + /// @param _leaf The leaf include with the level. + /// @return hashed The hash of the level and leaf. + function hashLevelLeaf(uint256 _level, uint256 _leaf) public view override returns (uint256 hashed) { uint256[5] memory inputs; inputs[0] = leafQueue.levels[_level][0]; inputs[1] = leafQueue.levels[_level][1]; inputs[2] = leafQueue.levels[_level][2]; inputs[3] = leafQueue.levels[_level][3]; inputs[4] = _leaf; - uint256 hashed = hash5(inputs); - - return hashed; + hashed = hash5(inputs); } + /// @notice An internal function which fills a subtree + /// @param _level The level at which to fill the subtree function _fill(uint256 _level) internal override { while (_level < subDepth) { uint256 n = leafQueue.indices[_level]; @@ -556,42 +598,86 @@ abstract contract AccQueueQuinary is AccQueue { } } +/// @title AccQueueBinary0 +/// @notice This contract extends AccQueueBinary and MerkleBinary0 +/// @dev This contract is used for creating a +/// Merkle tree with binary (2 leaves per node) structure contract AccQueueBinary0 is AccQueueBinary, MerkleBinary0 { + /// @notice Constructor for creating AccQueueBinary0 contract + /// @param _subDepth The depth of each subtree constructor(uint256 _subDepth) AccQueueBinary(_subDepth) {} - function getZero(uint256 _level) internal view override returns (uint256) { - return zeros[_level]; + /// @notice Returns the zero leaf at a specified level + /// @param _level The level at which to return the zero leaf + /// @return zero The zero leaf at the specified level + function getZero(uint256 _level) internal view override returns (uint256 zero) { + zero = zeros[_level]; } } +/// @title AccQueueBinaryMaci +/// @notice This contract extends AccQueueBinary and MerkleBinaryMaci +/// @dev This contract is used for creating a +/// Merkle tree with binary (2 leaves per node) structure contract AccQueueBinaryMaci is AccQueueBinary, MerkleBinaryMaci { + /// @notice Constructor for creating AccQueueBinaryMaci contract + /// @param _subDepth The depth of each subtree constructor(uint256 _subDepth) AccQueueBinary(_subDepth) {} - function getZero(uint256 _level) internal view override returns (uint256) { - return zeros[_level]; + /// @notice Returns the zero leaf at a specified level + /// @param _level The level at which to return the zero leaf + function getZero(uint256 _level) internal view override returns (uint256 zero) { + zero = zeros[_level]; } } +/// @title AccQueueQuinary0 +/// @notice This contract extends AccQueueQuinary and MerkleQuinary0 +/// @dev This contract is used for creating a +/// Merkle tree with quinary (5 leaves per node) structure contract AccQueueQuinary0 is AccQueueQuinary, MerkleQuinary0 { + /// @notice Constructor for creating AccQueueQuinary0 contract + /// @param _subDepth The depth of each subtree constructor(uint256 _subDepth) AccQueueQuinary(_subDepth) {} - function getZero(uint256 _level) internal view override returns (uint256) { - return zeros[_level]; + /// @notice Returns the zero leaf at a specified level + /// @param _level The level at which to return the zero leaf + /// @return zero The zero leaf at the specified level + function getZero(uint256 _level) internal view override returns (uint256 zero) { + zero = zeros[_level]; } } +/// @title AccQueueQuinaryMaci +/// @notice This contract extends AccQueueQuinary and MerkleQuinaryMaci +/// @dev This contract is used for creating a +/// Merkle tree with quinary (5 leaves per node) structure contract AccQueueQuinaryMaci is AccQueueQuinary, MerkleQuinaryMaci { + /// @notice Constructor for creating AccQueueQuinaryMaci contract + /// @param _subDepth The depth of each subtree constructor(uint256 _subDepth) AccQueueQuinary(_subDepth) {} - function getZero(uint256 _level) internal view override returns (uint256) { - return zeros[_level]; + /// @notice Returns the zero leaf at a specified level + /// @param _level The level at which to return the zero leaf + /// @return zero The zero leaf at the specified level + function getZero(uint256 _level) internal view override returns (uint256 zero) { + zero = zeros[_level]; } } +/// @title AccQueueQuinaryBlankSl +/// @notice This contract extends AccQueueQuinary and MerkleQuinaryBlankSl +/// @dev This contract is used for creating a +/// Merkle tree with quinary (5 leaves per node) structure contract AccQueueQuinaryBlankSl is AccQueueQuinary, MerkleQuinaryBlankSl { + /// @notice Constructor for creating AccQueueQuinaryBlankSl contract + /// @param _subDepth The depth of each subtree constructor(uint256 _subDepth) AccQueueQuinary(_subDepth) {} - function getZero(uint256 _level) internal view override returns (uint256) { - return zeros[_level]; + /// @notice Returns the zero leaf at a specified level + /// @param _level The level at which to return the zero leaf + /// @return zero The zero leaf at the specified level + function getZero(uint256 _level) internal view override returns (uint256 zero) { + zero = zeros[_level]; } } diff --git a/contracts/contracts/utilities/DomainObjs.sol b/contracts/contracts/utilities/DomainObjs.sol new file mode 100644 index 0000000000..e5b66358c8 --- /dev/null +++ b/contracts/contracts/utilities/DomainObjs.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import { Hasher } from "../crypto/Hasher.sol"; + +/// @title DomainObjs +/// @notice An utility contract that holds +/// a number of domain objects and functions +contract DomainObjs { + /// @notice the length of a MACI message + uint8 constant MESSAGE_DATA_LENGTH = 10; + + /// @title Message + /// @notice this struct represents a MACI message + /// @dev msgType: 1 for vote message, 2 for topup message (size 2) + struct Message { + uint256 msgType; + uint256[MESSAGE_DATA_LENGTH] data; + } + + /// @title PubKey + /// @notice A MACI public key + struct PubKey { + uint256 x; + uint256 y; + } + + /// @title StateLeaf + /// @notice A MACI state leaf + /// @dev used to represent a user's state + /// in the state Merkle tree + struct StateLeaf { + PubKey pubKey; + uint256 voiceCreditBalance; + uint256 timestamp; + } +} diff --git a/contracts/contracts/utilities/Params.sol b/contracts/contracts/utilities/Params.sol new file mode 100644 index 0000000000..b7b83647df --- /dev/null +++ b/contracts/contracts/utilities/Params.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import { IMACI } from "../interfaces/IMACI.sol"; +import { AccQueue } from "../trees/AccQueue.sol"; +import { TopupCredit } from "../TopupCredit.sol"; +import { VkRegistry } from "../VkRegistry.sol"; + +/// @title Params +/// @notice This contracts contains a number of structures +/// which are to be passed as parameters to Poll contracts. +/// This way we can reduce the number of parameters +/// and avoid a stack too deep error during compilation. +contract Params { + /// @notice A struct holding the depths of the merkle trees + struct TreeDepths { + uint8 intStateTreeDepth; + uint8 messageTreeSubDepth; + uint8 messageTreeDepth; + uint8 voteOptionTreeDepth; + } + + /// @notice A struct holding the batch sizes for processing + struct BatchSizes { + uint24 messageBatchSize; + uint24 tallyBatchSize; + uint24 subsidyBatchSize; + } + + /// @notice A struct holding the max values for the poll + struct MaxValues { + uint256 maxMessages; + uint256 maxVoteOptions; + } + + /// @notice A struct holding the external contracts + /// that are to be passed to a Poll contract on + /// deployment + struct ExtContracts { + VkRegistry vkRegistry; + IMACI maci; + AccQueue messageAq; + TopupCredit topupCredit; + } +} diff --git a/contracts/contracts/utilities/Utilities.sol b/contracts/contracts/utilities/Utilities.sol new file mode 100644 index 0000000000..6239c9542f --- /dev/null +++ b/contracts/contracts/utilities/Utilities.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; +import { DomainObjs } from "./DomainObjs.sol"; +import { Hasher } from "../crypto/Hasher.sol"; +import { SnarkConstants } from "../crypto/SnarkConstants.sol"; +import { Poll } from "../Poll.sol"; + +/// @title CommonUtilities +/// @notice A contract that holds common utilities +/// which are to be used by multiple contracts +/// namely Subsidy, Tally and MessageProcessor +contract CommonUtilities { + error VOTING_PERIOD_NOT_PASSED(); + + /// @notice common function for MessageProcessor, Tally and Subsidy + /// @param _poll the poll to be checked + function _votingPeriodOver(Poll _poll) internal view { + (uint256 deployTime, uint256 duration) = _poll.getDeployTimeAndDuration(); + // Require that the voting period is over + uint256 secondsPassed = block.timestamp - deployTime; + if (secondsPassed <= duration) { + revert VOTING_PERIOD_NOT_PASSED(); + } + } +} + +/// @title Utilities +/// @notice An utility contract that can be used to: +/// * hash a state leaf +/// * pad and hash a MACI message +/// * hash a MACI message and an encryption public key +contract Utilities is SnarkConstants, DomainObjs, Hasher { + /// @notice An utility function used to hash a state leaf + /// @param _stateLeaf the state leaf to be hashed + /// @return ciphertext The hash of the state leaf + function hashStateLeaf(StateLeaf memory _stateLeaf) public pure returns (uint256 ciphertext) { + uint256[4] memory plaintext; + plaintext[0] = _stateLeaf.pubKey.x; + plaintext[1] = _stateLeaf.pubKey.y; + plaintext[2] = _stateLeaf.voiceCreditBalance; + plaintext[3] = _stateLeaf.timestamp; + + ciphertext = hash4(plaintext); + } + + /// @notice An utility function used to pad and hash a MACI message + /// @param dataToPad the data to be padded + /// @param msgType the type of the message + /// @return message The padded message + /// @return padKey The padding public key + /// @return msgHash The hash of the padded message and encryption key + function padAndHashMessage( + uint256[2] memory dataToPad, + uint256 msgType + ) public pure returns (Message memory message, PubKey memory padKey, uint256 msgHash) { + uint256[10] memory dat; + dat[0] = dataToPad[0]; + dat[1] = dataToPad[1]; + for (uint i = 2; i < 10; ) { + dat[i] = 0; + unchecked { + ++i; + } + } + padKey = PubKey(PAD_PUBKEY_X, PAD_PUBKEY_Y); + message = Message({ msgType: msgType, data: dat }); + msgHash = hashMessageAndEncPubKey(message, padKey); + } + + /// @notice An utility function used to hash a MACI message and an encryption public key + /// @param _message the message to be hashed + /// @param _encPubKey the encryption public key to be hashed + /// @return msgHash The hash of the message and the encryption public key + function hashMessageAndEncPubKey( + Message memory _message, + PubKey memory _encPubKey + ) public pure returns (uint256 msgHash) { + require(_message.data.length == 10, "Invalid message"); + uint256[5] memory n; + n[0] = _message.data[0]; + n[1] = _message.data[1]; + n[2] = _message.data[2]; + n[3] = _message.data[3]; + n[4] = _message.data[4]; + + uint256[5] memory m; + m[0] = _message.data[5]; + m[1] = _message.data[6]; + m[2] = _message.data[7]; + m[3] = _message.data[8]; + m[4] = _message.data[9]; + + msgHash = hash5([_message.msgType, hash5(n), hash5(m), _encPubKey.x, _encPubKey.y]); + } +} diff --git a/contracts/contracts/utilities/Utility.sol b/contracts/contracts/utilities/Utility.sol deleted file mode 100644 index c7d0c065ea..0000000000 --- a/contracts/contracts/utilities/Utility.sol +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; -import { DomainObjs, IPubKey, IMessage } from "../DomainObjs.sol"; -import { Hasher } from "../crypto/Hasher.sol"; -import { SnarkConstants } from "../crypto/SnarkConstants.sol"; -import { Poll } from "../Poll.sol"; - -contract CommonUtilities { - error VOTING_PERIOD_NOT_PASSED(); - - // common function for MessageProcessor, Tally and Subsidy - function _votingPeriodOver(Poll _poll) internal view { - (uint256 deployTime, uint256 duration) = _poll.getDeployTimeAndDuration(); - // Require that the voting period is over - uint256 secondsPassed = block.timestamp - deployTime; - if (secondsPassed <= duration) { - revert VOTING_PERIOD_NOT_PASSED(); - } - } -} - -contract Utilities is SnarkConstants, Hasher, IPubKey, IMessage { - function padAndHashMessage( - uint256[2] memory dataToPad, // we only need two for now - uint256 msgType - ) public pure returns (Message memory, PubKey memory, uint256) { - uint256[10] memory dat; - dat[0] = dataToPad[0]; - dat[1] = dataToPad[1]; - for (uint i = 2; i < 10; ) { - dat[i] = 0; - unchecked { - ++i; - } - } - PubKey memory _padKey = PubKey(PAD_PUBKEY_X, PAD_PUBKEY_Y); - Message memory _message = Message({ msgType: msgType, data: dat }); - return (_message, _padKey, hashMessageAndEncPubKey(_message, _padKey)); - } - - function hashMessageAndEncPubKey(Message memory _message, PubKey memory _encPubKey) public pure returns (uint256) { - require(_message.data.length == 10, "Invalid message"); - uint256[5] memory n; - n[0] = _message.data[0]; - n[1] = _message.data[1]; - n[2] = _message.data[2]; - n[3] = _message.data[3]; - n[4] = _message.data[4]; - - uint256[5] memory m; - m[0] = _message.data[5]; - m[1] = _message.data[6]; - m[2] = _message.data[7]; - m[3] = _message.data[8]; - m[4] = _message.data[9]; - - return hash5([_message.msgType, hash5(n), hash5(m), _encPubKey.x, _encPubKey.y]); - } -} diff --git a/contracts/package-lock.json b/contracts/package-lock.json index 58e546168f..059d05cd09 100644 --- a/contracts/package-lock.json +++ b/contracts/package-lock.json @@ -14,6 +14,10 @@ "circomlibjs": "^0.1.7", "ethers": "^6.9.0", "hardhat": "^2.19.1", + "maci-circuits": "^1.1.2", + "maci-core": "^1.1.2", + "maci-crypto": "^1.1.2", + "maci-domainobjs": "^1.1.2", "module-alias": "^2.2.2", "solidity-docgen": "^0.6.0-beta.36" }, @@ -80,11 +84,19 @@ "node": ">=12" } }, + "node_modules/@ethereumjs/common": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", + "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", + "dependencies": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" + } + }, "node_modules/@ethereumjs/rlp": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "peer": true, "bin": { "rlp": "bin/rlp" }, @@ -92,11 +104,19 @@ "node": ">=14" } }, + "node_modules/@ethereumjs/tx": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", + "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", + "dependencies": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, "node_modules/@ethereumjs/util": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", - "peer": true, "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", @@ -110,7 +130,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", - "peer": true, "dependencies": { "@noble/hashes": "1.3.1" }, @@ -122,7 +141,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "peer": true, "engines": { "node": ">= 16" }, @@ -134,7 +152,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", - "peer": true, "dependencies": { "@noble/curves": "1.1.0", "@noble/hashes": "1.3.1", @@ -846,6 +863,20 @@ "node": ">=14" } }, + "node_modules/@iden3/bigarray": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@iden3/bigarray/-/bigarray-0.0.2.tgz", + "integrity": "sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==" + }, + "node_modules/@iden3/binfileutils": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.11.tgz", + "integrity": "sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA==", + "dependencies": { + "fastfile": "0.0.20", + "ffjavascript": "^0.2.48" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", @@ -1386,150 +1417,15 @@ "node": ">= 10" } }, - "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz", - "integrity": "sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-freebsd-x64": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz", - "integrity": "sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz", - "integrity": "sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz", - "integrity": "sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz", - "integrity": "sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz", - "integrity": "sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-win32-arm64-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz", - "integrity": "sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-win32-ia32-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz", - "integrity": "sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz", - "integrity": "sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@openzeppelin/contracts": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.4.tgz", - "integrity": "sha512-cZ47skkw2iUz7ApIkgin5bNff7GkCJCZev48HKp81+sRBE0So9yi+Nm5O9G2BMysbjSdA9o9dKDUx0J9Yy1LUQ==" + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.5.tgz", + "integrity": "sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==" }, "node_modules/@scure/base": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", - "integrity": "sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.4.tgz", + "integrity": "sha512-wznebWtt+ejH8el87yuD4i9xLSbYZXf1Pe4DY0o/zq/eg5I0VQVXVbFs6XIM0pNVCJ/uE3t5wI9kh90mdLUxtw==", "funding": { "url": "https://paulmillr.com/funding/" } @@ -1538,7 +1434,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", - "peer": true, "dependencies": { "@noble/curves": "~1.1.0", "@noble/hashes": "~1.3.1", @@ -1552,7 +1447,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", - "peer": true, "dependencies": { "@noble/hashes": "1.3.1" }, @@ -1564,7 +1458,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "peer": true, "engines": { "node": ">= 16" }, @@ -1576,7 +1469,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "peer": true, "dependencies": { "@noble/hashes": "~1.3.0", "@scure/base": "~1.1.0" @@ -1710,6 +1602,17 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@solidity-parser/parser": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", @@ -1719,6 +1622,17 @@ "antlr4ts": "^0.5.0-alpha.4" } }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -1777,6 +1691,17 @@ "@types/node": "*" } }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, "node_modules/@types/chai": { "version": "4.3.11", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", @@ -1825,6 +1750,19 @@ "@types/node": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", @@ -1883,6 +1821,14 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/secp256k1": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", @@ -1891,12 +1837,22 @@ "@types/node": "*" } }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, "node_modules/abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", "peer": true }, + "node_modules/abortcontroller-polyfill": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", + "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==" + }, "node_modules/abstract-level": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", @@ -1914,6 +1870,18 @@ "node": ">=12" } }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -1999,7 +1967,6 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", "optional": true, - "peer": true, "engines": { "node": ">=0.4.2" } @@ -2094,6 +2061,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -2156,6 +2128,34 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "peer": true }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2174,16 +2174,19 @@ } }, "node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "peer": true + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "peer": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/at-least-node": { "version": "1.0.0", @@ -2205,6 +2208,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + }, "node_modules/axios": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", @@ -2253,11 +2269,55 @@ } ] }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "node_modules/bfj": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.1.0.tgz", + "integrity": "sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw==", + "dependencies": { + "bluebird": "^3.7.2", + "check-types": "^11.2.3", + "hoopy": "^0.1.4", + "jsonpath": "^1.1.1", + "tryer": "^1.0.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/bigint-crypto-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", @@ -2266,6 +2326,14 @@ "node": ">=14.0.0" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2274,6 +2342,14 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/blake-hash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz", @@ -2311,11 +2387,66 @@ "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2416,11 +2547,28 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "node_modules/buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==" + }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -2429,13 +2577,60 @@ "node": ">= 0.8" } }, - "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "node_modules/cacheable-lookup": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", + "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", "set-function-length": "^1.1.1" }, "funding": { @@ -2464,8 +2659,7 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "peer": true + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/catering": { "version": "2.1.1", @@ -2549,6 +2743,11 @@ "node": "*" } }, + "node_modules/check-types": { + "version": "11.2.3", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", + "integrity": "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==" + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -2575,217 +2774,758 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "node_modules/ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/circomlib": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-2.0.5.tgz", - "integrity": "sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A==" - }, - "node_modules/circomlibjs": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz", - "integrity": "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==", + "node_modules/cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "deprecated": "This module has been superseded by the multiformats module", "dependencies": { - "blake-hash": "^2.0.0", - "blake2b": "^2.1.3", - "ethers": "^5.5.1", - "ffjavascript": "^0.2.45" + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" } }, - "node_modules/circomlibjs/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "node_modules/cids/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } ], "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "hasInstallScript": true, + "node_modules/cids/node_modules/multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "deprecated": "This module has been superseded by the multiformats module", "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=12" + "buffer": "^5.6.0", + "varint": "^5.0.0" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "engines": { - "node": ">=6" + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/cli-table3": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", - "dev": true, + "node_modules/circom": { + "version": "0.5.45", + "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.45.tgz", + "integrity": "sha512-5Ixp6UjwrhBWnnFBO/mTns+eeEDOpi5UoN4znAUWy5rklCUWYt2Ezl9QVUswBXjMP5kpfEtGUY2XSsYRAp6uMg==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" + "chai": "^4.2.0", + "circom_runtime": "0.1.12", + "fastfile": "0.0.18", + "ffiasm": "0.1.1", + "ffjavascript": "0.2.22", + "ffwasm": "0.0.7", + "fnv-plus": "^1.3.1", + "r1csfile": "0.0.16", + "tmp-promise": "^2.0.2", + "wasmbuilder": "0.0.10" }, - "optionalDependencies": { - "@colors/colors": "1.5.0" + "bin": { + "circom": "cli.js" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/circom_runtime": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.21.tgz", + "integrity": "sha512-qTkud630B/GK8y76hnOaaS1aNuF6prfV0dTrkeRsiJKnlP1ryQbP2FWLgDOPqn6aKyaPlam+Z+DTbBhkEzh8dA==", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "ffjavascript": "0.2.56" + }, + "bin": { + "calcwit": "calcwit.js" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/circom_runtime/node_modules/ffjavascript": { + "version": "0.2.56", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz", + "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==", "dependencies": { - "color-name": "1.1.3" + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.0", + "web-worker": "^1.2.0" } }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "node_modules/circom_runtime/node_modules/wasmcurves": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz", + "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==", + "dependencies": { + "wasmbuilder": "0.0.16" + } }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "peer": true, + "node_modules/circom/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "engines": { - "node": ">=0.1.90" + "node": ">=6" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "peer": true, + "node_modules/circom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "delayed-stream": "~1.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" - }, - "node_modules/command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "peer": true, + "node_modules/circom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/command-line-usage": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", - "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", - "peer": true, + "node_modules/circom/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "array-back": "^4.0.2", - "chalk": "^2.4.2", - "table-layout": "^1.0.2", - "typical": "^5.2.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=8" } }, - "node_modules/command-line-usage/node_modules/array-back": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", - "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", - "peer": true, + "node_modules/circom/node_modules/chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, "engines": { - "node": ">=8" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" } }, - "node_modules/command-line-usage/node_modules/typical": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", - "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", - "peer": true, - "engines": { - "node": ">=8" + "node_modules/circom/node_modules/circom_runtime": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.12.tgz", + "integrity": "sha512-R+QT9HS9w71cmGmWIn+PSyD3aHyR5JZBiVvxOjCfn12wwnpuFwBjdMG7he+v8h/oQD1mDRAu2KrBeL4mAt5s4A==", + "dependencies": { + "ffjavascript": "0.2.34", + "fnv-plus": "^1.3.1" + }, + "bin": { + "calcwit": "calcwit.js" + } + }, + "node_modules/circom/node_modules/circom_runtime/node_modules/ffjavascript": { + "version": "0.2.34", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.34.tgz", + "integrity": "sha512-fq/qfJluC4spiOD1lp5jfckZVnS0o0kI5eKXVLw7UKwIwbNr+NBMBveBVcidSfMizF87T6wb7NBtLSdckQiAnQ==", + "dependencies": { + "big-integer": "^1.6.48", + "mocha": "^8.2.1", + "wasmcurves": "0.0.14", + "worker-threads": "^1.0.0" + } + }, + "node_modules/circom/node_modules/circom_runtime/node_modules/wasmcurves": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.0.14.tgz", + "integrity": "sha512-G1iMkxlRaQSdqQ1JrwHcU+awLmwyH6kFKfT8g9obd8MWe+u5oSdFXrODB0zmSI5aGGvJPG+4cAmqCGYv9R+7qg==", + "dependencies": { + "big-integer": "^1.6.42", + "blakejs": "^1.1.0" + } + }, + "node_modules/circom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/circom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/circom/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/circom/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/circom/node_modules/fastfile": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.18.tgz", + "integrity": "sha512-q03PTKc+wptis4WmuFOwPNQx2p5myFUrl/dMgRlW9mymc1Egyc14JPHgiGnWK+sJ0+dBl2Vwtfh5GfSQltYOpw==" + }, + "node_modules/circom/node_modules/ffjavascript": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.22.tgz", + "integrity": "sha512-EsVqap2Txm17bKW0z/jXCX3M7rQ++nQUAJY8alWDpyhjRj90xjl6GLeVSKZQ8rOFDQ/SFFXcEB8w9X8Boxid+w==", + "dependencies": { + "big-integer": "^1.6.48", + "wasmcurves": "0.0.12", + "worker-threads": "^1.0.0" + } + }, + "node_modules/circom/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/circom/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/circom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/circom/node_modules/js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/circom/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/circom/node_modules/log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/circom/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/circom/node_modules/mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/circom/node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/circom/node_modules/nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/circom/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/circom/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/circom/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/circom/node_modules/r1csfile": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.16.tgz", + "integrity": "sha512-A2jRVWzGgmXeG2lVAc0H4suJmzt50it5UvBnycJgBCpMXM3tH/M6RguP7nvs6suY/yYnkN6jX6iTScSiDUF3FA==", + "dependencies": { + "@iden3/bigarray": "0.0.2", + "fastfile": "0.0.18", + "ffjavascript": "0.2.22" + } + }, + "node_modules/circom/node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/circom/node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/circom/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/circom/node_modules/wasmbuilder": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.10.tgz", + "integrity": "sha512-zQSvZ7d74d9OvN+mCN6ucNne4QS5/cBBYTHldX0Oe+u9gStY21orapvuX1ajisA7RVIpuFhYg+ZgdySsPfeh0A==", + "dependencies": { + "big-integer": "^1.6.48" + } + }, + "node_modules/circom/node_modules/wasmcurves": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.0.12.tgz", + "integrity": "sha512-1Jl9mkatyHSNj80ILjf85SZUNuZQBCkTjJlhzqHnZQXUmIimCIWkugaVaYNjozLs1Gun4h/keZe1MBeBN0sRpg==", + "dependencies": { + "big-integer": "^1.6.42", + "blakejs": "^1.1.0" + } + }, + "node_modules/circom/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/circom/node_modules/workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "node_modules/circomlib": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-2.0.5.tgz", + "integrity": "sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A==" + }, + "node_modules/circomlibjs": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz", + "integrity": "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==", + "dependencies": { + "blake-hash": "^2.0.0", + "blake2b": "^2.1.3", + "ethers": "^5.5.1", + "ffjavascript": "^0.2.45" + } + }, + "node_modules/circomlibjs/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, + "node_modules/classic-level": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", + "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "hasInstallScript": true, + "dependencies": { + "abstract-level": "^1.0.2", + "catering": "^2.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "peer": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "peer": true, + "engines": { + "node": ">=8" } }, "node_modules/commander": { @@ -2849,6 +3589,35 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "dependencies": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -2857,12 +3626,29 @@ "node": ">= 0.6" } }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "peer": true }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", @@ -2904,6 +3690,14 @@ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/crypt": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", @@ -2913,6 +3707,26 @@ "node": "*" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/death": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", @@ -2946,6 +3760,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -2969,8 +3816,15 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "peer": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "engines": { + "node": ">=10" + } }, "node_modules/define-data-property": { "version": "1.1.1", @@ -3005,7 +3859,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "peer": true, "engines": { "node": ">=0.4.0" } @@ -3018,6 +3871,15 @@ "node": ">= 0.8" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-port": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", @@ -3052,16 +3914,49 @@ "node": "*" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "peer": true, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/ejs": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "dependencies": { - "path-type": "^4.0.0" + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/elliptic": { @@ -3088,6 +3983,22 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", @@ -3197,6 +4108,44 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3205,6 +4154,11 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3217,7 +4171,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "peer": true, "dependencies": { "esprima": "^2.7.1", "estraverse": "^1.9.1", @@ -3235,11 +4188,10 @@ "source-map": "~0.2.0" } }, - "node_modules/esprima": { + "node_modules/escodegen/node_modules/esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3248,11 +4200,22 @@ "node": ">=0.10.0" } }, + "node_modules/esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/estraverse": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -3261,11 +4224,32 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "peer": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", + "dependencies": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, + "node_modules/eth-ens-namehash/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==" + }, "node_modules/eth-gas-reporter": { "version": "0.2.27", "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", @@ -3459,11 +4443,43 @@ "node": ">=4" } }, + "node_modules/eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "node_modules/eth-lib/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/eth-lib/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/eth-lib/node_modules/ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dependencies": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, "node_modules/ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", - "peer": true, "dependencies": { "js-sha3": "^0.8.0" } @@ -3530,7 +4546,6 @@ "version": "7.1.5", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", - "peer": true, "dependencies": { "@types/bn.js": "^5.1.0", "bn.js": "^5.1.2", @@ -3566,91 +4581,425 @@ "ws": "8.5.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + }, + "node_modules/fastfile": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.20.tgz", + "integrity": "sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/ffiasm": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ffiasm/-/ffiasm-0.1.1.tgz", + "integrity": "sha512-irMMHiR9JJ7BVBrAhtliUawxVdPYSdyl81taUYJ4C1mJ0iw2ueThE/qtr0J8B83tsIY8HJvh0lg5F+6ClK4xpA==", + "dependencies": { + "big-integer": "^1.6.48", + "ejs": "^3.0.1", + "yargs": "^15.3.1" + }, + "bin": { + "buildzqfield": "src/buildzqfield.js" + } + }, + "node_modules/ffiasm/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ffiasm/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ffiasm/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/ffiasm/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/ethers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + "node_modules/ffiasm/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", - "peer": true, + "node_modules/ffiasm/node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ffiasm/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dependencies": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=8" } }, - "node_modules/ethjs-unit/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "peer": true + "node_modules/ffiasm/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "node_modules/ffiasm/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/ffiasm/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "peer": true + "node_modules/ffiasm/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "peer": true, + "node_modules/ffiasm/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ffiasm/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8.6.0" + "node": ">=8" } }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "peer": true + "node_modules/ffiasm/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/ffiasm/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "peer": true, + "node_modules/ffiasm/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dependencies": { - "reusify": "^1.0.4" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" } }, "node_modules/ffjavascript": { @@ -3663,6 +5012,55 @@ "web-worker": "^1.2.0" } }, + "node_modules/ffwasm": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ffwasm/-/ffwasm-0.0.7.tgz", + "integrity": "sha512-17cTLzv7HHAKqZbX8MvHxjSrR0yDdn1sh4TVsTbAvO9e6klhFicnyoVXc/sCuViV/M8g65sCmVrAmoPCZp1YkQ==", + "dependencies": { + "big-integer": "^1.6.48", + "wasmbuilder": "0.0.10" + } + }, + "node_modules/ffwasm/node_modules/wasmbuilder": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.10.tgz", + "integrity": "sha512-zQSvZ7d74d9OvN+mCN6ucNne4QS5/cBBYTHldX0Oe+u9gStY21orapvuX1ajisA7RVIpuFhYg+ZgdySsPfeh0A==", + "dependencies": { + "big-integer": "^1.6.48" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3674,6 +5072,36 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", @@ -3705,6 +5133,11 @@ "flat": "cli.js" } }, + "node_modules/fnv-plus": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz", + "integrity": "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==" + }, "node_modules/follow-redirects": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", @@ -3732,6 +5165,14 @@ "is-callable": "^1.1.3" } }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -3746,11 +5187,32 @@ "node": ">= 6" } }, + "node_modules/form-data-encoder": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", + "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==" + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fp-ts": { "version": "1.19.3", "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==" }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -3766,6 +5228,14 @@ "node": ">=10" } }, + "node_modules/fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dependencies": { + "minipass": "^2.6.0" + } + }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", @@ -3867,6 +5337,17 @@ "node": ">=4" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -3882,6 +5363,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, "node_modules/ghost-testrpc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", @@ -3925,6 +5414,15 @@ "node": ">= 6" } }, + "node_modules/global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dependencies": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -3995,11 +5493,45 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dependencies": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "engines": { + "node": ">=4.x" + } + }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -4028,6 +5560,47 @@ "node": ">=0.10.0" } }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/hardhat": { "version": "2.19.2", "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.19.2.tgz", @@ -4427,6 +6000,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/http-basic": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", @@ -4442,6 +6023,11 @@ "node": ">=6.0.0" } }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -4457,6 +6043,11 @@ "node": ">= 0.8" } }, + "node_modules/http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==" + }, "node_modules/http-response-object": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", @@ -4472,6 +6063,32 @@ "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "peer": true }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -4495,6 +6112,25 @@ "node": ">=0.10.0" } }, + "node_modules/idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "dependencies": { + "punycode": "2.1.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/idna-uts46-hx/node_modules/punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", + "engines": { + "node": ">=6" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -4582,7 +6218,30 @@ "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", "dependencies": { - "fp-ts": "^1.0.0" + "fp-ts": "^1.0.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-array-buffer": { @@ -4698,6 +6357,25 @@ "node": ">=8" } }, + "node_modules/is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4718,6 +6396,21 @@ "npm": ">=3" } }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -4827,6 +6520,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -4857,8 +6555,93 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "peer": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jake/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/jake/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/jake/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, "node_modules/js-sdsl": { "version": "4.4.2", @@ -4885,12 +6668,32 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "peer": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -4903,6 +6706,16 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "dependencies": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + } + }, "node_modules/jsonschema": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", @@ -4912,6 +6725,20 @@ "node": "*" } }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/keccak": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", @@ -4931,6 +6758,14 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4988,7 +6823,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "peer": true, "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -5117,6 +6951,11 @@ "node": ">=8" } }, + "node_modules/logplease": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", + "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==" + }, "node_modules/loupe": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", @@ -5125,6 +6964,17 @@ "get-func-name": "^2.0.1" } }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -5138,6 +6988,140 @@ "yallist": "^3.0.2" } }, + "node_modules/maci-circuits": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/maci-circuits/-/maci-circuits-1.1.2.tgz", + "integrity": "sha512-a1sHBaF7A0bhHY4akJNN6NpX5sVGO8Ae1v3/IrEXyBZKWIvSnKY0rKzwmA3jC3F4OJrht025XUZmNd0gGcQm9g==", + "deprecated": "1.1.2 is no longer supported. Please use 1.1.1 instead.", + "dependencies": { + "argparse": "^2.0.1", + "circomlib": "git+https://github.com/weijiekoh/circomlib.git#ac85e82c1914d47789e2032fb11ceb2cfdd38a2b", + "shelljs": "^0.8.3", + "snarkjs": "^0.5.0", + "tmp": "^0.2.1" + } + }, + "node_modules/maci-circuits/node_modules/circomlib": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/weijiekoh/circomlib.git#ac85e82c1914d47789e2032fb11ceb2cfdd38a2b", + "integrity": "sha512-lPyqAOuoazs1He7EDtNssPtp+1KDdVVjy5gWFzlwmtIWGvzeIP33RS8CN/PABBF/3frgKE2s9J7Hti5z9Mggow==", + "license": "GPL-3.0" + }, + "node_modules/maci-core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/maci-core/-/maci-core-1.1.2.tgz", + "integrity": "sha512-o2VmIESe0jt3Mai2eiz2UKUeuHKC9aZqwvsfaaVj0GkySmzq6cYDvos/qaF0nw4nsoD+ElbW41v7hu+NfrxLwQ==", + "deprecated": "1.1.2 is no longer supported. Please use 1.1.1 instead.", + "dependencies": { + "maci-crypto": "^1.1.2", + "maci-domainobjs": "^1.1.2", + "module-alias": "^2.2.2" + } + }, + "node_modules/maci-crypto": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/maci-crypto/-/maci-crypto-1.1.2.tgz", + "integrity": "sha512-/eaWVItoLFl32OcANn/6UhTzhe0zyXEAvSsBxH8ZsuI1TpBad3uw4wLh4AMVfehKI2IflMmTLriSedS3vQiwQw==", + "deprecated": "1.1.2 is no longer supported. Please use 1.1.1 instead.", + "dependencies": { + "blake-hash": "^1.1.0", + "circomlib": "git+https://github.com/weijiekoh/circomlib.git#24ed08eee0bb613b8c0135d66c1013bd9f78d50a", + "ethers": "^5.0.32", + "ffjavascript": "^0.2.57", + "optimisedmt": "^0.0.7" + } + }, + "node_modules/maci-crypto/node_modules/blake-hash": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-1.1.1.tgz", + "integrity": "sha512-V93H+FEJuXXZi1eEsMtbcBFP9oL5Ept7SLw3cbXYlPC3nocm9Fr4m18ZhbhdJrZVS9J/Z0oNE4L3oDZvmorHNA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/maci-crypto/node_modules/circomlib": { + "version": "0.5.2", + "resolved": "git+ssh://git@github.com/weijiekoh/circomlib.git#24ed08eee0bb613b8c0135d66c1013bd9f78d50a", + "integrity": "sha512-I2UcS6Ae0+HQkL0ZJdS3DtR4fOyZWxKZQSxJh9yVr2akywI9OrciUBnXZuWTvDDLMKassR49clQgO+6DcFNLsg==", + "license": "GPL-3.0", + "dependencies": { + "blake-hash": "^1.1.0", + "blake2b": "^2.1.3", + "circom": "0.5.45", + "ffjavascript": "0.1.0", + "web3-utils": "^1.3.0" + } + }, + "node_modules/maci-crypto/node_modules/circomlib/node_modules/ffjavascript": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.1.0.tgz", + "integrity": "sha512-dmKlUasSfvUcxBm8nCSKl2x7EFJsXA7OVP8XLFA03T2+6mAc3IiVLC2ambEVOcMOhyhl0vJfVZjM9f9d38D1rw==", + "dependencies": { + "big-integer": "^1.6.48" + } + }, + "node_modules/maci-crypto/node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/maci-domainobjs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/maci-domainobjs/-/maci-domainobjs-1.1.2.tgz", + "integrity": "sha512-4HIBMe173DFQ9TZh68Yuf/eYNHA2Uzt/Ucqf53R3BOZ3tcmuEGIgEiKyzQZPlNQshAOOHeBZqlPlsuDge7t51A==", + "deprecated": "1.1.2 is no longer supported. Please use 1.1.1 instead.", + "dependencies": { + "base64url": "^3.0.1" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5167,6 +7151,14 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/memory-level": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", @@ -5188,6 +7180,11 @@ "node": ">= 0.10.0" } }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -5197,11 +7194,18 @@ "node": ">= 8" } }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micro-ftch": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", - "peer": true + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==" }, "node_modules/micromatch": { "version": "4.0.5", @@ -5216,11 +7220,21 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "peer": true, "engines": { "node": ">= 0.6" } @@ -5229,7 +7243,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "peer": true, "dependencies": { "mime-db": "1.52.0" }, @@ -5237,6 +7250,22 @@ "node": ">= 0.6" } }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", + "dependencies": { + "dom-walk": "^0.1.0" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -5266,11 +7295,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "node_modules/minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dependencies": { + "minipass": "^2.9.0" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "peer": true, "dependencies": { "minimist": "^1.2.6" }, @@ -5278,6 +7323,18 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", + "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", + "dependencies": { + "mkdirp": "*" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/mnemonist": { "version": "0.38.5", "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", @@ -5455,6 +7512,11 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" + }, "node_modules/module-alias": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.3.tgz", @@ -5473,6 +7535,101 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "node_modules/multibase/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "varint": "^5.0.0" + } + }, + "node_modules/multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "dependencies": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + } + }, + "node_modules/multihashes/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/multihashes/node_modules/multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" + }, + "node_modules/nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==" + }, "node_modules/nanoassert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz", @@ -5494,11 +7651,24 @@ "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==" }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", @@ -5513,6 +7683,25 @@ "lodash": "^4.17.21" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-gyp-build": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", @@ -5552,11 +7741,21 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", - "peer": true, "dependencies": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -5569,14 +7768,20 @@ "node_modules/number-to-bn/node_modules/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "peer": true + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -5589,6 +7794,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -5619,6 +7839,25 @@ "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" }, + "node_modules/oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", + "dependencies": { + "http-https": "^1.0.0" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5627,11 +7866,32 @@ "wrappy": "1" } }, + "node_modules/optimisedmt": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/optimisedmt/-/optimisedmt-0.0.7.tgz", + "integrity": "sha512-yVlKMmP/egqiAtg12KFZxqKx35STm+RB5kSSvo9q0B0sIx/7HbWj7fJcFLUFtWzbYp2IvdOhx31s4IC7RmU5pQ==", + "dependencies": { + "assert": "^2.0.0", + "circomlibjs": "0.0.8", + "ffjavascript": "^0.2.39" + } + }, + "node_modules/optimisedmt/node_modules/circomlibjs": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.0.8.tgz", + "integrity": "sha512-oZFYapLO0mfiA+i2GU/V7bRNEEPjVcwV4M444nU5lNsdSJpqLwD57m9zxTD5m/KeY7WQ3lEAC9NNKEPQHu7s1w==", + "dependencies": { + "blake-hash": "^2.0.0", + "blake2b": "^2.1.3", + "ffjavascript": "^0.2.38", + "web3": "^1.6.0", + "web3-utils": "^1.6.0" + } + }, "node_modules/optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "peer": true, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -5658,6 +7918,14 @@ "node": ">=0.10.0" } }, + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "engines": { + "node": ">=12.20" + } + }, "node_modules/p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -5708,6 +7976,19 @@ "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", "peer": true }, + "node_modules/parse-headers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -5729,6 +8010,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5761,6 +8047,11 @@ "node": ">=0.12" } }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -5785,7 +8076,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "peer": true, "engines": { "node": ">= 0.8.0" } @@ -5805,6 +8095,14 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -5820,17 +8118,42 @@ "asap": "~2.0.6" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "peer": true }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "peer": true, "engines": { "node": ">=6" } @@ -5850,6 +8173,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5869,6 +8205,46 @@ } ] }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/r1csfile": { + "version": "0.0.41", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.41.tgz", + "integrity": "sha512-Q1WDF3u1vYeAwjHo4YuddkA8Aq0TulbKjmGm99+Atn13Lf5fTsMZBnBV9T741w8iSyPFG6Uh6sapQby77sREqA==", + "dependencies": { + "@iden3/bigarray": "0.0.2", + "@iden3/binfileutils": "0.0.11", + "fastfile": "0.0.20", + "ffjavascript": "0.2.56" + } + }, + "node_modules/r1csfile/node_modules/ffjavascript": { + "version": "0.2.56", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz", + "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.0", + "web-worker": "^1.2.0" + } + }, + "node_modules/r1csfile/node_modules/wasmcurves": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz", + "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -5877,6 +8253,14 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/raw-body": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", @@ -5987,6 +8371,67 @@ "node": ">=4" } }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6003,6 +8448,11 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "node_modules/resolve": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", @@ -6014,6 +8464,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" + }, "node_modules/resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -6023,6 +8478,25 @@ "node": ">=4" } }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/responselike/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "engines": { + "node": ">=8" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6034,14 +8508,17 @@ } }, "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ripemd160": { @@ -6202,6 +8679,25 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/sc-istanbul/node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "peer": true + }, + "node_modules/sc-istanbul/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sc-istanbul/node_modules/glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -6303,6 +8799,47 @@ "semver": "bin/semver.js" } }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -6311,6 +8848,40 @@ "randombytes": "^2.1.0" } }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "dependencies": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "node_modules/set-function-length": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", @@ -6402,6 +8973,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", + "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", + "dependencies": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-get/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -6461,6 +9072,44 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "peer": true }, + "node_modules/snarkjs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.5.0.tgz", + "integrity": "sha512-KWz8mZ2Y+6wvn6GGkQo6/ZlKwETdAGohd40Lzpwp5TUZCn6N6O4Az1SuX1rw/qREGL6Im+ycb19suCFE8/xaKA==", + "dependencies": { + "@iden3/binfileutils": "0.0.11", + "bfj": "^7.0.2", + "blake2b-wasm": "^2.4.0", + "circom_runtime": "0.1.21", + "ejs": "^3.1.6", + "fastfile": "0.0.20", + "ffjavascript": "0.2.56", + "js-sha3": "^0.8.0", + "logplease": "^1.2.15", + "r1csfile": "0.0.41" + }, + "bin": { + "snarkjs": "build/cli.cjs" + } + }, + "node_modules/snarkjs/node_modules/ffjavascript": { + "version": "0.2.56", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz", + "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.0", + "web-worker": "^1.2.0" + } + }, + "node_modules/snarkjs/node_modules/wasmcurves": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz", + "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, "node_modules/solc": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", @@ -6503,6 +9152,17 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/solc/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/solc/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -6511,6 +9171,17 @@ "semver": "bin/semver" } }, + "node_modules/solc/node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/solidity-ast": { "version": "0.4.55", "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.55.tgz", @@ -6644,7 +9315,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "optional": true, - "peer": true, "dependencies": { "amdefine": ">=0.0.4" }, @@ -6675,6 +9345,35 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "peer": true }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sshpk/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", @@ -6694,6 +9393,14 @@ "node": ">=8" } }, + "node_modules/static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "dependencies": { + "escodegen": "^1.8.1" + } + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -6702,6 +9409,14 @@ "node": ">= 0.8" } }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -6816,6 +9531,144 @@ "node": ">=4" } }, + "node_modules/swarm-js": { + "version": "0.1.42", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.42.tgz", + "integrity": "sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==", + "dependencies": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^11.8.5", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + } + }, + "node_modules/swarm-js/node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/swarm-js/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/swarm-js/node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/swarm-js/node_modules/fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "node_modules/swarm-js/node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/swarm-js/node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/swarm-js/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/swarm-js/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/swarm-js/node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/swarm-js/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -6888,6 +9741,23 @@ "node": ">=8" } }, + "node_modules/tar": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "dependencies": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "engines": { + "node": ">=4.5" + } + }, "node_modules/then-request": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", @@ -6930,15 +9800,53 @@ "node": ">= 0.12" } }, + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dependencies": { - "os-tmpdir": "~1.0.2" + "rimraf": "^3.0.0" }, "engines": { - "node": ">=0.6.0" + "node": ">=8.17.0" + } + }, + "node_modules/tmp-promise": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-2.1.1.tgz", + "integrity": "sha512-Z048AOz/w9b6lCbJUpevIJpRpUztENl8zdv1bmAKVHimfqRFl92ROkmT9rp7TVBnrEw2gtMTol/2Cp2S2kJa4Q==", + "dependencies": { + "tmp": "0.1.0" + } + }, + "node_modules/tmp-promise/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/tmp-promise/node_modules/tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "dependencies": { + "rimraf": "^2.6.3" + }, + "engines": { + "node": ">=6" } }, "node_modules/to-regex-range": { @@ -6960,6 +9868,28 @@ "node": ">=0.6" } }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" + }, "node_modules/ts-command-line-args": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", @@ -7114,6 +10044,17 @@ "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==" }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -7124,11 +10065,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "peer": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -7151,8 +10096,20 @@ "engines": { "node": ">=10" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" } }, "node_modules/typechain": { @@ -7285,167 +10242,591 @@ "is-typed-array": "^1.1.10" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "peer": true + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==" + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "node_modules/wasmbuilder": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz", + "integrity": "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==" + }, + "node_modules/wasmcurves": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz", + "integrity": "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, + "node_modules/web-worker": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" + }, + "node_modules/web3": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.3.tgz", + "integrity": "sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw==", + "hasInstallScript": true, + "dependencies": { + "web3-bzz": "1.10.3", + "web3-core": "1.10.3", + "web3-eth": "1.10.3", + "web3-eth-personal": "1.10.3", + "web3-net": "1.10.3", + "web3-shh": "1.10.3", + "web3-utils": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-bzz": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.3.tgz", + "integrity": "sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ==", + "hasInstallScript": true, + "dependencies": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-bzz/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/web3-core": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.3.tgz", + "integrity": "sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw==", + "dependencies": { + "@types/bn.js": "^5.1.1", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.10.3", + "web3-core-method": "1.10.3", + "web3-core-requestmanager": "1.10.3", + "web3-utils": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-helpers": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz", + "integrity": "sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==", + "dependencies": { + "web3-eth-iban": "1.10.3", + "web3-utils": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-method": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.3.tgz", + "integrity": "sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q==", + "dependencies": { + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.3", + "web3-core-promievent": "1.10.3", + "web3-core-subscriptions": "1.10.3", + "web3-utils": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-promievent": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz", + "integrity": "sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ==", + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-requestmanager": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz", + "integrity": "sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw==", + "dependencies": { + "util": "^0.12.5", + "web3-core-helpers": "1.10.3", + "web3-providers-http": "1.10.3", + "web3-providers-ipc": "1.10.3", + "web3-providers-ws": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-subscriptions": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz", + "integrity": "sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA==", + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/web3-eth": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.3.tgz", + "integrity": "sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA==", + "dependencies": { + "web3-core": "1.10.3", + "web3-core-helpers": "1.10.3", + "web3-core-method": "1.10.3", + "web3-core-subscriptions": "1.10.3", + "web3-eth-abi": "1.10.3", + "web3-eth-accounts": "1.10.3", + "web3-eth-contract": "1.10.3", + "web3-eth-ens": "1.10.3", + "web3-eth-iban": "1.10.3", + "web3-eth-personal": "1.10.3", + "web3-net": "1.10.3", + "web3-utils": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-abi": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz", + "integrity": "sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ==", + "dependencies": { + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "node_modules/web3-eth-accounts": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz", + "integrity": "sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ==", "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "@ethereumjs/common": "2.6.5", + "@ethereumjs/tx": "3.5.2", + "@ethereumjs/util": "^8.1.0", + "eth-lib": "0.2.8", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.10.3", + "web3-core-helpers": "1.10.3", + "web3-core-method": "1.10.3", + "web3-utils": "1.10.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "peer": true + "node_modules/web3-eth-accounts/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, - "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "node_modules/web3-eth-accounts/node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "node_modules/web3-eth-accounts/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" + "uuid": "dist/bin/uuid" } }, - "node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "peer": true, + "node_modules/web3-eth-contract": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz", + "integrity": "sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg==", + "dependencies": { + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.3", + "web3-core-helpers": "1.10.3", + "web3-core-method": "1.10.3", + "web3-core-promievent": "1.10.3", + "web3-core-subscriptions": "1.10.3", + "web3-eth-abi": "1.10.3", + "web3-utils": "1.10.3" + }, "engines": { - "node": ">=8" + "node": ">=8.0.0" } }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" + "node_modules/web3-eth-ens": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz", + "integrity": "sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ==", + "dependencies": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.10.3", + "web3-core-helpers": "1.10.3", + "web3-core-promievent": "1.10.3", + "web3-eth-abi": "1.10.3", + "web3-eth-contract": "1.10.3", + "web3-utils": "1.10.3" }, "engines": { - "node": ">=0.8.0" + "node": ">=8.0.0" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/web3-eth-iban": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz", + "integrity": "sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==", "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "bn.js": "^5.2.1", + "web3-utils": "1.10.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "node_modules/web3-eth-personal": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz", + "integrity": "sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw==", "dependencies": { - "@fastify/busboy": "^2.0.0" + "@types/node": "^12.12.6", + "web3-core": "1.10.3", + "web3-core-helpers": "1.10.3", + "web3-core-method": "1.10.3", + "web3-net": "1.10.3", + "web3-utils": "1.10.3" }, "engines": { - "node": ">=14.0" + "node": ">=8.0.0" } }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "node_modules/web3-eth-personal/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "peer": true, + "node_modules/web3-net": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.3.tgz", + "integrity": "sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg==", + "dependencies": { + "web3-core": "1.10.3", + "web3-core-method": "1.10.3", + "web3-utils": "1.10.3" + }, "engines": { - "node": ">= 10.0.0" + "node": ">=8.0.0" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/web3-providers-http": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.3.tgz", + "integrity": "sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw==", + "dependencies": { + "abortcontroller-polyfill": "^1.7.5", + "cross-fetch": "^4.0.0", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.3" + }, "engines": { - "node": ">= 0.8" + "node": ">=8.0.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "peer": true, + "node_modules/web3-providers-ipc": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz", + "integrity": "sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA==", "dependencies": { - "punycode": "^2.1.0" + "oboe": "2.1.5", + "web3-core-helpers": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "peer": true - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/web3-providers-ws": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz", + "integrity": "sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q==", + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.3", + "websocket": "^1.0.32" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "node_modules/wasmbuilder": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz", - "integrity": "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==" - }, - "node_modules/wasmcurves": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz", - "integrity": "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==", + "node_modules/web3-shh": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.3.tgz", + "integrity": "sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng==", + "hasInstallScript": true, "dependencies": { - "wasmbuilder": "0.0.16" + "web3-core": "1.10.3", + "web3-core-method": "1.10.3", + "web3-core-subscriptions": "1.10.3", + "web3-net": "1.10.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "node_modules/web-worker": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", - "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" - }, "node_modules/web3-utils": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", - "peer": true, "dependencies": { "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", @@ -7464,7 +10845,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", - "peer": true, "dependencies": { "@noble/hashes": "1.3.1" }, @@ -7476,7 +10856,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "peer": true, "engines": { "node": ">= 16" }, @@ -7488,7 +10867,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", - "peer": true, "dependencies": { "@noble/curves": "1.1.0", "@noble/hashes": "1.3.1", @@ -7496,6 +10874,49 @@ "@scure/bip39": "1.2.1" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/websocket/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/websocket/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -7523,6 +10944,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, "node_modules/which-typed-array": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", @@ -7541,11 +10967,57 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wide-align/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -7577,6 +11049,11 @@ "node": ">=8" } }, + "node_modules/worker-threads": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/worker-threads/-/worker-threads-1.0.0.tgz", + "integrity": "sha512-vK6Hhvph8oLxocEJIlc3YfGAZhm210uGzjZsXSu+JYLAQ/s/w4Tqgl60JrdH58hW8NSGP4m3bp8a92qPXgX05w==" + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -7653,6 +11130,47 @@ } } }, + "node_modules/xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "dependencies": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "node_modules/xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "dependencies": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "node_modules/xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "dependencies": { + "xhr-request": "^1.1.0" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7661,6 +11179,14 @@ "node": ">=10" } }, + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "engines": { + "node": ">=0.10.32" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/contracts/package.json b/contracts/package.json index f83fdecd8b..750576fe34 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -15,7 +15,7 @@ "test": "hardhat test", "test-maci": "hardhat test ./tests/MACI.test.ts", "test-hasher": "hardhat test ./tests/Hasher.test.ts", - "test-domainObjs": "hardhat test ./tests/DomainObjs.test.ts", + "test-utilities": "hardhat test ./tests/Utilities.test.ts", "test-signupGatekeeper": "hardhat test ./tests/SignUpGatekeeper.test.ts", "test-verifier": "hardhat test ./tests/Verifier.test.ts", "test-accQueue": "hardhat test ./tests/AccQueue.test.ts", diff --git a/contracts/tests/HasherBenchmarks.test.ts b/contracts/tests/HasherBenchmarks.test.ts index c1059867f3..2fca338b83 100644 --- a/contracts/tests/HasherBenchmarks.test.ts +++ b/contracts/tests/HasherBenchmarks.test.ts @@ -9,7 +9,6 @@ require("module-alias/register"); describe("Hasher", () => { let hasherContract: HasherBenchmarks; - before(async () => { const { PoseidonT3Contract, PoseidonT4Contract, PoseidonT5Contract, PoseidonT6Contract } = await deployPoseidonContracts(true); diff --git a/contracts/tests/DomainObjs.test.ts b/contracts/tests/Utilities.test.ts similarity index 76% rename from contracts/tests/DomainObjs.test.ts rename to contracts/tests/Utilities.test.ts index 0a739a269f..4ef3dedec1 100644 --- a/contracts/tests/DomainObjs.test.ts +++ b/contracts/tests/Utilities.test.ts @@ -2,10 +2,10 @@ import { expect } from "chai"; import { StateLeaf, Keypair } from "maci-domainobjs"; import { deployPoseidonContracts, linkPoseidonLibraries } from "../ts/deploy"; -import { DomainObjs } from "../typechain-types"; +import { Utilities } from "../typechain-types"; describe("DomainObjs", () => { - let doContract: DomainObjs; + let utilitiesContract: Utilities; describe("Deployment", () => { before(async () => { @@ -25,8 +25,8 @@ describe("DomainObjs", () => { ]); // Link Poseidon contracts - const doContractFactory = await linkPoseidonLibraries( - "DomainObjs", + const utilitiesContractFactory = await linkPoseidonLibraries( + "Utilities", poseidonT3ContractAddress, poseidonT4ContractAddress, poseidonT5ContractAddress, @@ -34,15 +34,15 @@ describe("DomainObjs", () => { true, ); - doContract = (await doContractFactory.deploy()) as typeof doContract; - await doContract.deploymentTransaction()?.wait(); + utilitiesContract = (await utilitiesContractFactory.deploy()) as Utilities; + await utilitiesContract.deploymentTransaction()?.wait(); }); it("should correctly hash a StateLeaf", async () => { const keypair = new Keypair(); const voiceCreditBalance = BigInt(1234); const stateLeaf = new StateLeaf(keypair.pubKey, voiceCreditBalance, BigInt(456546345)); - const onChainHash = await doContract.hashStateLeaf(stateLeaf.asContractParam()); + const onChainHash = await utilitiesContract.hashStateLeaf(stateLeaf.asContractParam()); const expectedHash = stateLeaf.hash(); expect(onChainHash.toString()).to.eq(expectedHash.toString()); diff --git a/core/ts/utils/utils.ts b/core/ts/utils/utils.ts index 04ea1ddd6e..8e3a59b00f 100644 --- a/core/ts/utils/utils.ts +++ b/core/ts/utils/utils.ts @@ -116,7 +116,7 @@ export const unpackProcessMessageSmallVals = (packedVals: bigint) => { * This function packs it's parameters into a single bigint. * @param batchStartIndex - The start index of the batch. * @param batchSize - The size of the batch. - * @param numSignUps - The number of sign ups. + * @param numSignUps - The number of signups. * @returns Returns a single bigint that contains the packed values. */ export const packTallyVotesSmallVals = (batchStartIndex: number, batchSize: number, numSignUps: number): bigint => { @@ -147,7 +147,7 @@ export const unpackTallyVotesSmallVals = (packedVals: bigint) => { * This function packs it's parameters into a single bigint. * @param row - The row. * @param col - The column. - * @param numSignUps - The number of sign ups. + * @param numSignUps - The number of signups. * @returns Returns a single bigint that contains the packed values. */ export const packSubsidySmallVals = (row: number, col: number, numSignUps: number) => { diff --git a/website/blog/2022-09-22-maci-v1-technical-introduction.md b/website/blog/2022-09-22-maci-v1-technical-introduction.md index 21b11bdda6..3dedd2d57c 100644 --- a/website/blog/2022-09-22-maci-v1-technical-introduction.md +++ b/website/blog/2022-09-22-maci-v1-technical-introduction.md @@ -116,7 +116,7 @@ The general workflow process can be broken down into 4 different phases: 3. Process Messages 4. Tally Results -These phases make use of 3 main smart contracts — MACI, Poll and ​​PollProcessorAndTallyer. These contracts can be found on the MACI github page. The MACI contract is responsible for keeping track of all the user sign ups by recording the initial public key for each user. When a vote is going to take place, users can deploy a Poll smart contract via MACI.deployPoll(). +These phases make use of 3 main smart contracts — MACI, Poll and ​​PollProcessorAndTallyer. These contracts can be found on the MACI github page. The MACI contract is responsible for keeping track of all the user signups by recording the initial public key for each user. When a vote is going to take place, users can deploy a Poll smart contract via MACI.deployPoll(). The Poll smart contract is where users submit their messages. One MACI contract can be used for multiple polls. In other words, the users that signed up to the MACI contract can vote on multiple issues, with each issue represented by a distinct Poll contract.