From 4e7981c83abea2eb5dc37be2a6e640b2848442a1 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Tue, 2 Mar 2021 02:47:58 +0300 Subject: [PATCH 01/24] Contracts: Add getter for matching pool size --- contracts/contracts/FundingRoundFactory.sol | 19 +++++++++++++ contracts/tests/factory.ts | 16 ++++++++++- vue-app/src/api/round.ts | 30 +-------------------- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/contracts/contracts/FundingRoundFactory.sol b/contracts/contracts/FundingRoundFactory.sol index 815bcefcc..350656b91 100644 --- a/contracts/contracts/FundingRoundFactory.sol +++ b/contracts/contracts/FundingRoundFactory.sol @@ -175,6 +175,25 @@ contract FundingRoundFactory is Ownable, MACISharedObjs { emit RoundStarted(address(newRound)); } + /** + * @dev Get total amount of matching funds. + */ + function getMatchingFunds(ERC20 token) + external + view + returns (uint256) + { + uint256 matchingPoolSize = token.balanceOf(address(this)); + for (uint256 index = 0; index < fundingSources.length(); index++) { + address fundingSource = fundingSources.at(index); + uint256 allowance = token.allowance(fundingSource, address(this)); + uint256 balance = token.balanceOf(fundingSource); + uint256 contribution = allowance < balance ? allowance : balance; + matchingPoolSize += contribution; + } + return matchingPoolSize; + } + /** * @dev Transfer funds from matching pool to current funding round and finalize it. * @param _totalSpent Total amount of spent voice credits. diff --git a/contracts/tests/factory.ts b/contracts/tests/factory.ts index 91acfeaf9..69f760569 100644 --- a/contracts/tests/factory.ts +++ b/contracts/tests/factory.ts @@ -293,6 +293,20 @@ describe('Funding Round Factory', () => { roundDuration = maciParameters.signUpDuration + maciParameters.votingDuration + 10 }) + it('returns the amount of available matching funding', async () => { + await factory.addFundingSource(deployer.address) + await factory.addFundingSource(contributor.address) + // Allowance is more than available balance + await token.connect(deployer).approve(factory.address, contributionAmount) + // Allowance is less than available balance + await token.connect(contributor).approve(factory.address, contributionAmount) + // Direct contribution + await token.connect(contributor).transfer(factory.address, contributionAmount) + await factory.deployNewRound() + expect(await factory.getMatchingFunds(token.address)) + .to.equal(contributionAmount.mul(2)) + }) + it('allows owner to finalize round', async () => { await token.connect(contributor).transfer(factory.address, contributionAmount) await factory.deployNewRound(); @@ -311,7 +325,7 @@ describe('Funding Round Factory', () => { it('pulls funds from funding source', async () => { await factory.addFundingSource(contributor.address) token.connect(contributor).approve(factory.address, contributionAmount) - await factory.addFundingSource(deployer.address) // Not a funding source + await factory.addFundingSource(deployer.address) // Doesn't have tokens await factory.deployNewRound() await provider.send('evm_increaseTime', [roundDuration]) await expect(factory.transferMatchingFunds(totalSpent, totalSpentSalt)) diff --git a/vue-app/src/api/round.ts b/vue-app/src/api/round.ts index 8bb6a3e92..ef470dc8b 100644 --- a/vue-app/src/api/round.ts +++ b/vue-app/src/api/round.ts @@ -47,32 +47,6 @@ export async function getCurrentRound(): Promise { return fundingRoundAddress } -async function getApprovedFunding( - fundingRound: Contract, - token: Contract, -): Promise { - // TODO: replace with single call when necessary getter will be implemented - const addSourceFilter = factory.filters.FundingSourceAdded() - const addSourceEvents = await factory.queryFilter(addSourceFilter, 0) - const removeSourceFilter = factory.filters.FundingSourceRemoved() - const removeSourceEvents = await factory.queryFilter(removeSourceFilter, 0) - let total = BigNumber.from(0) - for (const event of addSourceEvents) { - const sourceAddress = (event.args as any)._source - const removed = removeSourceEvents.find((event) => { - return (event.args as any)._source === sourceAddress - }) - if (removed) { - continue - } - const allowance = await token.allowance(sourceAddress, factory.address) - const balance = await token.balanceOf(sourceAddress) - const contribution = allowance.lt(balance) ? allowance : balance - total = total.add(contribution) - } - return total -} - async function getRoundNumber(roundAddress: string): Promise { const eventFilter = factory.filters.RoundStarted() const events = await factory.queryFilter(eventFilter, 0) @@ -172,9 +146,7 @@ export async function getRoundInfo(fundingRoundAddress: string): Promise Date: Mon, 15 Mar 2021 16:35:59 +0300 Subject: [PATCH 02/24] Contracts: Fix invalid flag in ItemStatusChange event Fixes #235 --- contracts/contracts/recipientRegistry/KlerosGTCRMock.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/contracts/recipientRegistry/KlerosGTCRMock.sol b/contracts/contracts/recipientRegistry/KlerosGTCRMock.sol index 6675c87f7..88505c3c6 100644 --- a/contracts/contracts/recipientRegistry/KlerosGTCRMock.sol +++ b/contracts/contracts/recipientRegistry/KlerosGTCRMock.sol @@ -94,7 +94,7 @@ contract KlerosGTCRMock is Ownable { itemList.push(itemID); itemIDtoIndex[itemID] = itemList.length - 1; emit ItemSubmitted(itemID, msg.sender, 0, item.data); - emit ItemStatusChange(itemID, 0, 0, false, false); + emit ItemStatusChange(itemID, 0, 0, false, true); } /** @dev Submit a request to remove an item from the list. Accepts enough ETH to cover the deposit, reimburses the rest. From d994ec2277ac6e7488e93fe13d1b812e74138ff1 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Tue, 2 Mar 2021 12:35:45 +0300 Subject: [PATCH 03/24] Contracts: Use timestamps instead of block numbers in recipient registries --- contracts/contracts/FundingRound.sol | 8 +- .../BaseRecipientRegistry.sol | 16 +-- .../recipientRegistry/KlerosGTCRAdapter.sol | 16 ++- .../SimpleRecipientRegistry.sol | 17 ++- contracts/tests/recipientRegistry.ts | 109 +++++++++--------- contracts/tests/round.ts | 4 +- vue-app/src/api/projects.ts | 10 +- vue-app/src/api/recipient-registry-kleros.ts | 16 +-- .../src/api/recipient-registry-optimistic.ts | 14 ++- vue-app/src/api/recipient-registry-simple.ts | 14 ++- vue-app/src/api/round.ts | 17 +-- vue-app/src/views/ProjectList.vue | 4 +- 12 files changed, 130 insertions(+), 115 deletions(-) diff --git a/contracts/contracts/FundingRound.sol b/contracts/contracts/FundingRound.sol index 81507d574..8a453fb77 100644 --- a/contracts/contracts/FundingRound.sol +++ b/contracts/contracts/FundingRound.sol @@ -29,7 +29,6 @@ contract FundingRound is Ownable, MACISharedObjs, SignUpGatekeeper, InitialVoice } // State - uint256 public startBlock; uint256 public voiceCreditFactor; uint256 public contributorCount; uint256 public matchingPoolSize; @@ -75,7 +74,6 @@ contract FundingRound is Ownable, MACISharedObjs, SignUpGatekeeper, InitialVoice userRegistry = _userRegistry; recipientRegistry = _recipientRegistry; coordinator = _coordinator; - startBlock = block.number; } /** @@ -316,11 +314,11 @@ contract FundingRound is Ownable, MACISharedObjs, SignUpGatekeeper, InitialVoice require(spentVerified, 'FundingRound: Incorrect amount of spent voice credits'); } recipients[_voteOptionIndex] = true; + uint256 startTime = maci.signUpTimestamp(); address recipient = recipientRegistry.getRecipientAddress( _voteOptionIndex, - startBlock, - // TODO: use block numbers in MACI - startBlock + (maci.signUpDurationSeconds() + maci.votingDurationSeconds()) / 15 + startTime, + startTime + maci.signUpDurationSeconds() + maci.votingDurationSeconds() ); if (recipient == address(0)) { // Send funds back to the matching pool diff --git a/contracts/contracts/recipientRegistry/BaseRecipientRegistry.sol b/contracts/contracts/recipientRegistry/BaseRecipientRegistry.sol index 51f83f4c1..dbce99ee1 100644 --- a/contracts/contracts/recipientRegistry/BaseRecipientRegistry.sol +++ b/contracts/contracts/recipientRegistry/BaseRecipientRegistry.sol @@ -77,7 +77,7 @@ abstract contract BaseRecipientRegistry is IRecipientRegistry { recipientIndex = recipients[removedRecipient].index; slots[recipientIndex - 1].push(_recipientId); } - recipients[_recipientId] = Recipient(_recipient, recipientIndex, block.number, 0); + recipients[_recipientId] = Recipient(_recipient, recipientIndex, block.timestamp, 0); return recipientIndex; } @@ -90,21 +90,21 @@ abstract contract BaseRecipientRegistry is IRecipientRegistry { { require(recipients[_recipientId].index != 0, 'RecipientRegistry: Recipient is not in the registry'); require(recipients[_recipientId].removedAt == 0, 'RecipientRegistry: Recipient already removed'); - recipients[_recipientId].removedAt = block.number; + recipients[_recipientId].removedAt = block.timestamp; removed.push(_recipientId); } /** * @dev Get recipient address by index. * @param _index Recipient index. - * @param _startBlock Starting block of the funding round. - * @param _endBlock Ending block of the funding round. + * @param _startTime The start time of the funding round. + * @param _endTime The end time of the funding round. * @return Recipient address. */ function getRecipientAddress( uint256 _index, - uint256 _startBlock, - uint256 _endBlock + uint256 _startTime, + uint256 _endTime ) override external @@ -123,11 +123,11 @@ abstract contract BaseRecipientRegistry is IRecipientRegistry { for (uint256 idx = history.length; idx > 0; idx--) { bytes32 recipientId = history[idx - 1]; Recipient memory recipient = recipients[recipientId]; - if (recipient.addedAt > _endBlock) { + if (recipient.addedAt > _endTime) { // Recipient added after the end of the funding round, skip continue; } - else if (recipient.removedAt != 0 && recipient.removedAt <= _startBlock) { + else if (recipient.removedAt != 0 && recipient.removedAt <= _startTime) { // Recipient had been already removed when the round started // Stop search because subsequent items were removed even earlier return prevRecipientAddress; diff --git a/contracts/contracts/recipientRegistry/KlerosGTCRAdapter.sol b/contracts/contracts/recipientRegistry/KlerosGTCRAdapter.sol index 9cb8fca86..344b981ef 100644 --- a/contracts/contracts/recipientRegistry/KlerosGTCRAdapter.sol +++ b/contracts/contracts/recipientRegistry/KlerosGTCRAdapter.sol @@ -23,8 +23,16 @@ contract KlerosGTCRAdapter is BaseRecipientRegistry { IKlerosGTCR public tcr; // Events - event RecipientAdded(bytes32 indexed _tcrItemId, bytes _metadata, uint256 _index); - event RecipientRemoved(bytes32 indexed _tcrItemId); + event RecipientAdded( + bytes32 indexed _tcrItemId, + bytes _metadata, + uint256 _index, + uint256 _timestamp + ); + event RecipientRemoved( + bytes32 indexed _tcrItemId, + uint256 _timestamp + ); /** * @dev Deploy the registry. @@ -54,7 +62,7 @@ contract KlerosGTCRAdapter is BaseRecipientRegistry { // Recipient address is at index 1 address recipientAddress = recipientData[1].toAddress(); uint256 recipientIndex = _addRecipient(_tcrItemId, recipientAddress); - emit RecipientAdded(_tcrItemId, rlpData, recipientIndex); + emit RecipientAdded(_tcrItemId, rlpData, recipientIndex, block.timestamp); } /** @@ -67,6 +75,6 @@ contract KlerosGTCRAdapter is BaseRecipientRegistry { (,uint256 status,) = tcr.getItemInfo(_tcrItemId); require(status == STATUS_ABSENT, 'RecipientRegistry: Item is not removed from TCR'); _removeRecipient(_tcrItemId); - emit RecipientRemoved(_tcrItemId); + emit RecipientRemoved(_tcrItemId, block.timestamp); } } diff --git a/contracts/contracts/recipientRegistry/SimpleRecipientRegistry.sol b/contracts/contracts/recipientRegistry/SimpleRecipientRegistry.sol index e086850de..9f37215e8 100644 --- a/contracts/contracts/recipientRegistry/SimpleRecipientRegistry.sol +++ b/contracts/contracts/recipientRegistry/SimpleRecipientRegistry.sol @@ -12,8 +12,17 @@ import './BaseRecipientRegistry.sol'; contract SimpleRecipientRegistry is Ownable, BaseRecipientRegistry { // Events - event RecipientAdded(bytes32 indexed _recipientId, address _recipient, string _metadata, uint256 _index); - event RecipientRemoved(bytes32 indexed _recipientId); + event RecipientAdded( + bytes32 indexed _recipientId, + address _recipient, + string _metadata, + uint256 _index, + uint256 _timestamp + ); + event RecipientRemoved( + bytes32 indexed _recipientId, + uint256 _timestamp + ); /** * @dev Deploy the registry. @@ -40,7 +49,7 @@ contract SimpleRecipientRegistry is Ownable, BaseRecipientRegistry { require(bytes(_metadata).length != 0, 'RecipientRegistry: Metadata info is empty string'); bytes32 recipientId = keccak256(abi.encodePacked(_recipient, _metadata)); uint256 recipientIndex = _addRecipient(recipientId, _recipient); - emit RecipientAdded(recipientId, _recipient, _metadata, recipientIndex); + emit RecipientAdded(recipientId, _recipient, _metadata, recipientIndex, block.timestamp); } /** @@ -52,6 +61,6 @@ contract SimpleRecipientRegistry is Ownable, BaseRecipientRegistry { onlyOwner { _removeRecipient(_recipientId); - emit RecipientRemoved(_recipientId); + emit RecipientRemoved(_recipientId, block.timestamp); } } diff --git a/contracts/tests/recipientRegistry.ts b/contracts/tests/recipientRegistry.ts index 30371e785..74461c010 100644 --- a/contracts/tests/recipientRegistry.ts +++ b/contracts/tests/recipientRegistry.ts @@ -14,10 +14,6 @@ use(solidity) const { provider } = waffle const MAX_RECIPIENTS = 15 -async function getCurrentBlockNumber(): Promise { - return (await provider.getBlock('latest')).number -} - async function getCurrentTime(): Promise { return (await provider.getBlock('latest')).timestamp } @@ -81,20 +77,23 @@ describe('Simple Recipient Registry', () => { }) it('allows owner to add recipient', async () => { - await expect(registry.addRecipient(recipientAddress, metadata)) + const recipientAdded = await registry.addRecipient(recipientAddress, metadata) + let currentTime = await getCurrentTime() + expect(recipientAdded) .to.emit(registry, 'RecipientAdded') - .withArgs(recipientId, recipientAddress, metadata, recipientIndex) - const currentBlock = await getCurrentBlockNumber() + .withArgs(recipientId, recipientAddress, metadata, recipientIndex, currentTime) expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(recipientAddress) const anotherRecipientAddress = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' const anotherRecipientId = getRecipientId(anotherRecipientAddress, metadata) + const anotherRecipientAdded = await registry.addRecipient(anotherRecipientAddress, metadata) + currentTime = await getCurrentTime() // Should increase recipient index for every new recipient - await expect(registry.addRecipient(anotherRecipientAddress, metadata)) + expect(anotherRecipientAdded) .to.emit(registry, 'RecipientAdded') - .withArgs(anotherRecipientId, anotherRecipientAddress, metadata, recipientIndex + 1) + .withArgs(anotherRecipientId, anotherRecipientAddress, metadata, recipientIndex + 1, currentTime) }) it('rejects attempts to add recipient from anyone except owner', async () => { @@ -138,12 +137,13 @@ describe('Simple Recipient Registry', () => { it('allows owner to remove recipient', async () => { await registry.addRecipient(recipientAddress, metadata) - await expect(registry.removeRecipient(recipientId)) + const recipientRemoved = await registry.removeRecipient(recipientId) + const currentTime = await getCurrentTime() + expect(recipientRemoved) .to.emit(registry, 'RecipientRemoved') - .withArgs(recipientId) - const currentBlock = await getCurrentBlockNumber() + .withArgs(recipientId, currentTime) expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(ZERO_ADDRESS) }) @@ -167,23 +167,23 @@ describe('Simple Recipient Registry', () => { }) it('should not return recipient address for recipient that has been added after the end of round', async () => { - const startBlock = await getCurrentBlockNumber() + const startTime = await getCurrentTime() await provider.send('evm_increaseTime', [1000]) - const endBlock = await getCurrentBlockNumber() + const endTime = await getCurrentTime() await registry.addRecipient(recipientAddress, metadata) expect(await registry.getRecipientAddress( - recipientIndex, startBlock, endBlock, + recipientIndex, startTime, endTime, )).to.equal(ZERO_ADDRESS) }) it('should return recipient address for recipient that has been removed after the beginning of round', async () => { await registry.addRecipient(recipientAddress, metadata) - const startBlock = await getCurrentBlockNumber() + const startTime = await getCurrentTime() await registry.removeRecipient(recipientId) await provider.send('evm_increaseTime', [1000]) - const endBlock = await getCurrentBlockNumber() + const endTime = await getCurrentTime() expect(await registry.getRecipientAddress( - recipientIndex, startBlock, endBlock, + recipientIndex, startTime, endTime, )).to.equal(recipientAddress) }) @@ -194,7 +194,7 @@ describe('Simple Recipient Registry', () => { recipientAddress = `0x000000000000000000000000000000000000${recipientName}` await registry.addRecipient(recipientAddress, metadata) } - const blockNumber1 = await getCurrentBlockNumber() + const time1 = await getCurrentTime() // Replace recipients const removedRecipient1 = '0x0000000000000000000000000000000000000001' @@ -210,40 +210,40 @@ describe('Simple Recipient Registry', () => { await registry.addRecipient(addedRecipient2, metadata) await expect(registry.addRecipient(addedRecipient3, metadata)) .to.be.revertedWith('RecipientRegistry: Recipient limit reached') - const blockNumber2 = await getCurrentBlockNumber() + const time2 = await getCurrentTime() // Recipients removed during the round should still be valid expect(await registry.getRecipientAddress( - 1, blockNumber1, blockNumber2, + 1, time1, time2, )).to.equal(removedRecipient1) expect(await registry.getRecipientAddress( - 2, blockNumber1, blockNumber2, + 2, time1, time2, )).to.equal(removedRecipient2) await provider.send('evm_increaseTime', [1000]) - const blockNumber3 = await getCurrentBlockNumber() + const time3 = await getCurrentTime() // Recipients removed before the beginning of the round should be replaced expect(await registry.getRecipientAddress( - 1, blockNumber2, blockNumber3, + 1, time2, time3, )).to.equal(addedRecipient2) expect(await registry.getRecipientAddress( - 2, blockNumber2, blockNumber3, + 2, time2, time3, )).to.equal(addedRecipient1) }) }) describe('get recipient address', () => { it('should return zero address for zero index', async () => { - const currentBlock = await getCurrentBlockNumber() + const currentTime = await getCurrentTime() expect(await registry.getRecipientAddress( - 0, currentBlock, currentBlock, + 0, currentTime, currentTime, )).to.equal(ZERO_ADDRESS) }) it('should return zero address for unregistered recipient', async () => { - const currentBlock = await getCurrentBlockNumber() + const currentTime = await getCurrentTime() expect(await registry.getRecipientAddress( - 99, currentBlock, currentBlock, + 99, currentTime, currentTime, )).to.equal(ZERO_ADDRESS) }) }) @@ -298,21 +298,24 @@ describe('Kleros GTCR adapter', () => { it('allows anyone to add recipient', async () => { await tcr.addItem(recipientData) - await expect(registry.connect(recipient).addRecipient(recipientId)) + const recipientAdded = await registry.connect(recipient).addRecipient(recipientId) + let currentTime = await getCurrentTime() + expect(recipientAdded) .to.emit(registry, 'RecipientAdded') - .withArgs(recipientId, recipientData, recipientIndex) - const currentBlock = await getCurrentBlockNumber() + .withArgs(recipientId, recipientData, recipientIndex, currentTime) expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(recipient.address) const anotherRecipientAddress = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' const [anotherRecipientId, anotherRecipientData] = encodeRecipient(anotherRecipientAddress) await tcr.addItem(anotherRecipientData) + const anotherRecipientAdded = await registry.connect(recipient).addRecipient(anotherRecipientId) + currentTime = await getCurrentTime() // Should increase recipient index for every new recipient - await expect(registry.connect(recipient).addRecipient(anotherRecipientId)) + expect(anotherRecipientAdded) .to.emit(registry, 'RecipientAdded') - .withArgs(anotherRecipientId, anotherRecipientData, recipientIndex + 1) + .withArgs(anotherRecipientId, anotherRecipientData, recipientIndex + 1, currentTime) }) it('should not accept recipient who is not registered in TCR', async () => { @@ -336,12 +339,13 @@ describe('Kleros GTCR adapter', () => { await tcr.addItem(recipientData) await registry.connect(recipient).addRecipient(recipientId) await tcr.removeItem(recipientId) - await expect(registry.connect(recipient).removeRecipient(recipientId)) + const recipientRemoved = await registry.connect(recipient).removeRecipient(recipientId) + const currentTime = await getCurrentTime() + expect(recipientRemoved) .to.emit(registry, 'RecipientRemoved') - .withArgs(recipientId) - const currentBlock = await getCurrentBlockNumber() + .withArgs(recipientId, currentTime) expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(ZERO_ADDRESS) }) @@ -386,7 +390,7 @@ describe('Kleros GTCR adapter', () => { const recipientAddress = `0x100000000000000000000000000000000000${recipientName}` await addRecipient(recipientAddress) } - const blockNumber1 = await getCurrentBlockNumber() + const time1 = await getCurrentTime() // Replace recipients const removedRecipient1 = '0x1000000000000000000000000000000000000001' @@ -400,24 +404,24 @@ describe('Kleros GTCR adapter', () => { await addRecipient(addedRecipient2) await expect(addRecipient(addedRecipient3)) .to.be.revertedWith('RecipientRegistry: Recipient limit reached') - const blockNumber2 = await getCurrentBlockNumber() + const time2 = await getCurrentTime() // Recipients removed during the round should still be valid expect(await registry.getRecipientAddress( - 1, blockNumber1, blockNumber2, + 1, time1, time2, )).to.equal(removedRecipient1) expect(await registry.getRecipientAddress( - 2, blockNumber1, blockNumber2, + 2, time1, time2, )).to.equal(removedRecipient2) await provider.send('evm_increaseTime', [1000]) - const blockNumber3 = await getCurrentBlockNumber() + const time3 = await getCurrentTime() // Recipients removed before the beginning of the round should be replaced expect(await registry.getRecipientAddress( - 1, blockNumber2, blockNumber3, + 1, time2, time3, )).to.equal(addedRecipient2) expect(await registry.getRecipientAddress( - 2, blockNumber2, blockNumber3, + 2, time2, time3, )).to.equal(addedRecipient1) }) }) @@ -600,9 +604,8 @@ describe('Optimistic recipient registry', () => { expect(requesterBalanceBefore.sub(txFee).add(baseDeposit)) .to.equal(requesterBalanceAfter) - const currentBlock = await getCurrentBlockNumber() expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(recipientAddress) }) @@ -744,9 +747,8 @@ describe('Optimistic recipient registry', () => { expect(requesterBalanceBefore.add(baseDeposit)).to.equal(requesterBalanceAfter) // Recipient is not removed - const currentBlock = await getCurrentBlockNumber() expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(recipientAddress) }) @@ -771,9 +773,8 @@ describe('Optimistic recipient registry', () => { expect(requesterBalanceBefore.sub(txFee).add(baseDeposit)) .to.equal(requesterBalanceAfter) - const currentBlock = await getCurrentBlockNumber() expect(await registry.getRecipientAddress( - recipientIndex, currentBlock, currentBlock, + recipientIndex, currentTime, currentTime, )).to.equal(ZERO_ADDRESS) }) }) diff --git a/contracts/tests/round.ts b/contracts/tests/round.ts index 838f94ff4..199f4766b 100644 --- a/contracts/tests/round.ts +++ b/contracts/tests/round.ts @@ -34,8 +34,10 @@ describe('Funding Round', () => { async function deployMaciMock(): Promise { const MACIArtifact = await artifacts.readArtifact('MACI') const maci = await deployMockContract(deployer, MACIArtifact.abi) - const signUpDeadline = (await provider.getBlock('latest')).timestamp + signUpDuration + const currentTime = (await provider.getBlock('latest')).timestamp + const signUpDeadline = currentTime + signUpDuration const votingDeadline = signUpDeadline + votingDuration + await maci.mock.signUpTimestamp.returns(currentTime) await maci.mock.signUpDurationSeconds.returns(signUpDuration) await maci.mock.votingDurationSeconds.returns(votingDuration) await maci.mock.calcSignUpDeadline.returns(signUpDeadline) diff --git a/vue-app/src/api/projects.ts b/vue-app/src/api/projects.ts index 86cf0a7d7..0342f0252 100644 --- a/vue-app/src/api/projects.ts +++ b/vue-app/src/api/projects.ts @@ -30,15 +30,15 @@ export async function getRecipientRegistryAddress(roundAddress: string | null): export async function getProjects( registryAddress: string, - startBlock?: number, - endBlock?: number, + startTime?: number, + endTime?: number, ): Promise { if (recipientRegistryType === 'simple') { - return await SimpleRegistry.getProjects(registryAddress, startBlock, endBlock) + return await SimpleRegistry.getProjects(registryAddress, startTime, endTime) } else if (recipientRegistryType === 'optimistic') { - return await OptimisticRegistry.getProjects(registryAddress, startBlock, endBlock) + return await OptimisticRegistry.getProjects(registryAddress, startTime, endTime) } else if (recipientRegistryType === 'kleros') { - return await KlerosRegistry.getProjects(registryAddress, startBlock, endBlock) + return await KlerosRegistry.getProjects(registryAddress, startTime, endTime) } else { throw new Error('invalid recipient registry type') } diff --git a/vue-app/src/api/recipient-registry-kleros.ts b/vue-app/src/api/recipient-registry-kleros.ts index 829c47284..d42147f2d 100644 --- a/vue-app/src/api/recipient-registry-kleros.ts +++ b/vue-app/src/api/recipient-registry-kleros.ts @@ -65,8 +65,8 @@ function decodeRecipientAdded(event: Event, columns: TcrColumn[]): Project { export async function getProjects( registryAddress: string, - startBlock?: number, - endBlock?: number, + startTime?: number, + endTime?: number, ): Promise { const registry = new Contract(registryAddress, KlerosGTCRAdapter, provider) const tcrAddress = await registry.tcr() @@ -79,19 +79,19 @@ export async function getProjects( const projects: Project[] = [] for (const event of recipientAddedEvents) { const project = decodeRecipientAdded(event, tcrColumns) - if (endBlock && event.blockNumber >= endBlock) { + const addedAt = (event.args as any)._timestamp.toNumber() + if (endTime && addedAt >= endTime) { // Hide recipient if it is added after the end of round. - // We can not do this with filter because on xDai node returns - // "One of the blocks specified in filter ... cannot be found" project.isHidden = true } const removed = recipientRemovedEvents.find((event) => { return (event.args as any)._tcrItemId === project.id }) if (removed) { - if (!startBlock || startBlock && removed.blockNumber <= startBlock) { - // Start block not specified - // or recipient had been removed before start block + const removedAt = (removed.args as any)._timestamp.toNumber() + if (!startTime || startTime && removedAt <= startTime) { + // Start time not specified + // or recipient had been removed before start time project.isHidden = true } else { // Disallow contributions to removed recipient, but don't hide it diff --git a/vue-app/src/api/recipient-registry-optimistic.ts b/vue-app/src/api/recipient-registry-optimistic.ts index 6eb444e5c..08aafacaf 100644 --- a/vue-app/src/api/recipient-registry-optimistic.ts +++ b/vue-app/src/api/recipient-registry-optimistic.ts @@ -175,8 +175,8 @@ function decodeProject(requestSubmittedEvent: Event): Project { export async function getProjects( registryAddress: string, - startBlock?: number, - endBlock?: number, + startTime?: number, + endTime?: number, ): Promise { const registry = new Contract(registryAddress, OptimisticRecipientRegistry, provider) const now = DateTime.now().toSeconds() @@ -210,7 +210,8 @@ export async function getProjects( if (isRejected) { continue } else { - if (endBlock && registration.blockNumber >= endBlock) { + const addedAt = (registration.args as any)._timestamp.toNumber() + if (endTime && addedAt >= endTime) { // Hide recipient if it is added after the end of round project.isHidden = true } @@ -227,9 +228,10 @@ export async function getProjects( ) }) if (removed) { - if (!startBlock || startBlock && removed.blockNumber <= startBlock) { - // Start block not specified - // or recipient had been removed before start block + const removedAt = (removed.args as any)._timestamp.toNumber() + if (!startTime || startTime && removedAt <= startTime) { + // Start time not specified + // or recipient had been removed before start time project.isHidden = true } else { // Disallow contributions to removed recipient, but don't hide it diff --git a/vue-app/src/api/recipient-registry-simple.ts b/vue-app/src/api/recipient-registry-simple.ts index d45389c4e..bee7690a8 100644 --- a/vue-app/src/api/recipient-registry-simple.ts +++ b/vue-app/src/api/recipient-registry-simple.ts @@ -22,8 +22,8 @@ function decodeRecipientAdded(event: Event): Project { export async function getProjects( registryAddress: string, - startBlock?: number, - endBlock?: number, + startTime?: number, + endTime?: number, ): Promise { const registry = new Contract(registryAddress, SimpleRecipientRegistry, provider) const recipientAddedFilter = registry.filters.RecipientAdded() @@ -39,7 +39,8 @@ export async function getProjects( // Invalid metadata continue } - if (endBlock && event.blockNumber >= endBlock) { + const addedAt = (event.args as any)._timestamp.toNumber() + if (endTime && addedAt >= endTime) { // Hide recipient if it is added after the end of round project.isHidden = true } @@ -47,9 +48,10 @@ export async function getProjects( return (event.args as any)._recipientId === project.id }) if (removed) { - if (!startBlock || startBlock && removed.blockNumber <= startBlock) { - // Start block not specified - // or recipient had been removed before start block + const removedAt = (removed.args as any)._timestamp.toNumber() + if (!startTime || startTime && removedAt <= startTime) { + // Start time not specified + // or recipient had been removed before start time project.isHidden = true } else { // Disallow contributions to removed recipient, but don't hide it diff --git a/vue-app/src/api/round.ts b/vue-app/src/api/round.ts index ef470dc8b..9f6698fca 100644 --- a/vue-app/src/api/round.ts +++ b/vue-app/src/api/round.ts @@ -14,14 +14,13 @@ export interface RoundInfo { recipientTreeDepth: number; maxContributors: number; maxMessages: number; - startBlock: number; - endBlock: number; coordinatorPubKey: PubKey; nativeTokenAddress: string; nativeTokenSymbol: string; nativeTokenDecimals: number; voiceCreditFactor: BigNumber; status: string; + startTime: DateTime; signUpDeadline: DateTime; votingDeadline: DateTime; totalFunds: FixedNumber; @@ -71,7 +70,6 @@ export async function getRoundInfo(fundingRoundAddress: string): Promise { return (!project.isHidden && !project.isLocked) From bc3c870594056229434ff71b4145dbb402e9d400 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Thu, 18 Mar 2021 23:01:44 +0300 Subject: [PATCH 04/24] Frontend: Simplify recipient filtering conditions --- vue-app/src/api/recipient-registry-kleros.ts | 2 +- vue-app/src/api/recipient-registry-optimistic.ts | 2 +- vue-app/src/api/recipient-registry-simple.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vue-app/src/api/recipient-registry-kleros.ts b/vue-app/src/api/recipient-registry-kleros.ts index d42147f2d..0b8c730b4 100644 --- a/vue-app/src/api/recipient-registry-kleros.ts +++ b/vue-app/src/api/recipient-registry-kleros.ts @@ -89,7 +89,7 @@ export async function getProjects( }) if (removed) { const removedAt = (removed.args as any)._timestamp.toNumber() - if (!startTime || startTime && removedAt <= startTime) { + if (!startTime || removedAt <= startTime) { // Start time not specified // or recipient had been removed before start time project.isHidden = true diff --git a/vue-app/src/api/recipient-registry-optimistic.ts b/vue-app/src/api/recipient-registry-optimistic.ts index 08aafacaf..3bf6d5dc9 100644 --- a/vue-app/src/api/recipient-registry-optimistic.ts +++ b/vue-app/src/api/recipient-registry-optimistic.ts @@ -229,7 +229,7 @@ export async function getProjects( }) if (removed) { const removedAt = (removed.args as any)._timestamp.toNumber() - if (!startTime || startTime && removedAt <= startTime) { + if (!startTime || removedAt <= startTime) { // Start time not specified // or recipient had been removed before start time project.isHidden = true diff --git a/vue-app/src/api/recipient-registry-simple.ts b/vue-app/src/api/recipient-registry-simple.ts index bee7690a8..f08868e14 100644 --- a/vue-app/src/api/recipient-registry-simple.ts +++ b/vue-app/src/api/recipient-registry-simple.ts @@ -49,7 +49,7 @@ export async function getProjects( }) if (removed) { const removedAt = (removed.args as any)._timestamp.toNumber() - if (!startTime || startTime && removedAt <= startTime) { + if (!startTime || removedAt <= startTime) { // Start time not specified // or recipient had been removed before start time project.isHidden = true From 632d2a68967982cb05f787062c1f61eaeab23fa7 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Tue, 2 Mar 2021 03:22:15 +0300 Subject: [PATCH 05/24] Contracts: Upgrade maci to version 0.6.7 --- contracts/README.md | 4 +- contracts/contracts/FundingRoundFactory.sol | 1 + contracts/contracts/MACIFactory.sol | 4 +- .../BatchUpdateStateTreeVerifier.sol | 50 +- .../snarkVerifiers/QuadVoteTallyVerifier.sol | 30 +- contracts/e2e/index.ts | 60 +- contracts/package.json | 8 +- contracts/scripts/tally.ts | 25 +- contracts/tests/maciFactory.ts | 2 + contracts/tests/round.ts | 1 + docs/coordinator.md | 25 +- docs/trusted-setup.md | 4 +- vue-app/package.json | 2 +- yarn.lock | 1181 ++++++----------- 14 files changed, 497 insertions(+), 900 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index 8771b434a..724d1ce1e 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -4,10 +4,10 @@ Install [zkutil](https://github.com/poma/zkutil) (see instructions in [MACI readme](https://github.com/appliedzkp/maci#get-started)). -Download [zkSNARK parameters](https://ipfs.io/ipfs/QmeBhtC46dXSEXaemgiAjzpzTxH6FykXDgnTdvHujjPaAR) for 'test' circuits to `snark-params` directory. Example: +Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/Qmbi3nqjBwANPMk5BRyKjCJ4QSHK6WNp7v9NLLo4uwrG1f) for 'test' circuits to `snark-params` directory. Example: ``` -ipfs get --output snark-params QmeBhtC46dXSEXaemgiAjzpzTxH6FykXDgnTdvHujjPaAR +ipfs get --output snark-params Qmbi3nqjBwANPMk5BRyKjCJ4QSHK6WNp7v9NLLo4uwrG1f ``` Set the path to downloaded parameter files and also the path to `zkutil` binary (if needed): diff --git a/contracts/contracts/FundingRoundFactory.sol b/contracts/contracts/FundingRoundFactory.sol index 350656b91..1cb27e1a3 100644 --- a/contracts/contracts/FundingRoundFactory.sol +++ b/contracts/contracts/FundingRoundFactory.sol @@ -169,6 +169,7 @@ contract FundingRoundFactory is Ownable, MACISharedObjs { MACI maci = maciFactory.deployMaci( SignUpGatekeeper(newRound), InitialVoiceCreditProxy(newRound), + coordinator, coordinatorPubKey ); newRound.setMaci(maci); diff --git a/contracts/contracts/MACIFactory.sol b/contracts/contracts/MACIFactory.sol index 6a4af59ee..59451d1b4 100644 --- a/contracts/contracts/MACIFactory.sol +++ b/contracts/contracts/MACIFactory.sol @@ -122,6 +122,7 @@ contract MACIFactory is Ownable, MACIParameters, MACISharedObjs { function deployMaci( SignUpGatekeeper _signUpGatekeeper, InitialVoiceCreditProxy _initialVoiceCreditProxy, + address _coordinator, PubKey calldata _coordinatorPubKey ) external @@ -138,7 +139,8 @@ contract MACIFactory is Ownable, MACIParameters, MACISharedObjs { signUpDuration, votingDuration, _initialVoiceCreditProxy, - _coordinatorPubKey + _coordinatorPubKey, + _coordinator ); emit MaciDeployed(address(_maci)); } diff --git a/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifier.sol b/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifier.sol index 8ed95db5c..f34141878 100644 --- a/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifier.sol +++ b/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifier.sol @@ -155,7 +155,7 @@ contract BatchUpdateStateTreeVerifier { Pairing.G2Point beta2; Pairing.G2Point gamma2; Pairing.G2Point delta2; - Pairing.G1Point[21] IC; + Pairing.G1Point[17] IC; } struct Proof { @@ -165,31 +165,27 @@ contract BatchUpdateStateTreeVerifier { } function verifyingKey() internal pure returns (VerifyingKey memory vk) { - vk.alpha1 = Pairing.G1Point(uint256(17929591374673664937609722229763664544949429546647874017985017244941264362135),uint256(13753881031392390930712932959690944836605118544384621403514908856941706027730)); - vk.beta2 = Pairing.G2Point([uint256(13333878060402123856028649178112751534974185663859863043194228752692824054787),uint256(11468413312159353807342819948658488255314270419888767842991152985928788023963)], [uint256(7206302074225645294185849941357025947360519490389078502700434946671302730804),uint256(17432079944912637199817952024156613787874981991313715386517241644317555033121)]); - vk.gamma2 = Pairing.G2Point([uint256(7677906051184588311971379718075282772047448242517389299820294597651954826183),uint256(7799590699603573048015465897000435665016918600287846073142779222100482114894)], [uint256(6566255235758067434126637824025391769134049179764466871772783994548547703131),uint256(5075136695597621962883001570289244657724793623223579888454512913589543516349)]); - vk.delta2 = Pairing.G2Point([uint256(10653475256750862751089771125603118816194372257121973868417821054246206231491),uint256(8872148348360078074582810748217254801828706804813136496062160780742539823318)], [uint256(14257797252168606759726264714840146494708692553226680318019231627881920847977),uint256(18305436137857726599588911275250867133397287663782012540899873379574348492157)]); - vk.IC[0] = Pairing.G1Point(uint256(1432421697263796558714620369315052877776782320335671894679927899753311453167),uint256(12842510608713606276106932845443873829541023833470974440469180168262793860021)); - vk.IC[1] = Pairing.G1Point(uint256(9870548226176139058945014040853510811958107121278282140239986963230570676269),uint256(5239133835658787624815379508747039203445899400112473252339251777820881101404)); - vk.IC[2] = Pairing.G1Point(uint256(14963051518070915792408755122290969890339421919384402427203934792464365508570),uint256(19302596763123488952560756947221295220411355253070334231233388338347018922788)); - vk.IC[3] = Pairing.G1Point(uint256(6606987022139926508351544257338215994584313020605277766183630096975018827394),uint256(21227117794489940480268738454992107170356058722542424829297764295582533414351)); - vk.IC[4] = Pairing.G1Point(uint256(17386755292483173411429196555337582193893289867476440784733028698135067344161),uint256(8300876777298656998889190616258180856382426160291625145812317157377433601839)); - vk.IC[5] = Pairing.G1Point(uint256(2245547308647475673924050963325077945844446019171977015144579260340895645600),uint256(13872738124168636438856152408421740765401219251120446807729187496125924642826)); - vk.IC[6] = Pairing.G1Point(uint256(13975605721448577874472104825674730643641547706343058801182987567729669790751),uint256(17047212079832856135846797589217317599189317862341459538942205070582281058880)); - vk.IC[7] = Pairing.G1Point(uint256(5919281358871779378691356018099237192750842401946888650808049741988726004388),uint256(13220518238096497984192701274871935931584892498496375740699732819318497127233)); - vk.IC[8] = Pairing.G1Point(uint256(5837631880667518243621304504821838447642263924871290360195062684772299672863),uint256(21248231355985036483138263362634341055658610562108000525602703932001833034479)); - vk.IC[9] = Pairing.G1Point(uint256(8741468005514025369089353388505708562879274795829537714560071652874235077261),uint256(8940021911268642476514183441663485302418673908884972776108752462290151720431)); - vk.IC[10] = Pairing.G1Point(uint256(539235835657960438640632781863556586638700094766692173946953834410930429733),uint256(9505325107356129515374398454441234603448925341425262514982465446200003590969)); - vk.IC[11] = Pairing.G1Point(uint256(8861351168458746039020318819757927940644368951652224121304245206166171431262),uint256(6771186501281257875325248159184595534035440619961499857629368637107963353385)); - vk.IC[12] = Pairing.G1Point(uint256(14466405031244544492723931509694040761264713145206394843092942098969586977118),uint256(14897916719023220574151068146175787909707645447137680147588334244093260962053)); - vk.IC[13] = Pairing.G1Point(uint256(14251500636685340363354353247158245855102598282854510506636646119175351921064),uint256(8164749126054369952611551728181820544684160394024484268822279406764137808887)); - vk.IC[14] = Pairing.G1Point(uint256(21551058868593065749664905407978394814273846064379189437650996408602812294441),uint256(14656225487130901370609611056487172088691730633452550340640445463357344704324)); - vk.IC[15] = Pairing.G1Point(uint256(9708721035046143073019024612848366238158424792986742985695866235762599819547),uint256(15786588913780280110626683207215120416205075489815096876061883300016137753024)); - vk.IC[16] = Pairing.G1Point(uint256(10489180639838417377635701381895219165458636316549384943845126815968460848191),uint256(16321960073313389774966122003744269317681472661765868186955104075528602430955)); - vk.IC[17] = Pairing.G1Point(uint256(12545381147759454014374771634925255805991772915309422548150945978648837347186),uint256(1948888353248017992724538137432059479497937798199692673869613664210775964502)); - vk.IC[18] = Pairing.G1Point(uint256(15987339137151893524181321043807679308965687312337037464356616241662241797147),uint256(8100221986411519987340137877358506833383673167802486594059713301564176939423)); - vk.IC[19] = Pairing.G1Point(uint256(20909284149238259978979292022051561056579367853026314998214156715661162815587),uint256(18412466532397077754798736481119808830789560506169801610567932404323985215229)); - vk.IC[20] = Pairing.G1Point(uint256(5012337472710033877295210153464541828642893527552982858492398491028232863908),uint256(10807812202446734741475023012277716139408670757647928973300254473793138838531)); + vk.alpha1 = Pairing.G1Point(uint256(8023132588245056084381987891043043826461059931552067709318264903932815879902),uint256(20072067851748979121302437451512078645507459299862790013260601133436067250465)); + vk.beta2 = Pairing.G2Point([uint256(8776596780152580357834840947065367090564266719231738843486831492239088702100),uint256(2098827568933174633712729957680147811785957638905260881625028047649430733771)], [uint256(1130324400703569007398482292422739226029714121302716930443655414806452244008),uint256(1554496725893928866280515501351891090468601616517791807104132296822506230517)]); + vk.gamma2 = Pairing.G2Point([uint256(21794722627530163121147384785101259127251796988635526940447761027019620560972),uint256(11669013075857287569223852428104990419865728508084310588647896924443753946529)], [uint256(15828404727526159041305269942916979015767199749419876382138938787379138353861),uint256(16921028011300782447540886372408595679184740957930030652147189744368546964176)]); + vk.delta2 = Pairing.G2Point([uint256(16646191542604346123327435753992512532664508997347585759523033467482490319366),uint256(6819165626942119296453703452126524750228221553152178520014430208549277713815)], [uint256(20312793436173935311163054260433832834896569638350210076984340502892459883640),uint256(9080934942556385525524491630289963306626673521237345563698519561297434531834)]); + vk.IC[0] = Pairing.G1Point(uint256(6609326620954095817109632797503036595250289984857450481377675131055944802600),uint256(15859067641801156980777534991665682656006004134138068528483628963811028416754)); + vk.IC[1] = Pairing.G1Point(uint256(3903320927682210738161083802535431772598063750158785961648242885790966139469),uint256(4429510984459177683020064460887315850131860884766699907715305368364626401635)); + vk.IC[2] = Pairing.G1Point(uint256(3307149862238849309914312752245920173095022640711582456468131961831613690776),uint256(8145223865063717565333216223585297645345943654657586031504888952424901781284)); + vk.IC[3] = Pairing.G1Point(uint256(19296072903728731042202145346428898058857592158609590440144311325860237323153),uint256(12977234920410315015814854235224756124501494692244524183110551515312999703489)); + vk.IC[4] = Pairing.G1Point(uint256(2299549407402768923578080434233820923944747549401550307146244096230024835670),uint256(11454697293315626493838496992744496466082696246432496722179154517672750769080)); + vk.IC[5] = Pairing.G1Point(uint256(21192730793045330155651857270767390717318825191928566003294021743259676417861),uint256(7093439151393904093289832341188263198948385224748550753184465907421274356034)); + vk.IC[6] = Pairing.G1Point(uint256(7322112701877331586155695931503722791895934394402888693228431947224746813450),uint256(17608636909643581023593273284330934738444803210282260020662372751950293467017)); + vk.IC[7] = Pairing.G1Point(uint256(8565761666468354108215670411297787212097194512901300330707993080786520064887),uint256(19326513294735896092860626310371491818475871321565576202102049804578162595238)); + vk.IC[8] = Pairing.G1Point(uint256(7009716517681001749502905632106645200200352405976728673849244044650802951044),uint256(12689923035544327591908917071809007904541929903630474075278588980657428353897)); + vk.IC[9] = Pairing.G1Point(uint256(3635203484529678196898445813259680685496623497256426121016430200381357762607),uint256(13660571790696161319245879172053049256833052258646825926537270127620946385943)); + vk.IC[10] = Pairing.G1Point(uint256(4167025165720389586384528203304296796499392386159326353029913764015033483912),uint256(6888529101598262407705659066244378839074671181134986592699568442015065332304)); + vk.IC[11] = Pairing.G1Point(uint256(8428357466052237489230030108794940178402799970448759180676563906944650125168),uint256(8554341726262538325447106648220228120946216259516589560322516767079031334825)); + vk.IC[12] = Pairing.G1Point(uint256(13615988994639247876470242912645583420712560408764847159007423005893922551963),uint256(10354477135650598617547179938476622334380578461807517777945621840307824887747)); + vk.IC[13] = Pairing.G1Point(uint256(11244887424743242134790362492888034102721010830375948210137064822934977326952),uint256(17684187313026489492597429802881293612871932656553906991947013304148278603540)); + vk.IC[14] = Pairing.G1Point(uint256(13392824161217052157628920383952851932198250600058517703105246603679131515622),uint256(13943914136051075406125306264869359397235472689493773270207541760515998856232)); + vk.IC[15] = Pairing.G1Point(uint256(18178226072249078502407888038847995091511471370429326449078455540186037496452),uint256(160690850339346681295704186048821942090651855750485321276656089035394429567)); + vk.IC[16] = Pairing.G1Point(uint256(14884616765097466375757598441061965217839403493063361590848540040873391299658),uint256(5453307143362355367485616386262822946337860281980306853111269260524673153786)); } @@ -229,7 +225,7 @@ contract BatchUpdateStateTreeVerifier { // Make sure that every input is less than the snark scalar field //for (uint256 i = 0; i < input.length; i++) { - for (uint256 i = 0; i < 20; i++) { + for (uint256 i = 0; i < 16; i++) { require(input[i] < SNARK_SCALAR_FIELD,"verifier-gte-snark-scalar-field"); vk_x = Pairing.plus(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } diff --git a/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifier.sol b/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifier.sol index 5288f42fd..d55ee98b7 100644 --- a/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifier.sol +++ b/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifier.sol @@ -165,21 +165,21 @@ contract QuadVoteTallyVerifier { } function verifyingKey() internal pure returns (VerifyingKey memory vk) { - vk.alpha1 = Pairing.G1Point(uint256(14764239906034612343732810785877386685032627241260055616415716963900572049738),uint256(20694688205970438196282082952010434916278156760319020425854056157045387672626)); - vk.beta2 = Pairing.G2Point([uint256(16412533941203728452129441696816523116564828292025262111331713615310541866603),uint256(20898121668098611987579364087942559311857663195172985857531534462752046865600)], [uint256(295792692898276633120394025292202551472156668516411479364469774467627759245),uint256(13002221388590749645849392730035728545708292856719223141763190810615553423566)]); - vk.gamma2 = Pairing.G2Point([uint256(2302124447139642788468036708027862597878170347394327163786658260293680202097),uint256(6283701424845114518623455687925493095130857294526099343074791996843299178123)], [uint256(2838086362409608445270191502836940203904243772978063401796517488504369789526),uint256(17240244409797163915960364419303469885341147533445268855477716490682323487368)]); - vk.delta2 = Pairing.G2Point([uint256(14645799563570499643593691562259440236100657554921509039502017862404111203431),uint256(20272524525673177092318601041210232339990793052904055632408565760622255825909)], [uint256(1036441929304564743113017565139487791253430106019157295633368428080452983973),uint256(16927500681354865803299997838694746370492840236721856666868182892976389578185)]); - vk.IC[0] = Pairing.G1Point(uint256(19788880987114102347242154741966930130018580654647035215066756968816007941539),uint256(8856540061239065624116447606061812500220327765275701753877268343642828765207)); - vk.IC[1] = Pairing.G1Point(uint256(919893932348084507504812181335840064049574894050883834709605853610151589659),uint256(6278422195071816047409785173994599183111895882927486658998534482176442448397)); - vk.IC[2] = Pairing.G1Point(uint256(10881089081327183106845484025549538363505339363256717327229127914728791912282),uint256(11537735588332499187127412728896538403393341467840716991388050119011429194784)); - vk.IC[3] = Pairing.G1Point(uint256(273838121594264153118789976478133957150100656467244644911360390883303932687),uint256(13743007933413375642093188553691873943655968813042373428881567821911598187580)); - vk.IC[4] = Pairing.G1Point(uint256(4845501117154159537190849573801514728088558672896865636503060369107104390548),uint256(5314959678711849181139418397327058610494784956027282547276549271999522027412)); - vk.IC[5] = Pairing.G1Point(uint256(1666192423500687714571615351276960436607238237784261004163302984712641773750),uint256(21701602423528511413391805823243555095647455178828105223071649967918210359205)); - vk.IC[6] = Pairing.G1Point(uint256(5009797854082015692185123552983034031338437938465740921693806700142539507363),uint256(5581403320600644421276146562256518675963518836744841471242723132888434077453)); - vk.IC[7] = Pairing.G1Point(uint256(12301013124073148586352202354335404275673935205802732752208000819994402791059),uint256(18431295806461166213770796185234340675716136713864294659806107232311161608269)); - vk.IC[8] = Pairing.G1Point(uint256(17434260347272173533853628320444597554525309317550722630201958847915574385595),uint256(3949030557009655844574685548351539209631555806994101280661051477894337634640)); - vk.IC[9] = Pairing.G1Point(uint256(8333799157934867973636304624428606893387413542916932491992057326150941009758),uint256(9648898274346759011560374420632532565668232206345454003523203647234919322160)); - vk.IC[10] = Pairing.G1Point(uint256(7513635531410640200549691599436769773105806237064887152637510266751082065834),uint256(13027959231550283548551213791139637644988594429827672265245165373148495104154)); + vk.alpha1 = Pairing.G1Point(uint256(478592870202004608407700946626510860825148547055186999737325427570268071144),uint256(9157751337584079183052823489385089906467596264238255675172315388015682209774)); + vk.beta2 = Pairing.G2Point([uint256(6301620314605447452471250663439393534638947012799820621609105749783745560238),uint256(12341502659983370456526803525767300996895322973579878805909946779444016389895)], [uint256(17916035858196687513208189237457342837320151929236378973691981190169390281199),uint256(16444228891791804865508709572623644561615935374209966906478869289655940086819)]); + vk.gamma2 = Pairing.G2Point([uint256(5681708471910945625508468623962396133764094578948387511590294581780247636017),uint256(12118744368887744070277905720785727027721900792460533412560115235173516007908)], [uint256(19143226185719422706551432871778581754615352286078150770379633722946728087125),uint256(8771291206027627376480902628253800619076104193002741604312297889777140358543)]); + vk.delta2 = Pairing.G2Point([uint256(9183444025997791469483933628505481094940229831191936388841069110540752769781),uint256(8121628155109074152882719504614154410527219019551879405875845762324393116130)], [uint256(8325138441882418069414030057991625671383402127217529829084370835890202514000),uint256(9700306852366593120852495830825669684287132235431702544754680617352512454780)]); + vk.IC[0] = Pairing.G1Point(uint256(4473856644216221607948987814014926389720185629882460701333813122776100635359),uint256(6956131460421571269545707696409648145308526664212416140417363000095589815957)); + vk.IC[1] = Pairing.G1Point(uint256(19726295696846084173995518778637603505432011392669350104762042298570929316346),uint256(13684462422305003621518551338570850725671233410625819322646002682428910339429)); + vk.IC[2] = Pairing.G1Point(uint256(1793827834727029479223351236835013187707179140888477179764044490904850639387),uint256(9312618810000293440910138801600864403438208853566431650456704114136859489280)); + vk.IC[3] = Pairing.G1Point(uint256(11299035697656742275163765506077278401047329066124730515593035905313819503632),uint256(8322913632991975622972935760048898137909505419420978665497880611712700540401)); + vk.IC[4] = Pairing.G1Point(uint256(13280602119776390452472714232270236887712223629882412086729691920155671150647),uint256(9540967200702169920405239453575495565944466677486003725855919012643557907267)); + vk.IC[5] = Pairing.G1Point(uint256(12200560943472216911056438915706858784124211911450075427378114042676593812259),uint256(17363473751896243640122786159552908959774140510742843930466234747339374414344)); + vk.IC[6] = Pairing.G1Point(uint256(12464095219545033179030609307332889165874320294995310908043756072470336241120),uint256(18572326813401808505761456164543655416444739586565502040584417514349858243117)); + vk.IC[7] = Pairing.G1Point(uint256(15305793898268890519676908327637239309682558965763582917391906664096155448814),uint256(9329976234288148300706215406568623952682983727826487364179817651003418007797)); + vk.IC[8] = Pairing.G1Point(uint256(4350651078029810241597622803746393469046970908830068946962238954577441679407),uint256(20824581855206441124855000731935153775549323660729469647725245043549733300013)); + vk.IC[9] = Pairing.G1Point(uint256(16275960615024373983571481323744994250709112408244262892442567264765482858200),uint256(5739458670378731325014841645966986236597983834936517804475078311820134531416)); + vk.IC[10] = Pairing.G1Point(uint256(4795536229571555988834795837284084799723912608501169725196781157502877593631),uint256(9268532769594658382717845783893860710430840681661979231328300443942186410276)); } diff --git a/contracts/e2e/index.ts b/contracts/e2e/index.ts index 94902a8f9..769890764 100644 --- a/contracts/e2e/index.ts +++ b/contracts/e2e/index.ts @@ -3,7 +3,7 @@ import { ethers, waffle } from 'hardhat' import { use, expect } from 'chai' import { solidity } from 'ethereum-waffle' import { BigNumber, Contract, Signer, Wallet } from 'ethers' -import { processMessages as processCmd, tally as tallyCmd } from 'maci-cli' +import { genProofs, proveOnChain } from 'maci-cli' import { Keypair } from 'maci-domainobjs' import { UNIT } from '../utils/constants' @@ -174,26 +174,24 @@ describe('End-to-end Tests', function () { async function finalizeRound(): Promise { const providerUrl = (provider as any)._hardhatNetwork.config.url - // Process messages - const randomStateLeaf = await processCmd({ + // Process messages and tally votes + const results = await genProofs({ contract: maci.address, - eth_privkey: coordinator.privateKey, eth_provider: providerUrl, privkey: coordinatorKeypair.privKey.serialize(), - repeat: true, }) + if (!results) { + throw new Error('generation of proofs failed') + } + const { proofs, tally } = results - // Tally votes - const tally: any = await tallyCmd({ + // Submit proofs to MACI contract + await proveOnChain({ contract: maci.address, eth_privkey: coordinator.privateKey, eth_provider: providerUrl, privkey: coordinatorKeypair.privKey.serialize(), - repeat: true, - current_results_salt: '0x0', - current_total_vc_salt: '0x0', - current_per_vo_vc_salt: '0x0', - leaf_zero: randomStateLeaf, + proof_file: proofs, }) const tallyHash = await getIpfsHash(tally) await fundingRound.connect(coordinator).publishTallyHash(tallyHash) @@ -205,7 +203,7 @@ describe('End-to-end Tests', function () { ) // Claim funds - tally.claims = {} + const claims: { [index: number]: BigNumber } = {} const recipientTreeDepth = (await maci.treeDepths()).voteOptionTreeDepth for (const recipientIndex of [1, 2]) { const recipient = recipientIndex === 1 ? recipient1 : recipient2 @@ -216,9 +214,9 @@ describe('End-to-end Tests', function () { ) const claimTx = await fundingRound.connect(recipient).claimFunds(...recipientClaimData) const claimedAmount = await getEventArg(claimTx, fundingRound, 'FundsClaimed', '_amount') - tally.claims[recipientIndex] = claimedAmount + claims[recipientIndex] = claimedAmount } - return tally + return { tally, claims } } it('should allocate funds correctly when users change keys', async () => { @@ -268,10 +266,10 @@ describe('End-to-end Tests', function () { await provider.send('evm_increaseTime', [maciParameters.signUpDuration]) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally, claims } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('160000') - expect(tally.claims[1]).to.equal(UNIT.mul(58).div(10)) - expect(tally.claims[2]).to.equal(UNIT.mul(58).div(10)) + expect(claims[1]).to.equal(UNIT.mul(58).div(10)) + expect(claims[2]).to.equal(UNIT.mul(58).div(10)) }) it('should allocate funds correctly if not all voice credits are spent', async () => { @@ -299,10 +297,10 @@ describe('End-to-end Tests', function () { await provider.send('evm_increaseTime', [maciParameters.signUpDuration]) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally, claims } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('80000') - expect(tally.claims[1]).to.equal(UNIT.mul(58).div(10)) - expect(tally.claims[2]).to.equal(UNIT.mul(58).div(10)) + expect(claims[1]).to.equal(UNIT.mul(58).div(10)) + expect(claims[2]).to.equal(UNIT.mul(58).div(10)) }) it('should overwrite votes 1', async () => { @@ -334,12 +332,12 @@ describe('End-to-end Tests', function () { await provider.send('evm_increaseTime', [maciParameters.signUpDuration]) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally, claims } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('50000') expect(tally.results.tally[1]).to.equal('200') expect(tally.results.tally[2]).to.equal('100') - expect(tally.claims[1].toString()).to.equal('7066666666666666666') - expect(tally.claims[2].toString()).to.equal('3433333333333333333') + expect(claims[1].toString()).to.equal('7066666666666666666') + expect(claims[2].toString()).to.equal('3433333333333333333') }) it('should overwrite votes 2', async () => { @@ -372,12 +370,12 @@ describe('End-to-end Tests', function () { await provider.send('evm_increaseTime', [maciParameters.signUpDuration]) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally, claims } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('160000') expect(tally.results.tally[1]).to.equal('0') expect(tally.results.tally[2]).to.equal('400') - expect(tally.claims[1]).to.equal(ZERO) - expect(tally.claims[2]).to.equal(UNIT.mul(116).div(10)) + expect(claims[1]).to.equal(ZERO) + expect(claims[2]).to.equal(UNIT.mul(116).div(10)) }) it('should overwrite previous batch of votes', async () => { @@ -415,7 +413,7 @@ describe('End-to-end Tests', function () { await provider.send('evm_increaseTime', [maciParameters.signUpDuration]) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('80000') expect(tally.results.tally[1]).to.equal('200') expect(tally.results.tally[2]).to.equal('200') @@ -508,9 +506,9 @@ describe('End-to-end Tests', function () { ) await provider.send('evm_increaseTime', [maciParameters.votingDuration]) - const tally = await finalizeRound() + const { tally, claims } = await finalizeRound() expect(tally.totalVoiceCredits.spent).to.equal('40000') - expect(tally.claims[1]).to.equal(BigNumber.from(0)) - expect(tally.claims[2]).to.equal(UNIT.mul(104).div(10)) + expect(claims[1]).to.equal(BigNumber.from(0)) + expect(claims[2]).to.equal(UNIT.mul(104).div(10)) }) }) diff --git a/contracts/package.json b/contracts/package.json index 20f581272..488661302 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@openzeppelin/contracts": "3.2.0", - "maci-contracts": "0.5.7", + "maci-contracts": "0.6.7", "solidity-rlp": "2.0.3" }, "devDependencies": { @@ -41,9 +41,9 @@ "ethers": "^5.0.17", "hardhat": "^2.0.11", "ipfs-only-hash": "^2.0.1", - "maci-cli": "0.5.7", - "maci-crypto": "~0.5.7", - "maci-domainobjs": "~0.5.7", + "maci-cli": "0.6.7", + "maci-crypto": "~0.6.7", + "maci-domainobjs": "~0.6.7", "solhint": "^3.3.2", "ts-generator": "^0.0.8", "ts-node": "^8.8.1", diff --git a/contracts/scripts/tally.ts b/contracts/scripts/tally.ts index a7b20ac25..2ef9666f2 100644 --- a/contracts/scripts/tally.ts +++ b/contracts/scripts/tally.ts @@ -2,7 +2,7 @@ import fs from 'fs' import { network, ethers } from 'hardhat' import { Wallet } from 'ethers' -import { processMessages as processCmd, tally as tallyCmd } from 'maci-cli' +import { genProofs, proveOnChain } from 'maci-cli' import { getIpfsHash } from '../utils/ipfs' @@ -20,30 +20,25 @@ async function main() { const maciAddress = await fundingRound.maci() const providerUrl = (network.config as any).url - // Process messages - const randomStateLeaf = await processCmd({ + // Process messages and tally votes + const results = await genProofs({ contract: maciAddress, - eth_privkey: coordinatorEthPrivKey, eth_provider: providerUrl, privkey: state.coordinatorPrivKey, - repeat: true, + tally_file: 'tally.json', }) - if (!randomStateLeaf) { - throw new Error('message processing failed') + if (!results) { + throw new Error('generation of proofs failed') } + const { proofs, tally } = results - // Tally votes - const tally: any = await tallyCmd({ + // Submit proofs to MACI contract + await proveOnChain({ contract: maciAddress, eth_privkey: coordinatorEthPrivKey, eth_provider: providerUrl, privkey: state.coordinatorPrivKey, - repeat: true, - current_results_salt: '0x0', - current_total_vc_salt: '0x0', - current_per_vo_vc_salt: '0x0', - leaf_zero: randomStateLeaf, - tally_file: 'tally.json', + proof_file: proofs, }) // Publish tally hash diff --git a/contracts/tests/maciFactory.ts b/contracts/tests/maciFactory.ts index 7faa2f3a7..4017fd037 100644 --- a/contracts/tests/maciFactory.ts +++ b/contracts/tests/maciFactory.ts @@ -76,6 +76,7 @@ describe('MACI factory', () => { const maciDeployed = maciFactory.deployMaci( signUpGatekeeper.address, initialVoiceCreditProxy.address, + coordinator.address, coordinatorPubKey, ); await expect(maciDeployed).to.emit(maciFactory, 'MaciDeployed'); @@ -89,6 +90,7 @@ describe('MACI factory', () => { await expect(coordinatorMaciFactory.deployMaci( signUpGatekeeper.address, initialVoiceCreditProxy.address, + coordinator.address, coordinatorPubKey, )) .to.be.revertedWith('Ownable: caller is not the owner'); diff --git a/contracts/tests/round.ts b/contracts/tests/round.ts index 199f4766b..08e180652 100644 --- a/contracts/tests/round.ts +++ b/contracts/tests/round.ts @@ -74,6 +74,7 @@ describe('Funding Round', () => { const maciDeployed = await maciFactory.deployMaci( fundingRound.address, fundingRound.address, + coordinator.address, coordinatorPubKey.asContractParam(), ); const maciAddress = await getEventArg(maciDeployed, maciFactory, 'MaciDeployed', '_maci'); diff --git a/docs/coordinator.md b/docs/coordinator.md index 199f77caf..b914e3728 100644 --- a/docs/coordinator.md +++ b/docs/coordinator.md @@ -2,12 +2,12 @@ ## Coordinate using MACI CLI -Clone the [MACI repo](https://github.com/appliedzkp/maci/) and switch to version v0.5.7: +Clone the [MACI repo](https://github.com/appliedzkp/maci/) and switch to version v0.6.7: ``` git clone https://github.com/appliedzkp/maci.git cd maci/ -git checkout v0.5.7 +git checkout v0.6.7 ``` Follow instructions in README.md to install necessary dependencies. @@ -37,38 +37,33 @@ A single key can be used to coordinate multiple rounds. ### Tally votes -Decrypt messages: +Decrypt messages and tally the votes: ``` cd ../cli -node build/index.js process \ +node build/index.js genProofs \ --eth-provider \ --contract \ --privkey \ - --eth-privkey \ - --repeat + --output proofs.json \ + --tally-file tally.json ``` Coordinator private key must be in MACI key format (starts with `macisk`). Ethereum private key can be any private key that controls the necessary amount of ETH to pay for gas. -The `process` command will print `Random state leaf` value at the end. This value will be needed to run the next command which tallies the votes: +The `genProofs` command will create two files: `proofs.json` and `tally.json`. The `proofs.json` file will be needed to run the next command which submits proofs to MACI contract: ``` -node build/index.js tally \ +node build/index.js proveOnChain \ --eth-provider \ --contract \ --privkey \ --eth-privkey \ - --current-results-salt 0x0 \ - --current-total-vc-salt 0x0 \ - --current-per-vo-vc-salt 0x0 \ - --tally-file tally.json \ - --leaf-zero \ - --repeat + --proof-file proofs.json ``` -The process may take several hours. Result will be saved to `tally.json` file in the same directory, which must then be published via IPFS. +The process may take several hours. Results can be found in `tally.json` file, which must then be published via IPFS. Finally, the [CID](https://ipfs.io/ipns/docs.ipfs.io/concepts/content-addressing/) of tally file must be submitted to `FundingRound` contract: diff --git a/docs/trusted-setup.md b/docs/trusted-setup.md index 9aeec0d0d..6a4d9e42c 100644 --- a/docs/trusted-setup.md +++ b/docs/trusted-setup.md @@ -2,11 +2,11 @@ ## How to verify the correctness of execution? -Clone the [MACI repo](https://github.com/appliedzkp/maci/) and switch to version v0.5.7: +Clone the [MACI repo](https://github.com/appliedzkp/maci/) and switch to version v0.6.7: ``` git clone https://github.com/appliedzkp/maci.git -git checkout v0.5.7 +git checkout v0.6.7 ``` Follow instructions in README.md to install necessary dependencies. diff --git a/vue-app/package.json b/vue-app/package.json index 4c9459b42..86696ed4e 100644 --- a/vue-app/package.json +++ b/vue-app/package.json @@ -21,7 +21,7 @@ "humanize-duration": "^3.25.1", "is-ipfs": "^2.0.0", "luxon": "^1.26.0", - "maci-domainobjs": "~0.5.7", + "maci-domainobjs": "~0.6.7", "qrcode": "^1.4.4", "vue": "^2.6.11", "vue-class-component": "^7.2.2", diff --git a/yarn.lock b/yarn.lock index 930f540ea..945a13b0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1232,6 +1232,14 @@ resolved "https://registry.yarnpkg.com/@iden3/bigarray/-/bigarray-0.0.2.tgz#6fc4ba5be18daf8a26ee393f2fb62b80d98c05e9" integrity sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g== +"@iden3/binfileutils@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@iden3/binfileutils/-/binfileutils-0.0.8.tgz#d1d349bdbaa9f0a99644232c7d75ea0db98ea1c7" + integrity sha512-/GqTsujUssGuQY+sd/XaLrA+OiCwzm+6yH28C57QQDWCHET2Logry9fGxU10n6XKdhCQBjZ7T/YMQkLwwkpRTQ== + dependencies: + fastfile "0.0.19" + ffjavascript "^0.2.30" + "@intervolga/optimize-cssnano-plugin@^1.0.5": version "1.0.6" resolved "https://registry.yarnpkg.com/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz#be7c7846128b88f6a9b1d1261a0ad06eb5c0fdf8" @@ -1241,15 +1249,6 @@ cssnano-preset-default "^4.0.0" postcss "^7.0.0" -"@jest/types@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^13.0.0" - "@kleros/gtcr-encoder@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@kleros/gtcr-encoder/-/gtcr-encoder-1.4.0.tgz#8c2dc9497e271ab7a84da124c43ba449bc6e39bc" @@ -1691,7 +1690,7 @@ dependencies: "@types/node" "*" -"@types/bn.js@*", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4", "@types/bn.js@^4.11.5": +"@types/bn.js@*", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== @@ -1732,33 +1731,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" - integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - -"@types/jest@^24.0.15": - version "24.9.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" - integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== - dependencies: - jest-diff "^24.3.0" - "@types/json-schema@^7.0.3": version "7.0.4" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" @@ -1829,21 +1801,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.35.tgz#58058f29b870e6ae57b20e4f6e928f02b7129f56" integrity sha512-gXx7jAWpMddu0f7a+L+txMplp3FnHl53OhQIF9puXKq3hDGY/GjH+MF04oWnV/adPSCrbtHumDCFwzq2VhltWA== -"@types/node@^10.12.18": - version "10.17.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.17.tgz#7a183163a9e6ff720d86502db23ba4aade5999b8" - integrity sha512-gpNnRnZP3VWzzj5k3qrpRC6Rk3H/uclhAVo1aIvwzK5p5cOrs9yEyQ8H/HBsBY0u5rrWxXEiVPQ0dEB6pkjE8Q== - "@types/node@^12.12.6": version "12.12.56" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.56.tgz#83591a89723d8ec3eaf722137e1784a7351edb6c" integrity sha512-8OdIupOIZtmObR13fvGyTvpcuzKmMugkATeVcfNwCjGtHxhjEKmOvLqXwR8U9VOtNnZ4EXaSfNiLVsPinaCXkQ== -"@types/node@^12.6.1": - version "12.12.30" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.30.tgz#3501e6f09b954de9c404671cefdbcc5d9d7c45f6" - integrity sha512-sz9MF/zk6qVr3pAnM0BSQvYIBK44tS75QC5N+VbWSE4DjCV/pJ+UzCW/F+vVnl7TkOPcuwQureKNtSSwjBTaMg== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -1923,18 +1885,6 @@ resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.2.tgz#927997342bb9f4a5185a86e6579a0a18afc33b0a" integrity sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ== -"@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== - -"@types/yargs@^13.0.0": - version "13.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.9.tgz#44028e974343c7afcf3960f1a2b1099c39a7b5e1" - integrity sha512-xrvhZ4DZewMDhoH1utLtOAwYQy60eYFoXeje30TzM3VOvQlBwQaEpKFq5m34k1wOw2AKIi2pwtiAjdmhvlBUzg== - dependencies: - "@types/yargs-parser" "*" - "@typescript-eslint/eslint-plugin@^2.18.0": version "2.24.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz#a86cf618c965a462cddf3601f594544b134d6d68" @@ -2021,6 +1971,11 @@ semver "^7.3.2" tsutils "^3.17.1" +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + "@vue/cli-overlay@^4.4.6": version "4.4.6" resolved "https://registry.yarnpkg.com/@vue/cli-overlay/-/cli-overlay-4.4.6.tgz#58f996066d8c0a0a45ad4b5c6f3f213f9945a9ba" @@ -2621,6 +2576,11 @@ ansi-colors@3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-colors@^3.0.0, ansi-colors@^3.2.1: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -2653,7 +2613,7 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.0.0, ansi-regex@^4.1.0: +ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== @@ -2746,6 +2706,11 @@ argparse@^1.0.10, argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + args@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/args/-/args-5.0.1.tgz#4bf298df90a4799a09521362c579278cc2fdd761" @@ -2955,7 +2920,7 @@ async.util.setimmediate@0.5.2: resolved "https://registry.yarnpkg.com/async.util.setimmediate/-/async.util.setimmediate-0.5.2.tgz#2812ebabf2a58027758d4bc7793d1ccfaf10255f" integrity sha1-KBLrq/KlgCd1jUvHeT0cz68QJV8= -async@0.9.x, async@~0.9.0: +async@0.9.x: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= @@ -2979,11 +2944,6 @@ async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1, async@^2.6 dependencies: lodash "^4.17.14" -async@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" - integrity sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -3017,11 +2977,6 @@ autoprefixer@^9.8.0: postcss "^7.0.32" postcss-value-parser "^4.1.0" -await-lock@^1.1.3: - version "1.2.1" - resolved "https://registry.yarnpkg.com/await-lock/-/await-lock-1.2.1.tgz#a5a10bbf2c2f6746782ef513e2dc96b805d02cac" - integrity sha512-l4920ZIFwIFGpNDeGDnKi/b2t03BuSRV8gMuP94KMvb4kuF+1RLBafQOrOXFYLCc46k/zUgStj78tJTY+gqnaA== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -3655,7 +3610,7 @@ bfj@^6.1.1: hoopy "^0.1.4" tryer "^1.0.1" -big-integer@^1.6.32, big-integer@^1.6.42, big-integer@^1.6.43, big-integer@^1.6.48: +big-integer@^1.6.42, big-integer@^1.6.48: version "1.6.48" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== @@ -3831,7 +3786,7 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== @@ -4338,6 +4293,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -4458,6 +4418,21 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + 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" + optionalDependencies: + fsevents "~2.3.1" + "chokidar@>=2.0.0 <4.0.0": version "3.3.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" @@ -4597,38 +4572,29 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -circom@0.0.35: - version "0.0.35" - resolved "https://registry.yarnpkg.com/circom/-/circom-0.0.35.tgz#3178c9db4e37538e65342f3795c0f7ec222863cb" - integrity sha512-MWsJPYPH+s9wN2I5abEHUIAyFVsgTCy+UzJh///WnflXfh3c1tlbv8zt1VV+YHHREpyS+WF5ZBr7TujpaVFu5g== - dependencies: - big-integer "^1.6.32" - optimist "^0.6.1" - yargs "^12.0.2" - -circom@0.5.21: - version "0.5.21" - resolved "https://registry.yarnpkg.com/circom/-/circom-0.5.21.tgz#296785665ddd43a6f369d4ee947e83ff3a9fe7e3" - integrity sha512-Om90wztN6Y4Gg5ks4n+iTKU/5bR1gkPyRPzEi5gtu0brbSqnKfAnYWp8d/U28h2353rj476I1KNArg/QVNzBaw== +circom@0.5.33: + version "0.5.33" + resolved "https://registry.yarnpkg.com/circom/-/circom-0.5.33.tgz#6943d5799adf5388989bfbb3ef8f502fb1b4f662" + integrity sha512-UdL8fr6GckhQ4VoWjIvuYwCHneJe8z/AyJpDxgKLyuaX51ijd4gBP6jlwHDbQJsha2aU2GR9qgDsxd0jfari1Q== dependencies: chai "^4.2.0" - circom_runtime "0.1.4" - fastfile "0.0.12" + circom_runtime "0.1.8" + fastfile "0.0.18" ffiasm "0.1.1" - ffjavascript "0.2.10" + ffjavascript "0.2.22" ffwasm "0.0.7" fnv-plus "^1.3.1" - r1csfile "0.0.14" + r1csfile "0.0.16" tmp-promise "^2.0.2" wasmbuilder "0.0.10" -circom@0.5.35: - version "0.5.35" - resolved "https://registry.yarnpkg.com/circom/-/circom-0.5.35.tgz#e59291f18996656c85e3f84a90bb653022b9f673" - integrity sha512-fUjYTyU75TrA54IPqHt+3VyRWVL82jdbiW68NC9CdtwVrXID+G2cED4XPlsVIKuGI8NFl1LzapELv6DRjS363w== +circom@0.5.38: + version "0.5.38" + resolved "https://registry.yarnpkg.com/circom/-/circom-0.5.38.tgz#c099fb196085837575fb266f37b0516b1ec56eb5" + integrity sha512-PFlXto8gDysUlwk6z/GYbn1Mv5BtW9BI4769N9gSP0/7KDNSqLNyVmL4DgMLc67/EpG4qJLGch3SdgzQD+/cfw== dependencies: chai "^4.2.0" - circom_runtime "0.1.9" + circom_runtime "0.1.12" fastfile "0.0.18" ffiasm "0.1.1" ffjavascript "0.2.22" @@ -4638,61 +4604,40 @@ circom@0.5.35: tmp-promise "^2.0.2" wasmbuilder "0.0.10" -circom_runtime@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.0.6.tgz#ef20ed273f03a5fdd699fd889b01feb9e13ada44" - integrity sha512-o0T5MuWzxnxinWG3+CygS/kZouoP+z5ZrufUwqKJy3gsVFJhkbqMpfKmcBGjhExB3uatA7cKyOiRAOLOz5+t5w== +circom_runtime@0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.1.12.tgz#e1a302c6fe8cec390f035c2e7a8496cfa7cfb4a2" + integrity sha512-R+QT9HS9w71cmGmWIn+PSyD3aHyR5JZBiVvxOjCfn12wwnpuFwBjdMG7he+v8h/oQD1mDRAu2KrBeL4mAt5s4A== dependencies: - ffjavascript "0.1.0" + ffjavascript "0.2.34" fnv-plus "^1.3.1" -circom_runtime@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.1.4.tgz#eb8802f8743224ee603f70894b6f107d225463e4" - integrity sha512-sQWeEBD3o2jIdrKPf3VDu7DNfP+NfscYO/pxi73FE0qQW8TXTfwno8Grdl++h6OKWbzvWJdG5jQvS+WGKjpMOg== +circom_runtime@0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.1.13.tgz#90f86f35d989c48d4c27595b94664ea6918fbede" + integrity sha512-vmv19/0p5OTe5uCI7PWqPtB5vPoYWjczqKYnabaC5HOxX99R4K1MuNqEXsNEAoEfZrmfAQd7vXLcATN9NVnsPA== dependencies: - ffjavascript "0.2.10" + ffjavascript "0.2.35" fnv-plus "^1.3.1" -circom_runtime@0.1.9: - version "0.1.9" - resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.1.9.tgz#99b8fd60d858e00174537b9d502e9913592d7b08" - integrity sha512-eh34quaGpeEWXthnhmC9zpoBL/5zJ0mGDbPT/plb/xVmFaKxJDcLuCr2sma5s3il8AYlEIb/nbqytojyI3TWDQ== +circom_runtime@0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/circom_runtime/-/circom_runtime-0.1.8.tgz#d967a1618fe5290849f9c0bbffb6b97b95c0f1c8" + integrity sha512-5ZmzCyidkNPb1zZsJGRXTuWcJ6kW6+gRBtHgf2tFqTh5dUyWVVPH0Zg7AsU2ijPr1AmYZUlme0yORUZK5HrjOA== dependencies: ffjavascript "0.2.10" fnv-plus "^1.3.1" -circomlib@0.0.21: - version "0.0.21" - resolved "https://registry.yarnpkg.com/circomlib/-/circomlib-0.0.21.tgz#f3f880a50a3b669ef2cf411e53de1cd116b88df8" - integrity sha512-8WJS4W9sJJbQv8s9vRGq28qJpRKvF9ORUS58x3I8vgfAUGL2INaRjgteksGX/mIyR+Il3w7ido27GA2ZCmZrQw== - dependencies: - blake-hash "^1.1.0" - blake2b "^2.1.3" - circom "0.0.35" - snarkjs "^0.1.20" - typedarray-to-buffer "^3.1.5" - web3 "^1.0.0-beta.55" - -circomlib@0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/circomlib/-/circomlib-0.2.4.tgz#5c487e69738c90bd73527d8830d2b2413d6f68ff" - integrity sha512-5x1/kn+7MJaakdGdKRCDMSCVsioyhFgWYCf2dbbd9xMmnZkMFjJpKzsE0UxncprFjyU2A8sVB1eb5Gj0pMaQBg== - dependencies: - blake-hash "^1.1.0" - blake2b "^2.1.3" - circom "0.5.21" - ffjavascript "0.1.0" - -"circomlib@https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920": - version "0.2.3" - resolved "https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920" +circomlib@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/circomlib/-/circomlib-0.5.1.tgz#97927e240e48028bdb8bdedd179f233de9fa7131" + integrity sha512-faPGgzJWhp5SCWSPYtWfnteaCS1UVhEomdLEF+QbbTy4kF4sAij5+G1z4EzC67q4sp8VYSTv7czH8z08U4haeA== dependencies: blake-hash "^1.1.0" blake2b "^2.1.3" - circom "0.5.21" + circom "0.5.33" ffjavascript "0.1.0" - web3 "^1.2.6" + web3-utils "^1.3.0" class-is@^1.1.0: version "1.1.0" @@ -4785,15 +4730,6 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -4812,6 +4748,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -4905,12 +4850,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== -colors@1.0.x: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= - -colors@^1.1.2, colors@^1.4.0: +colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -5490,11 +5430,6 @@ cssstyle@^2.0.0: dependencies: cssom "~0.3.6" -cycle@1.0.x: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" - integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI= - cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -5647,7 +5582,7 @@ debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2. dependencies: ms "^2.1.1" -debug@4, debug@^4.2.0: +debug@4, debug@4.3.1, debug@^4.2.0: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -5680,6 +5615,11 @@ decamelize@^1.1.1, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -5711,11 +5651,6 @@ deep-equal@^1.0.1, deep-equal@~1.1.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-equal@~0.2.1: - version "0.2.2" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.2.2.tgz#84b745896f34c684e98f2ce0e42abaf43bba017d" - integrity sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0= - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -5926,16 +5861,16 @@ diff-match-patch@^1.0.0: resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== -diff-sequences@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" - integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== - diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diff@^4.0.1, diff@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -6476,6 +6411,11 @@ escalade@^3.0.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ== +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -6491,6 +6431,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.11.1: version "1.14.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" @@ -6563,7 +6508,7 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^5.16.0, eslint@^5.6.0: +eslint@^5.6.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== @@ -6750,16 +6695,7 @@ eth-json-rpc-middleware@^1.5.0: promise-to-callback "^1.0.0" tape "^4.6.3" -eth-lib@0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" - integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@0.2.8, eth-lib@^0.2.8: +eth-lib@0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== @@ -7139,7 +7075,7 @@ ethereumjs-wallet@0.6.5: utf8 "^3.0.0" uuid "^3.3.2" -ethers@^4.0.37, ethers@^4.0.45: +ethers@^4.0.45: version "4.0.48" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.48.tgz#330c65b8133e112b0613156e57e92d9009d8fbbe" integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== @@ -7257,11 +7193,6 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" @@ -7458,11 +7389,6 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -eyes@0.1.x: - version "0.1.8" - resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" - integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= - fake-merkle-patricia-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" @@ -7534,35 +7460,15 @@ fast-write-atomic@^0.2.0, fast-write-atomic@~0.2.0: resolved "https://registry.yarnpkg.com/fast-write-atomic/-/fast-write-atomic-0.2.1.tgz#7ee8ef0ce3c1f531043c09ae8e5143361ab17ede" integrity sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw== -fastfile@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.1.tgz#bf12427f476d32220c45d890529df00347a61eb1" - integrity sha512-Fk8PWafGWGEUw7oPq/dJen92ASxknCEy4ZC8n4VEvSwCp/jcReyEmVoWsRIWTf+IvAp2MzvFi54vOPeK2LQZtQ== - -fastfile@0.0.12: - version "0.0.12" - resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.12.tgz#302597fe2d0d19e1405851685a5ddce03e1dd6e8" - integrity sha512-0EZo2y5eW8X0oiDDRvcnufjVxlM96CQL5hvmRQtbRABWlCkH73IHwkzl0qOSdxtchaMr+0TSB7GVqaVEixRr1Q== - -fastfile@0.0.13: - version "0.0.13" - resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.13.tgz#0a3a3583699b70aff4ed69f54d518140a0c4ad3f" - integrity sha512-bvtLS27bKnhl12aQ2FMehXWQIyVqP1rjk8VdivGRl5yVgLSZjdqgievlOvRDVjqEJDZ00/kUl3LgRF0vchx9eg== - fastfile@0.0.18: version "0.0.18" resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.18.tgz#2b69bbbfd2fcccc9bc8099c27de1379b89756a4b" integrity sha512-q03PTKc+wptis4WmuFOwPNQx2p5myFUrl/dMgRlW9mymc1Egyc14JPHgiGnWK+sJ0+dBl2Vwtfh5GfSQltYOpw== -fastfile@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.6.tgz#85afd2414cf12c3f8bcb78fbf1116fc12c3e37b6" - integrity sha512-6cOUdePcue0DAssqGKPhmcSgdLTaB2IzxNgg2WAADOuta00Os88+ShpDItSkQ/eLCiAeYjsPasdBLYozVz+4Ug== - -fastfile@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.7.tgz#07699d90c9bd4d6f4e24226b49029a4a72f4b739" - integrity sha512-Zk7sdqsV6DsN/rhjULDfCCowPiMDsziTMFicdkrKN80yybr/6YFf9H91ELXN85dVEf6EYkVR5EHkZNc0dMqZKA== +fastfile@0.0.19: + version "0.0.19" + resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.19.tgz#02cef9ade123b0a74adb794f4a1abcfa5719fd46" + integrity sha512-tz9nWR5KYb6eR2odFQ7oxqEkx8F3YQZ6NBJoJR92YEG3DqYOqyxMck8PKvTVNKx3uwvOqGnLXNScnqpdHRdHGQ== fastq@^1.6.0: version "1.6.1" @@ -7626,15 +7532,25 @@ ffjavascript@0.2.22: wasmcurves "0.0.12" worker-threads "^1.0.0" -ffjavascript@0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/ffjavascript/-/ffjavascript-0.2.4.tgz#97675a592517aefc1d418d491fcb3ac9447597c7" - integrity sha512-XFeWcjUDFPavN+DDOxhE8p5MOhZQJc9oO1Sj4ml1pyjqNhS1ujEamcjFyK0cctdnat61i7lvpTYzdtS3RYDC8w== +ffjavascript@0.2.34: + version "0.2.34" + resolved "https://registry.yarnpkg.com/ffjavascript/-/ffjavascript-0.2.34.tgz#e0607d1635ad06e8519268af475bc90deac60fbd" + integrity sha512-fq/qfJluC4spiOD1lp5jfckZVnS0o0kI5eKXVLw7UKwIwbNr+NBMBveBVcidSfMizF87T6wb7NBtLSdckQiAnQ== dependencies: big-integer "^1.6.48" - wasmcurves "0.0.4" + mocha "^8.2.1" + wasmcurves "0.0.14" worker-threads "^1.0.0" +ffjavascript@0.2.35, ffjavascript@^0.2.30: + version "0.2.35" + resolved "https://registry.yarnpkg.com/ffjavascript/-/ffjavascript-0.2.35.tgz#9166d95173b1c0a743b455bb03a72b581922a42e" + integrity sha512-xnC51tWbi0ah4SH+02jEfJyO+P+NiZWnxQrLDLtBYY1Dv3QM5ydxzd+gxnLEfWdT8i1bMM5pIh5P25l6fNCaVQ== + dependencies: + big-integer "^1.6.48" + wasmcurves "0.0.14" + web-worker "^1.0.0" + ffwasm@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ffwasm/-/ffwasm-0.0.7.tgz#23bb9a3537ecc87c0f24fcfb3a9ddd0e86855fff" @@ -7781,6 +7697,14 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -7828,6 +7752,11 @@ flat@^4.1.0: dependencies: is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatstr@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" @@ -8052,6 +7981,11 @@ fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== +fsevents@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1, function-bind@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -8134,7 +8068,7 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -8227,7 +8161,7 @@ glob@7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: +glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -8894,11 +8828,6 @@ hyperdiff@^2.0.5: debug "~4.2.0" lodash "~4.17.19" -i@0.3.x: - version "0.3.6" - resolved "https://registry.yarnpkg.com/i/-/i-0.3.6.tgz#d96c92732076f072711b6b10fd7d4f65ad8ee23d" - integrity sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0= - iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -9206,11 +9135,6 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -10224,7 +10148,7 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-obj@^2.0.0: +is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== @@ -10382,7 +10306,7 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isstream@0.1.x, isstream@~0.1.2: +isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= @@ -10604,21 +10528,6 @@ javascript-stringify@^2.0.1: resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-2.0.1.tgz#6ef358035310e35d667c675ed63d3eb7c1aa19e5" integrity sha512-yV+gqbd5vaOYjqlbk16EG89xB5udgjqQF3C5FAORDg4f/IS1Yc5ERCv5e/57yBcfJYw05V5JyIXabhwb75Xxow== -jest-diff@^24.3.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" - integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== - dependencies: - chalk "^2.0.1" - diff-sequences "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -jest-get-type@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" - integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== - jest-worker@^25.4.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" @@ -10698,6 +10607,13 @@ js-yaml@3.13.1, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + js-yaml@^3.12.0, js-yaml@^3.13.0: version "3.14.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" @@ -11053,13 +10969,6 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - level-codec@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.1.tgz#042f4aa85e56d4328ace368c950811ba802b7247" @@ -11693,17 +11602,6 @@ libp2p@^0.27.7: timeout-abort-controller "^1.0.0" xsalsa20 "^1.0.2" -libsemaphore@^1.0.5: - version "1.0.15" - resolved "https://registry.yarnpkg.com/libsemaphore/-/libsemaphore-1.0.15.tgz#b9cae9ace333e3bf98bc935440d76d598d6e87fa" - integrity sha512-77Nf4iCOiiruL79El2HEwEZ61hO2P05QrvkmniZsh4u807vkgjYRZ6hVx7sf+9kRelp2BHIawbivufj/ZheUzA== - dependencies: - circomlib "0.0.21" - ethers "^4.0.37" - semaphore-merkle-tree "^1.0.13" - snarkjs "0.1.20" - websnark "0.0.5" - lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -11798,6 +11696,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash.assign@^4.0.3, lodash.assign@^4.0.6: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" @@ -11912,6 +11817,13 @@ log-symbols@3.0.0: dependencies: chalk "^2.4.2" +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + loglevel@^1.6.8: version "1.6.8" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" @@ -12008,79 +11920,77 @@ luxon@^1.26.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.26.0.tgz#d3692361fda51473948252061d0f8561df02b578" integrity sha512-+V5QIQ5f6CDXQpWNICELwjwuHdqeJM1UenlZWx5ujcRMc9venvluCjFb4t5NYLhb6IhkbMVOxzVuOqkgMxee2A== -maci-circuits@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-circuits/-/maci-circuits-0.5.7.tgz#4a3d55aa6a657715120cde66ee5c972c6eee9271" - integrity sha512-PExqSLrXsjIgDI18nDZoqGXK6Sa5Xs+iBeo9rxp78AecwO7geNMLKkv1amR2RAIsX0z7NaSOsGSUQEvJdE2JkA== +maci-circuits@^0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-circuits/-/maci-circuits-0.6.7.tgz#8ca660709baa10ba445aac99e40043678a92f8cd" + integrity sha512-qHFFHES/t1OfgCSfRSREdj6D5LSL0XqiZbuj9WBwlmngBvxP/JJQKErEkbrQXgo4iwFFGC7NguSvmqNvdF1QZw== dependencies: argparse "^1.0.10" - circom "0.5.35" - circomlib "0.2.4" - libsemaphore "^1.0.5" + circom "0.5.38" + circomlib "0.5.1" n-readlines "^1.0.1" shelljs "^0.8.3" - snarkjs "0.3.23" + snarkjs "0.3.59" -maci-cli@0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-cli/-/maci-cli-0.5.7.tgz#7216a9ed4eaae4cafac4433705a7620eebe1c12f" - integrity sha512-5NhWksr2m815Er0JeHTtSBANJVnxcF89qg8sFJQhH1L609Q0I1Dta2j/NKxXb1675YDjAODJV9JVarf+rHZraA== +maci-cli@0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-cli/-/maci-cli-0.6.7.tgz#de18158bb3485a536dc654e391a88f46545550b1" + integrity sha512-Ym6ZugRhMK0JspPveqaFza7udcTFEcWDYeQ3oOISVGLZhfWR6nozKva6lbORDwPxzRzVnFEryYqNXIxTdcgGTw== dependencies: argparse "^1.0.10" ethers "^4.0.45" - libsemaphore "^1.0.5" - maci-circuits "^0.5.7" - maci-config "^0.5.7" - maci-contracts "^0.5.7" - maci-core "^0.5.7" - maci-crypto "^0.5.7" - maci-domainobjs "^0.5.7" - prompt-async "^0.9.9" - -maci-config@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-config/-/maci-config-0.5.7.tgz#aa5c8851c978c8ea18126bad8ba56fb1023ecc42" - integrity sha512-NH6Jzafw5B9o9epmfB4AsPIAMJO8QAfAAOcUD/JAHuSrv9WiKLTN8lAtbcMN09k5nwRBYB09OTfXmdXZoQ0Gxg== + maci-circuits "^0.6.7" + maci-config "^0.6.6" + maci-contracts "^0.6.7" + maci-core "^0.6.7" + maci-crypto "^0.6.7" + maci-domainobjs "^0.6.7" + prompt-sync "4.2.0" + +maci-config@^0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/maci-config/-/maci-config-0.6.6.tgz#69a5c15e50b5c7f6b7ab892003ccaaa557cd5895" + integrity sha512-ro5vW6ylr0s7gX/8rYVmrlWQalxaPDp6ZTcnWyHIVK+yEGwyqngK3Ah0/29AiDLoWDElY3S0OBxHRT+Epr1B0Q== dependencies: config "^3.2.4" js-yaml "^3.13.1" path "^0.12.7" -maci-contracts@0.5.7, maci-contracts@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-contracts/-/maci-contracts-0.5.7.tgz#ad62b70501e408f2b9aadc34a62397094d238ec8" - integrity sha512-QW3PclQtXY9pschpzojdm1w9na1jmVlawAnREyWaurB7qFNAaDJkuh7plertPWUGZArkvUr05PSseDohH6d95A== +maci-contracts@0.6.7, maci-contracts@^0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-contracts/-/maci-contracts-0.6.7.tgz#697213cfcd1fda0be6e4c3a2fa9fef841b2057ef" + integrity sha512-WwwxVKDr9Hb+m3LpmwmSrfE5UGuyWe+mervGy2td59M3P6fuEGvZSCKYHneZ759QPFXL9dbGhjxtqris5p13Rg== dependencies: "@openzeppelin/contracts" "~3.2.0" argparse "^1.0.10" - circomlib "0.2.4" + circomlib "0.5.1" ethers "^4.0.45" module-alias "^2.2.2" -maci-core@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-core/-/maci-core-0.5.7.tgz#fb873350fbeb146cfa48cb6f288b734c6db83709" - integrity sha512-H7BMBHM2e4JxXsHomZGa5ZXtCMdx1xkZ9NBpnYgNtO1jQNvTZaER/q0ifUySvNAStVuWzJpagW35q753N/eG5g== +maci-core@^0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-core/-/maci-core-0.6.7.tgz#6bfbb54358708e611dda751d0410401f9b124f8f" + integrity sha512-z9ryy/FEYl9Esr4rt+v2BR37A1GkSLHJDh3xmU5pq9bQu9TAfCmXWGRQ0sm42yowcUPztG0UiKNkjzv4jcc5Fw== dependencies: ethers "^4.0.45" - maci-config "^0.5.7" - maci-crypto "^0.5.7" - maci-domainobjs "^0.5.7" + maci-config "^0.6.6" + maci-crypto "^0.6.7" + maci-domainobjs "^0.6.7" module-alias "^2.2.2" -maci-crypto@^0.5.7, maci-crypto@~0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-crypto/-/maci-crypto-0.5.7.tgz#7d218ba91a329566292e5f154735c0833ac2bb75" - integrity sha512-FU6IEVpakww22pDRWuCNrpnxF0Uv7QV0bTjeihIEbydEzqCPJLY6/2WMr9E1A22M0LXhSYiFL+lOdmvo9sN+4Q== +maci-crypto@^0.6.7, maci-crypto@~0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-crypto/-/maci-crypto-0.6.7.tgz#b58bb745a0e05086c165574aa86c3a0cf196df60" + integrity sha512-4u2y2V8vH1Gq7zNoBiZRt0+oUk5NqtMMewjI02EQvLEN+RMOScb1adCh8KgxnS66UIY+u7OaFPAs0uH4f8KbEg== dependencies: - circomlib "https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920" + circomlib "0.5.1" ethers "^4.0.45" - ffjavascript "0.1.0" + ffjavascript "0.2.35" -maci-domainobjs@^0.5.7, maci-domainobjs@~0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/maci-domainobjs/-/maci-domainobjs-0.5.7.tgz#15e0ab74200d0b5282501cbb420315dfabe5120e" - integrity sha512-YfpMfXzvdIbgoK+tO9bOonQMB4Yqr2c/ib3F/iNB11MrujaHeYFg4uOCwwxxkdwWmpkEHIGtSf5JA1S2hPI0sw== +maci-domainobjs@^0.6.7, maci-domainobjs@~0.6.7: + version "0.6.7" + resolved "https://registry.yarnpkg.com/maci-domainobjs/-/maci-domainobjs-0.6.7.tgz#e1e9c3f5bf4819376e5b6636722ca403a2df3626" + integrity sha512-3qUocaOJLUZmiV/AsrOZ3kLg2GetBPjLRA2rWw6Ngni6XSoBkX9e4kiTdKvIW9jxCtrujl7RVkVEBAKvYHiyJQ== mafmt@^7.0.0, mafmt@^7.0.1, mafmt@^7.1.0: version "7.1.0" @@ -12128,13 +12038,6 @@ mamacro@^0.0.3: resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -12166,15 +12069,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - memdown@^1.0.0: version "1.4.1" resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" @@ -12377,7 +12271,7 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.0.0, mimic-fn@^2.1.0: +mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -12431,11 +12325,6 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - minipass-collect@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" @@ -12522,7 +12411,7 @@ mkdirp@0.5.1: dependencies: minimist "0.0.8" -mkdirp@0.5.5, mkdirp@0.x.x, mkdirp@^0.5.5: +mkdirp@0.5.5, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -12600,6 +12489,37 @@ mocha@^7.1.2: yargs-parser "13.1.2" yargs-unparser "1.6.0" +mocha@^8.2.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.3.2.tgz#53406f195fa86fbdebe71f8b1c6fb23221d69fcc" + integrity sha512-UdmISwr/5w+uXLPKspgoV7/RXZwKRTiTjJ2/AC5ZiEztIoOYdfKb19+9jNmEInzx5pBsCyJQzarAxqIGBNYJhg== + 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" + mochapack@^1.1.15: version "1.1.15" resolved "https://registry.yarnpkg.com/mochapack/-/mochapack-1.1.15.tgz#426c793b871ed006c781172da2b15f612f11f2dc" @@ -12688,6 +12608,11 @@ ms@2.1.2, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multiaddr-to-uri@^5.0.0, multiaddr-to-uri@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/multiaddr-to-uri/-/multiaddr-to-uri-5.1.0.tgz#879b55e4170db37cf05e1bce5831de70084933b9" @@ -12945,7 +12870,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== @@ -12989,6 +12914,11 @@ nanoassert@^1.0.0: resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" integrity sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40= +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + nanoid@^2.1.0, nanoid@^2.1.11: version "2.1.11" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" @@ -13036,11 +12966,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -ncp@1.0.x: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ncp/-/ncp-1.0.1.tgz#d15367e5cb87432ba117d2bf80fdf45aecfb4246" - integrity sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY= - needle@^2.2.1: version "2.5.2" resolved "https://registry.yarnpkg.com/needle/-/needle-2.5.2.tgz#cf1a8fce382b5a280108bba90a14993c00e4010a" @@ -13536,14 +13461,6 @@ opn@^5.5.0: dependencies: is-wsl "^1.1.0" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optimist@~0.3.5: version "0.3.7" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" @@ -13813,15 +13730,6 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-locale@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -13858,11 +13766,6 @@ p-cancelable@^2.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - p-defer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" @@ -13908,11 +13811,6 @@ p-forever@^2.1.0: resolved "https://registry.yarnpkg.com/p-forever/-/p-forever-2.1.0.tgz#3b8d1de4b572c9c1f8ecf0346cc79e61d024b9ec" integrity sha512-kqZrNBsD8fUPCpZLYJoHTiONQVrdkA2nKwSsTfIr5h7P8jGpSy+Vzkxu6nVcZcz3c/rSx/Ys3AACd/BkMKvqbw== -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -13934,6 +13832,13 @@ p-limit@^2.2.2, p-limit@^2.3.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -13955,6 +13860,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" @@ -14473,16 +14385,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -pkginfo@0.3.x: - version "0.3.1" - resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" - integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE= - -pkginfo@0.x.x: - version "0.4.1" - resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" - integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8= - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -14923,16 +14825,6 @@ pretty-error@^2.0.2: renderkid "^2.0.1" utila "~0.4" -pretty-format@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== - dependencies: - "@jest/types" "^24.9.0" - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - react-is "^16.8.4" - pretty@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pretty/-/pretty-2.0.0.tgz#adbc7960b7bbfe289a557dc5f737619a220d06a5" @@ -15015,24 +14907,12 @@ promise@~1.3.0: dependencies: is-promise "~1" -prompt-async@^0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/prompt-async/-/prompt-async-0.9.9.tgz#6fb90053480eec4d06368d6e7fa434736b61193b" - integrity sha512-XHpcP55ME/MRHvvKTGYSayMMpWY7M2dEx5g6WdfHabkO4+BrJIWeZh4+qJG4lRgebr5ovT+Cnv98qfmXqQ3RXA== - dependencies: - prompt "^1.0.0" - -prompt@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prompt/-/prompt-1.0.0.tgz#8e57123c396ab988897fb327fd3aedc3e735e4fe" - integrity sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4= +prompt-sync@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/prompt-sync/-/prompt-sync-4.2.0.tgz#0198f73c5b70e3b03e4b9033a50540a7c9a1d7f4" + integrity sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw== dependencies: - colors "^1.1.2" - pkginfo "0.x.x" - read "1.0.x" - revalidator "0.1.x" - utile "0.3.x" - winston "2.1.x" + strip-ansi "^5.0.0" proper-lockfile@^4.0.0, proper-lockfile@^4.1.1: version "4.1.1" @@ -15311,22 +15191,6 @@ quick-format-unescaped@^3.0.3: resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz#fb3e468ac64c01d22305806c39f121ddac0d1fb9" integrity sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ== -r1csfile@0.0.12: - version "0.0.12" - resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.12.tgz#2164ba82f6a4e91ea54c26e9f3d51e4413666c27" - integrity sha512-PcxL8dlJJ3i6g2wwcsXUnETIUQ0pg8RstZlTn00iqC79EYYBc/jsYC9Y8tt1+NTZ8pW5A+y0SefNsqVR16I3JQ== - dependencies: - fastfile "0.0.6" - ffjavascript "0.2.4" - -r1csfile@0.0.14: - version "0.0.14" - resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.14.tgz#145d79cfb15c18ddfb0ee76f8df721eacce7b27f" - integrity sha512-7m4eWpnbjkwGGUaRmIAJc4w+HvaeBPJXUKHIqLkHeD9Yyjem6/EHmlgDVl+4hWNWGZqdhXuMqWSH9+O6QOXBdw== - dependencies: - fastfile "0.0.7" - ffjavascript "0.2.4" - r1csfile@0.0.16: version "0.0.16" resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.16.tgz#53c66a79b50eebc2d15a1048e39d548ce9da7ccd" @@ -15336,13 +15200,15 @@ r1csfile@0.0.16: fastfile "0.0.18" ffjavascript "0.2.22" -r1csfile@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.5.tgz#63e2a74f833693356f18d517b9fc42238df7e187" - integrity sha512-B+BdKPb/WUTp4N/3X4d1Spgx9Ojx5tFVejGZRJxpTtzq34mC8Vi/czWfiPj85V8kud31lCfYcZ16z7+czvM0Sw== +r1csfile@0.0.32: + version "0.0.32" + resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.32.tgz#64a6c63ff76b737b3ee22bcedb2bb9a033cbeb1a" + integrity sha512-DkRXeOg0iRmfhgIuWICvdkOiLHpyb7+AcUd/WHpqBJEUp27pe7wKXBR4Jr3TPYCT4sTV9a/F3bovyAC4wystnQ== dependencies: - fastfile "0.0.1" - ffjavascript "0.1.0" + "@iden3/bigarray" "0.0.2" + "@iden3/binfileutils" "0.0.8" + fastfile "0.0.19" + ffjavascript "0.2.35" rabin-wasm@^0.1.1: version "0.1.4" @@ -15423,11 +15289,6 @@ rc@^1.2.7, rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-is@^16.8.4: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -15455,13 +15316,6 @@ read-pkg@^5.1.1: parse-json "^5.0.0" type-fest "^0.6.0" -read@1.0.x: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= - dependencies: - mute-stream "~0.0.4" - "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -15851,11 +15705,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -revalidator@0.1.x: - version "0.1.8" - resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" - integrity sha1-/s5hv6DBtSoga9axgZgYS91SOjs= - rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -15873,7 +15722,7 @@ rimraf@2.6.3, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -16125,16 +15974,6 @@ selfsigned@^1.10.7: dependencies: node-forge "0.9.0" -semaphore-merkle-tree@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/semaphore-merkle-tree/-/semaphore-merkle-tree-1.0.13.tgz#683da293e3dcdb2f1ba3e1cca80cfe9e66bfa351" - integrity sha512-Gvlz3AI/JGtlJ5lS/ai2UeFuaaw6ksr1jBKE8wEaSF2xeHPM85GAk01cHHlzZ/PZXCBcDrMkS5TpT4Y2JDJtTA== - dependencies: - "@types/jest" "^24.0.15" - await-lock "^1.1.3" - circomlib "0.0.21" - snarkjs "0.1.20" - semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" @@ -16186,6 +16025,13 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + serialize-javascript@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" @@ -16460,42 +16306,18 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -snarkjs@0.1.20: - version "0.1.20" - resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.1.20.tgz#4284217e823e71d9c7ded01eb439ace5190b90e1" - integrity sha512-tYmWiVm1sZiB44aIh5w/3HUaTntTUC4fv+CWs4rR0gfkt2KbHTpArOqZW++/Lxujrn9IypXVhdKVUr/eE6Hxfg== - dependencies: - big-integer "^1.6.43" - chai "^4.2.0" - escape-string-regexp "^1.0.5" - eslint "^5.16.0" - keccak "^2.0.0" - yargs "^12.0.5" - -snarkjs@0.3.23: - version "0.3.23" - resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.3.23.tgz#c21122ca32a6d6035a86499f40c7208455e5f2e2" - integrity sha512-lNAKsZr2eza3Lt/QlizVouXmNyLM0bcYgvnzOnjwNWVRPvwtOYIU8bO5hVXnhU5QcFjzm8D0/zcQmESzMsjx5A== +snarkjs@0.3.59: + version "0.3.59" + resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.3.59.tgz#818821658117bb65aff5f1c8b6fe03d74dd91354" + integrity sha512-fj8EOtziIz6FvNmcT97L4QM+QNzoCf8zTo4ghpYY4wFf0ZkgX9tSR2SZy1BjtaQnlC+LiF55wOG+jucP9Aw5BA== dependencies: + "@iden3/binfileutils" "0.0.8" blake2b-wasm "https://github.com/jbaylina/blake2b-wasm.git" - circom_runtime "0.1.4" - fastfile "0.0.13" - ffjavascript "0.2.10" + circom_runtime "0.1.13" + fastfile "0.0.19" + ffjavascript "0.2.35" logplease "^1.2.15" - r1csfile "0.0.12" - -snarkjs@^0.1.20: - version "0.1.31" - resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.1.31.tgz#a9cf6982c2aa4b1b0da224a339c6370accda4041" - integrity sha512-Xu9Ai89GPLUI6hSyVkc6LRE3sUEje7+eokHeKkb4sZuWW4JqPKWRW7ZtwM7VjsisgVM2gVAg9IYsMD4k+MhuPA== - dependencies: - chai "^4.2.0" - circom_runtime "0.0.6" - escape-string-regexp "^1.0.5" - ffjavascript "0.1.0" - keccak "^3.0.0" - r1csfile "0.0.5" - yargs "^12.0.5" + r1csfile "0.0.32" socket.io-adapter@~1.1.0: version "1.1.2" @@ -16837,11 +16659,6 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -stack-trace@0.0.x: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" - integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= - stackframe@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.1.1.tgz#ffef0a3318b1b60c3b58564989aca5660729ec71" @@ -16948,7 +16765,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -17080,6 +16897,11 @@ strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + strip-json-comments@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" @@ -17110,6 +16932,13 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -18123,18 +17952,6 @@ utila@^0.4.0, utila@~0.4: resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= -utile@0.3.x: - version "0.3.0" - resolved "https://registry.yarnpkg.com/utile/-/utile-0.3.0.tgz#1352c340eb820e4d8ddba039a4fbfaa32ed4ef3a" - integrity sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo= - dependencies: - async "~0.9.0" - deep-equal "~0.2.1" - i "0.3.x" - mkdirp "0.x.x" - ncp "1.0.x" - rimraf "2.x.x" - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -18338,10 +18155,10 @@ wasmcurves@0.0.12: big-integer "^1.6.42" blakejs "^1.1.0" -wasmcurves@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/wasmcurves/-/wasmcurves-0.0.4.tgz#e5a21b1c8bd6dca4c35262110c9a49d4cdc9ceb2" - integrity sha512-c/Tob+F/7jJhep1b2qtj54r4nkGaRifNbQ1OJx8cBBFH1RlHbWIbISHWONClOxiVwy/JZOpbN4SgvSX/4lF80A== +wasmcurves@0.0.14: + version "0.0.14" + resolved "https://registry.yarnpkg.com/wasmcurves/-/wasmcurves-0.0.14.tgz#cbe0f19650d9554937154afdbed66b305bd2a348" + integrity sha512-G1iMkxlRaQSdqQ1JrwHcU+awLmwyH6kFKfT8g9obd8MWe+u5oSdFXrODB0zmSI5aGGvJPG+4cAmqCGYv9R+7qg== dependencies: big-integer "^1.6.42" blakejs "^1.1.0" @@ -18382,6 +18199,11 @@ web-encoding@^1.0.2: resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.0.4.tgz#0398d39ce2cbef5ed2617080750ed874e6153aea" integrity sha512-DcXs2lbVPzuJmn2kuDEwul2oZg7p4YMa5J2f0YzsOBHaAnBYGPNUB/rJ74DTjTKpw7F0+lSsVM8sFHE2UyBixg== +web-worker@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.0.0.tgz#c7ced4e1eb6227636ada35056a9e5a477414e4d0" + integrity sha512-BzuMqeKVkKKwHV6tJuwePFcxYMxvC97D448mXTgh/CxXAB4sRtoV26gRPN+JDxsXRR7QZyioMV9O6NzQaASf7Q== + web3-bzz@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" @@ -18392,16 +18214,6 @@ web3-bzz@1.2.11: swarm-js "^0.1.40" underscore "1.9.1" -web3-bzz@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.9.tgz#25f8a373bc2dd019f47bf80523546f98b93c8790" - integrity sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA== - dependencies: - "@types/node" "^10.12.18" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - web3-core-helpers@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" @@ -18411,15 +18223,6 @@ web3-core-helpers@1.2.11: web3-eth-iban "1.2.11" web3-utils "1.2.11" -web3-core-helpers@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz#6381077c3e01c127018cb9e9e3d1422697123315" - integrity sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.9" - web3-utils "1.2.9" - web3-core-method@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" @@ -18432,18 +18235,6 @@ web3-core-method@1.2.11: web3-core-subscriptions "1.2.11" web3-utils "1.2.11" -web3-core-method@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.9.tgz#3fb538751029bea570e4f86731e2fa5e4945e462" - integrity sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-utils "1.2.9" - web3-core-promievent@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" @@ -18451,13 +18242,6 @@ web3-core-promievent@1.2.11: dependencies: eventemitter3 "4.0.4" -web3-core-promievent@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz#bb1c56aa6fac2f4b3c598510f06554d25c11c553" - integrity sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw== - dependencies: - eventemitter3 "3.1.2" - web3-core-requestmanager@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" @@ -18469,17 +18253,6 @@ web3-core-requestmanager@1.2.11: web3-providers-ipc "1.2.11" web3-providers-ws "1.2.11" -web3-core-requestmanager@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz#dd6d855256c4dd681434fe0867f8cd742fe10503" - integrity sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-providers-http "1.2.9" - web3-providers-ipc "1.2.9" - web3-providers-ws "1.2.9" - web3-core-subscriptions@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" @@ -18489,15 +18262,6 @@ web3-core-subscriptions@1.2.11: underscore "1.9.1" web3-core-helpers "1.2.11" -web3-core-subscriptions@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz#335fd7d15dfce5d78b4b7bef05ce4b3d7237b0e4" - integrity sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg== - dependencies: - eventemitter3 "3.1.2" - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-core@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" @@ -18511,19 +18275,6 @@ web3-core@1.2.11: web3-core-requestmanager "1.2.11" web3-utils "1.2.11" -web3-core@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.9.tgz#2cba57aa259b6409db532d21bdf57db8d504fd3e" - integrity sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA== - dependencies: - "@types/bn.js" "^4.11.4" - "@types/node" "^12.6.1" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-requestmanager "1.2.9" - web3-utils "1.2.9" - web3-eth-abi@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" @@ -18533,15 +18284,6 @@ web3-eth-abi@1.2.11: underscore "1.9.1" web3-utils "1.2.11" -web3-eth-abi@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz#14bedd7e4be04fcca35b2ac84af1400574cd8280" - integrity sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q== - dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.9" - web3-eth-accounts@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" @@ -18559,23 +18301,6 @@ web3-eth-accounts@1.2.11: web3-core-method "1.2.11" web3-utils "1.2.11" -web3-eth-accounts@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz#7ec422df90fecb5243603ea49dc28726db7bdab6" - integrity sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg== - dependencies: - crypto-browserify "3.12.0" - eth-lib "^0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - web3-eth-contract@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" @@ -18591,21 +18316,6 @@ web3-eth-contract@1.2.11: web3-eth-abi "1.2.11" web3-utils "1.2.11" -web3-eth-contract@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz#713d9c6d502d8c8f22b696b7ffd8e254444e6bfd" - integrity sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q== - dependencies: - "@types/bn.js" "^4.11.4" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-promievent "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-utils "1.2.9" - web3-eth-ens@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" @@ -18621,21 +18331,6 @@ web3-eth-ens@1.2.11: web3-eth-contract "1.2.11" web3-utils "1.2.11" -web3-eth-ens@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz#577b9358c036337833fb2bdc59c11be7f6f731b6" - integrity sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-promievent "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-contract "1.2.9" - web3-utils "1.2.9" - web3-eth-iban@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" @@ -18644,14 +18339,6 @@ web3-eth-iban@1.2.11: bn.js "^4.11.9" web3-utils "1.2.11" -web3-eth-iban@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz#4ebf3d8783f34d04c4740dc18938556466399f7a" - integrity sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ== - dependencies: - bn.js "4.11.8" - web3-utils "1.2.9" - web3-eth-personal@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" @@ -18664,18 +18351,6 @@ web3-eth-personal@1.2.11: web3-net "1.2.11" web3-utils "1.2.11" -web3-eth-personal@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz#9b95eb159b950b83cd8ae15873e1d57711b7a368" - integrity sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ== - dependencies: - "@types/node" "^12.6.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - web3-eth@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" @@ -18695,25 +18370,6 @@ web3-eth@1.2.11: web3-net "1.2.11" web3-utils "1.2.11" -web3-eth@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.9.tgz#e40e7b88baffc9b487193211c8b424dc944977b3" - integrity sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag== - dependencies: - underscore "1.9.1" - web3-core "1.2.9" - web3-core-helpers "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-eth-abi "1.2.9" - web3-eth-accounts "1.2.9" - web3-eth-contract "1.2.9" - web3-eth-ens "1.2.9" - web3-eth-iban "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-utils "1.2.9" - web3-net@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" @@ -18723,15 +18379,6 @@ web3-net@1.2.11: web3-core-method "1.2.11" web3-utils "1.2.11" -web3-net@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.9.tgz#51d248ed1bc5c37713c4ac40c0073d9beacd87d3" - integrity sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-utils "1.2.9" - web3-provider-engine@14.2.1: version "14.2.1" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" @@ -18766,14 +18413,6 @@ web3-providers-http@1.2.11: web3-core-helpers "1.2.11" xhr2-cookies "1.1.0" -web3-providers-http@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.9.tgz#e698aa5377e2019c24c5a1e6efa0f51018728934" - integrity sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A== - dependencies: - web3-core-helpers "1.2.9" - xhr2-cookies "1.1.0" - web3-providers-ipc@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" @@ -18783,15 +18422,6 @@ web3-providers-ipc@1.2.11: underscore "1.9.1" web3-core-helpers "1.2.11" -web3-providers-ipc@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz#6159eacfcd7ac31edc470d93ef10814fe874763b" - integrity sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.9" - web3-providers-ws@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" @@ -18802,16 +18432,6 @@ web3-providers-ws@1.2.11: web3-core-helpers "1.2.11" websocket "^1.0.31" -web3-providers-ws@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz#22c2006655ec44b4ad2b41acae62741a6ae7a88c" - integrity sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA== - dependencies: - eventemitter3 "^4.0.0" - underscore "1.9.1" - web3-core-helpers "1.2.9" - websocket "^1.0.31" - web3-shh@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" @@ -18822,16 +18442,6 @@ web3-shh@1.2.11: web3-core-subscriptions "1.2.11" web3-net "1.2.11" -web3-shh@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.9.tgz#c4ba70d6142cfd61341a50752d8cace9a0370911" - integrity sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA== - dependencies: - web3-core "1.2.9" - web3-core-method "1.2.9" - web3-core-subscriptions "1.2.9" - web3-net "1.2.9" - web3-utils@1.2.11, web3-utils@^1.0.0-beta.31: version "1.2.11" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" @@ -18846,13 +18456,13 @@ web3-utils@1.2.11, web3-utils@^1.0.0-beta.31: underscore "1.9.1" utf8 "3.0.0" -web3-utils@1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.9.tgz#abe11735221627da943971ef1a630868fb9c61f3" - integrity sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w== +web3-utils@^1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.4.tgz#9b1aa30d7549f860b573e7bb7e690999e7192198" + integrity sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A== dependencies: - bn.js "4.11.8" - eth-lib "0.2.7" + bn.js "^4.11.9" + eth-lib "0.2.8" ethereum-bloom-filters "^1.0.6" ethjs-unit "0.1.6" number-to-bn "1.7.0" @@ -18860,7 +18470,7 @@ web3-utils@1.2.9: underscore "1.9.1" utf8 "3.0.0" -web3@1.2.11, web3@^1.2.6: +web3@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== @@ -18873,19 +18483,6 @@ web3@1.2.11, web3@^1.2.6: web3-shh "1.2.11" web3-utils "1.2.11" -web3@^1.0.0-beta.55: - version "1.2.9" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.9.tgz#cbcf1c0fba5e213a6dfb1f2c1f4b37062e4ce337" - integrity sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA== - dependencies: - web3-bzz "1.2.9" - web3-core "1.2.9" - web3-eth "1.2.9" - web3-eth-personal "1.2.9" - web3-net "1.2.9" - web3-shh "1.2.9" - web3-utils "1.2.9" - webcrypto-core@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.1.8.tgz#91720c07f4f2edd181111b436647ea5a282af0a9" @@ -19043,14 +18640,6 @@ webpack@^4.0.0: version "2.2.0" resolved "https://codeload.github.com/ipfs/webrtcsupport/tar.gz/0a7099ff04fd36227a32e16966dbb3cca7002378" -websnark@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/websnark/-/websnark-0.0.5.tgz#7327a967f37da9bb7abc1e5c5bc90b6188dea51e" - integrity sha512-JRJDLYa6GyHgRp7RQmauZBLgClx7OGclEnJLfW2uUyRFYDCBGdgirIH7E2g1s1BR6GUqEBb0uHneqBKvO6Bt9A== - dependencies: - big-integer "^1.6.42" - blakejs "^1.1.0" - websocket-driver@0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" @@ -19138,7 +18727,7 @@ which@1.3.1, which@^1.2.9: dependencies: isexe "^2.0.0" -which@^2.0.1: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -19171,19 +18760,6 @@ window-size@^0.2.0: resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= -winston@2.1.x: - version "2.1.1" - resolved "https://registry.yarnpkg.com/winston/-/winston-2.1.1.tgz#3c9349d196207fd1bdff9d4bc43ef72510e3a12e" - integrity sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4= - dependencies: - async "~1.0.0" - colors "1.0.x" - cycle "1.0.x" - eyes "0.1.x" - isstream "0.1.x" - pkginfo "0.3.x" - stack-trace "0.0.x" - word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -19213,6 +18789,11 @@ worker-threads@^1.0.0: resolved "https://registry.yarnpkg.com/worker-threads/-/worker-threads-1.0.0.tgz#2b49ea7c9692ba737d9148f2c9b2be65e14e3470" integrity sha512-vK6Hhvph8oLxocEJIlc3YfGAZhm210uGzjZsXSu+JYLAQ/s/w4Tqgl60JrdH58hW8NSGP4m3bp8a92qPXgX05w== +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -19239,6 +18820,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -19395,11 +18985,16 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" @@ -19436,13 +19031,10 @@ yargs-parser@13.1.2, yargs-parser@^13.1.1, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^15.0.1: version "15.0.1" @@ -19476,6 +19068,11 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" +yargs-parser@^20.2.2: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + yargs-promise@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/yargs-promise/-/yargs-promise-1.1.0.tgz#97ebb5198df734bb3b11745133ae5b501b16ab1f" @@ -19490,6 +19087,16 @@ yargs-unparser@1.6.0: lodash "^4.17.15" yargs "^13.3.0" +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + yargs@13.3.0: version "13.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" @@ -19539,23 +19146,18 @@ yargs@14.0.0: y18n "^4.0.0" yargs-parser "^13.1.1" -yargs@^12.0.2, yargs@^12.0.5: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^4.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yargs@^14.2.0: version "14.2.3" @@ -19638,6 +19240,11 @@ yn@3.1.1: resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + yorkie@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yorkie/-/yorkie-2.0.0.tgz#92411912d435214e12c51c2ae1093e54b6bb83d9" From 66552b0ae7c7cbd5111170dbc70445db8a399c20 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Fri, 19 Mar 2021 21:03:18 +0300 Subject: [PATCH 06/24] Contracts: Use 'medium' circuits in production --- ...=> BatchUpdateStateTreeVerifierMedium.sol} | 52 +++++++++---------- ...ll.sol => QuadVoteTallyVerifierMedium.sol} | 32 ++++++------ contracts/contracts/snarkVerifiers/README.md | 5 +- contracts/utils/deployment.ts | 5 ++ docs/admin.md | 10 ++-- docs/coordinator.md | 8 +-- docs/trusted-setup.md | 4 +- 7 files changed, 60 insertions(+), 56 deletions(-) rename contracts/contracts/snarkVerifiers/{BatchUpdateStateTreeVerifierSmall.sol => BatchUpdateStateTreeVerifierMedium.sol} (55%) rename contracts/contracts/snarkVerifiers/{QuadVoteTallyVerifierSmall.sol => QuadVoteTallyVerifierMedium.sol} (66%) diff --git a/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierSmall.sol b/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierMedium.sol similarity index 55% rename from contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierSmall.sol rename to contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierMedium.sol index 1bcc41685..772e8c9fd 100644 --- a/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierSmall.sol +++ b/contracts/contracts/snarkVerifiers/BatchUpdateStateTreeVerifierMedium.sol @@ -143,7 +143,7 @@ library Pairing { } } -contract BatchUpdateStateTreeVerifierSmall { +contract BatchUpdateStateTreeVerifierMedium { using Pairing for *; @@ -155,7 +155,7 @@ contract BatchUpdateStateTreeVerifierSmall { Pairing.G2Point beta2; Pairing.G2Point gamma2; Pairing.G2Point delta2; - Pairing.G1Point[21] IC; + Pairing.G1Point[17] IC; } struct Proof { @@ -165,31 +165,27 @@ contract BatchUpdateStateTreeVerifierSmall { } function verifyingKey() internal pure returns (VerifyingKey memory vk) { - vk.alpha1 = Pairing.G1Point(uint256(10424504682237547740788959032227257505994143518149993134309222244530453247979),uint256(12516526828496862166243726877237935064874711231518697034166525079699144170332)); - vk.beta2 = Pairing.G2Point([uint256(4231144185815930275961386925009702577475226109480694790538465773188494236468),uint256(4142150588506859212091711305441364571274434886375518318190551236185780429206)], [uint256(16541229667518576736008617349728536996259046354181799711924056179675003962807),uint256(12624112621034023476243800671708545199664582194232272746481604449315579262897)]); - vk.gamma2 = Pairing.G2Point([uint256(12369528534805903882788844707550824443922094137540963000228952800415435872055),uint256(19127283997289948172497859266513888731480203229623074237355099921704077438088)], [uint256(18819773211255073939830378459821205970221366773311298031369955730338594388497),uint256(8356844313358531622455018950071054740206444591767264578145152378548747944313)]); - vk.delta2 = Pairing.G2Point([uint256(6032415197033141367926408113349779877979837899423614877349203868801030147506),uint256(21324776781809368878015006873835792968585002458937771677100574919300368302849)], [uint256(20421286058463460909809136718619604341084552075104815996804439166983434013895),uint256(5651546208568506022627109126661316773824582262143199959612777680288921793363)]); - vk.IC[0] = Pairing.G1Point(uint256(1994632212010096662598788071213849992516589979518602186052689890121046466864),uint256(875367741824741271712002495012229854239669943391477492275405672601520755357)); - vk.IC[1] = Pairing.G1Point(uint256(20312526534691895780290989651578118908242181608578898505327487606243761659701),uint256(13030644363930178378299609043615126620164473582155581193513790872869973821153)); - vk.IC[2] = Pairing.G1Point(uint256(10625996118412106766506252577480649514826155263885693394832294403873895121112),uint256(21465580205464167940518435889890623426645629208683909687889622398439447901210)); - vk.IC[3] = Pairing.G1Point(uint256(18020249479719787435854074836660269170184574202543196891638538180116295708766),uint256(2208386080730707632837896414768887773927098098549489434317173999449634454844)); - vk.IC[4] = Pairing.G1Point(uint256(9876273928760451211949910447628368238311232217167015909800036192199295001130),uint256(20089981782939615817383749396406074543586992327130847838843335855249882375154)); - vk.IC[5] = Pairing.G1Point(uint256(16948447680572539124448474613234481792762760959809733668628866244889889565230),uint256(18449951717627855393699770231315556583446260480683219658358050471797563270360)); - vk.IC[6] = Pairing.G1Point(uint256(1670544336914498750536106274188162008886139662712051965783460919427993797664),uint256(1638296624727115004986869024885342383594386466537750372798554076755483089884)); - vk.IC[7] = Pairing.G1Point(uint256(4864332009749210992012706270563774409937216503591051547256097131786276278343),uint256(14978746741661206176161626241795728103718416523005462830490005787498095520640)); - vk.IC[8] = Pairing.G1Point(uint256(12583894694926382009243999962378635584179900776304772009538292476707254678210),uint256(14818919377413445439758874182540967893526097485055634303953632119229026160782)); - vk.IC[9] = Pairing.G1Point(uint256(9312934742195337993934370697392662461471673284205037781051236401874507722795),uint256(18135205835101086829969269989842059633959442371885232217594163746010504488675)); - vk.IC[10] = Pairing.G1Point(uint256(19929848353599191302081198530457133757517378527984546297026401316793636893775),uint256(7923400580198896366530884663526872824167143716954511021209110062096541126293)); - vk.IC[11] = Pairing.G1Point(uint256(3815626758747112402482387723953289560414148585776496575224025446019797100051),uint256(8160183353093983505370450323264356597895262168507690572635534260376911422575)); - vk.IC[12] = Pairing.G1Point(uint256(13235695209764122721024297575615725653801303811282151100184350055095725329476),uint256(13762659658667381183860967238034334429176756019576659040367573563759503420362)); - vk.IC[13] = Pairing.G1Point(uint256(10224923567160114324581418445349360319217581624351560684873676177211105116394),uint256(13981507168868676943966493742338472073341884646162229550554384838461347251352)); - vk.IC[14] = Pairing.G1Point(uint256(10962702323741099045095171223383671236653917848511755738542508544862575259580),uint256(6690598540720816975822065914957503947665899755754179230995404800753518501908)); - vk.IC[15] = Pairing.G1Point(uint256(8036925540396023530781309590046187710701051339812699606393885349356238619764),uint256(2456463294307747324261312718113205507274339042590221890811507459892054404158)); - vk.IC[16] = Pairing.G1Point(uint256(12467095243211176023406433518649578338844130344441684355723539518265957311801),uint256(11913158137985651344112545457849308214836585535847307293198817475736192181853)); - vk.IC[17] = Pairing.G1Point(uint256(2292343469860234533149837606055432060139722211780654029721447341088913970189),uint256(3732940203109522020912116043818935757941660692350524678110944457127393284583)); - vk.IC[18] = Pairing.G1Point(uint256(171234665984105323503022562031409513294526819653571558257000884558142078251),uint256(14775673687443174243090473590145349345707430969574561318912863008662591208868)); - vk.IC[19] = Pairing.G1Point(uint256(20864105987011801383049339122520640807128844698724580073818255488077644858347),uint256(20878444677780372306316961434245441671524519945960767121056005522157992250668)); - vk.IC[20] = Pairing.G1Point(uint256(21600147402444662535975879615094997719493978689531968898218871737811634292446),uint256(21877320531388645975303242779140223403518914750495567930082492470906431924673)); + vk.alpha1 = Pairing.G1Point(uint256(8127368723535166419632247524465558331085902869555340986059718511989533877903),uint256(20751332113681994095650238414495480904944949506381825493965392781178871266400)); + vk.beta2 = Pairing.G2Point([uint256(9685355385772429669466876586032950444529073715446288295667192086154215757045),uint256(7956626864936620944123193484482287319258088339178359422012222341945141262220)], [uint256(19277014037627504374082945717900190531762317571436581847505825764213853980686),uint256(1908967219375266398782153786533621521966321545716402064661821836653497251741)]); + vk.gamma2 = Pairing.G2Point([uint256(5702317503459074564121810512849723904030883133659602462895207227676159457073),uint256(9752411496072907857511096469537907301675968143151763666915902954766029820649)], [uint256(15311638672119697109635568189096163980728853237572158000887687187767443065721),uint256(1467949219797428504423330776372868631685191022967660814672971291349981326453)]); + vk.delta2 = Pairing.G2Point([uint256(10042644312445726099186680195135610911154557846368466839914514090420315363196),uint256(5953242661240745376894723690499081179580713522533109505888896972170548423447)], [uint256(10432007173047800436393448146423908598229591402975125688897148668885988436869),uint256(12761943683328572443702167247603024646278392963300375768416341208640194440024)]); + vk.IC[0] = Pairing.G1Point(uint256(11684292448093409938749262856593257593265415990315799375441434818225669117513),uint256(17354060169699583056385031768553520066269419437930441355141323183474193288344)); + vk.IC[1] = Pairing.G1Point(uint256(18978804233362855254748336240885798166167145695925971316209016129430982996836),uint256(257858084308660882579741098452103505697546993991481243530058803272769410057)); + vk.IC[2] = Pairing.G1Point(uint256(17649396753598836169644322173305297636595195297224350400248366524982692230220),uint256(2165143809338451531595352410274439369578304210861736455028198355991881901890)); + vk.IC[3] = Pairing.G1Point(uint256(12743475133933567838181095413456793317278787317007224370983379018748448880439),uint256(17387113142283371215066240407634247412819690889126818223090569191529216359300)); + vk.IC[4] = Pairing.G1Point(uint256(1973511551104436924982643118293031400664941922560734295520380902778965063251),uint256(21423512037659270408296674189055636682814308571306415638667681949212670378307)); + vk.IC[5] = Pairing.G1Point(uint256(12777475795556421867594783452639673004232530111226584159211744735927472586255),uint256(7326014169312842413471118740148351952862820599657458623242388398534338006363)); + vk.IC[6] = Pairing.G1Point(uint256(5216469969299120528732608160349918061249907501767043565375615161147976215332),uint256(989946861370125382242158047375361790746368218462907689336263579770837836807)); + vk.IC[7] = Pairing.G1Point(uint256(1682411899235644827727477309775512902504716511759651526016668337120108984926),uint256(21769687491878374021041256695129294708083537029426461275027954222572060532876)); + vk.IC[8] = Pairing.G1Point(uint256(5947652013068851029927893718347327362975416962746360721614242282675280018208),uint256(19799444121016126892140192037794264125999664316205188958742024257185442352276)); + vk.IC[9] = Pairing.G1Point(uint256(21375424700580426268242254401461692906048911765321104036248562923057326547366),uint256(9129515758103210983440731412054967409022512154388896010243757658363345066677)); + vk.IC[10] = Pairing.G1Point(uint256(5181083872326425277095701295102437078618842182808106432882453866402826205563),uint256(3909589691497505586347501966012568332505459927841506312555163682171624999043)); + vk.IC[11] = Pairing.G1Point(uint256(10937238241723729230999281548237275936689326872031049956988113144871249285169),uint256(908961722856783819279957126760115378461171320446208214965651116245467045331)); + vk.IC[12] = Pairing.G1Point(uint256(3340262943862885831954653074465395723752665498076653211793977667293737939299),uint256(10595003636105707362809228404198822880051256440874866938066599528736642232113)); + vk.IC[13] = Pairing.G1Point(uint256(17733118154261984975207903210356648996459746363268039856505287526450143633061),uint256(10229172354780818691484249140658139755710494926977826788534554464077750899291)); + vk.IC[14] = Pairing.G1Point(uint256(15606780348017354284133115125836593111691468822472478900734443507129354597871),uint256(7527502697349561903585389719636612489476423980435833597073323824095560676366)); + vk.IC[15] = Pairing.G1Point(uint256(20637507020360298247108263518839712916953032459692536666602324578797100233564),uint256(3551825909610153987714265190158118462865969018102364275668450938716744737389)); + vk.IC[16] = Pairing.G1Point(uint256(15117627238918034193896927328047801718793634367825184271113223515449162451314),uint256(5616304170205753474662337142730909509040421377018706342325018229476514760803)); } @@ -229,7 +225,7 @@ contract BatchUpdateStateTreeVerifierSmall { // Make sure that every input is less than the snark scalar field //for (uint256 i = 0; i < input.length; i++) { - for (uint256 i = 0; i < 20; i++) { + for (uint256 i = 0; i < 16; i++) { require(input[i] < SNARK_SCALAR_FIELD,"verifier-gte-snark-scalar-field"); vk_x = Pairing.plus(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } diff --git a/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierSmall.sol b/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierMedium.sol similarity index 66% rename from contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierSmall.sol rename to contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierMedium.sol index 54152f442..6a0b9771c 100644 --- a/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierSmall.sol +++ b/contracts/contracts/snarkVerifiers/QuadVoteTallyVerifierMedium.sol @@ -143,7 +143,7 @@ library Pairing { } } -contract QuadVoteTallyVerifierSmall { +contract QuadVoteTallyVerifierMedium { using Pairing for *; @@ -165,21 +165,21 @@ contract QuadVoteTallyVerifierSmall { } function verifyingKey() internal pure returns (VerifyingKey memory vk) { - vk.alpha1 = Pairing.G1Point(uint256(22825003036761700397808240063945706722931664551639437894569548939935030149),uint256(15382532610766958774076970334324854685065402846386885121226878251585692091511)); - vk.beta2 = Pairing.G2Point([uint256(17249159930299965222272202124036234793737737923941805027673739662759394403533),uint256(18879914595698273034765815859825530547132634285446349906010840606397938629869)], [uint256(16410964412397292352341203920538158156260801577187224295588661052447519047531),uint256(5992611309029225358768247741607462026645365545155616140330695743505593583211)]); - vk.gamma2 = Pairing.G2Point([uint256(8978941882490730764177805685172105694082446779958502430844979263980020642873),uint256(12852918568117103172859530012988360823634164808736129643844697723464037643433)], [uint256(7561024398143639543616522646944220433142035776712409751871706216940134253641),uint256(20991668678714650071323411881047393801280154586077970261793437391357288911149)]); - vk.delta2 = Pairing.G2Point([uint256(17817918944857047860045993492092675005112242605018913713010133418969390999650),uint256(1555172178914232588686524382987870532944928992388469339337689900732308853571)], [uint256(11850126353478266345067570546672545477061767886655333384178548249266422146116),uint256(12961046612093746498494409121542531725860859165416401450754287788910940010727)]); - vk.IC[0] = Pairing.G1Point(uint256(14869639003245549517785716259348342139607780302468496998708466830353460285854),uint256(18966011814129999783568749471849994162605528552526368572829432674520278080588)); - vk.IC[1] = Pairing.G1Point(uint256(11621037228623948261801021495220249950317626989933872492587282490991613253978),uint256(1361966032891062714930219229861859359787434220319659405078500987094631486314)); - vk.IC[2] = Pairing.G1Point(uint256(4214841906138132970832312146357392333868840812057300600615171318062718352734),uint256(10710688136658895949795609073931470851690231166416422020587218877150044710236)); - vk.IC[3] = Pairing.G1Point(uint256(2364489330435772497241456131537545576692879171418310208339760521882758923115),uint256(16546933013742150736084689505186746735939109971419487530198628816446349972831)); - vk.IC[4] = Pairing.G1Point(uint256(15242517138888526962390599609356115774193810966083817371451411406875322490237),uint256(21093949245360194812069320064365373447939559835511653502308370423587310699010)); - vk.IC[5] = Pairing.G1Point(uint256(5428188398696815445599781549027757370633928339100788063261913391373036900208),uint256(14809376626930001355610298118568145738508571918658384533332512956354068142921)); - vk.IC[6] = Pairing.G1Point(uint256(5740821428603189180504671309402176234456798955564790294530332827792349783048),uint256(7995866433295653571560522212371538186463095552173060065914194401380521779682)); - vk.IC[7] = Pairing.G1Point(uint256(17421593953325752640755012372009390589715864534540728643109277966612002295105),uint256(15507806902646449592604416607772307578778068343497511827015265440616005371880)); - vk.IC[8] = Pairing.G1Point(uint256(11839257398496663502823452949625256281322346325687118909684282785381728354255),uint256(8925630661075255692651633187026934236687855774767010644990353794234306750884)); - vk.IC[9] = Pairing.G1Point(uint256(9079495873760987734492663079749164027783598737242084185726425303539745883441),uint256(12839680542115711156910631943100478019295614348479799248854388931674194942175)); - vk.IC[10] = Pairing.G1Point(uint256(7065510145157280952110773505384007069992053457928882721570336106492297005539),uint256(15670397745768416511708501457383508687475870001731938212186564726929616503428)); + vk.alpha1 = Pairing.G1Point(uint256(13319089463234179848573002558390225549925881544844229526026924163697823868217),uint256(16969301351798186988714599867637580075355998123297360899531464320382608917823)); + vk.beta2 = Pairing.G2Point([uint256(884135738813217152621098145714294997398020017370840732264237360992258561447),uint256(19265421094608053372816753968184963865893506095669353940268571978837240754173)], [uint256(6012149136709364348511994415938926021699699739179211173438016183904359873348),uint256(18991863387357993343955782395887020515221469647499376150856526155670788249449)]); + vk.gamma2 = Pairing.G2Point([uint256(21706235430892367859879218182417991464200104199464192769968420709969064082182),uint256(9915925245823821340262119200814211466249968283712127067494733663581717141808)], [uint256(8014379982653295859045609354888939159136652087530005163017336188856076697895),uint256(2588603844529736152444998937030017992055831391004763507477228242434048551536)]); + vk.delta2 = Pairing.G2Point([uint256(21672490495356192161771534456050409753676928730042015138105659729884181401296),uint256(11689585908171101387988657019546096291792404055572652014148290715892557767130)], [uint256(17715373485732263146801654162487114729339353301382818364817626786331552897670),uint256(7696588916204722756361279480504273602458100892781940413610616014966001317247)]); + vk.IC[0] = Pairing.G1Point(uint256(17087295223641082531404079553051944993373273715611908012655503993166473305754),uint256(6182736911358003151475000767360161120209489648201280392864464064000417014535)); + vk.IC[1] = Pairing.G1Point(uint256(21858953054392112643557291820558011932152397351662137062152873307837243226369),uint256(274645877754130014813042509232530378175318856440973274077059796717639658430)); + vk.IC[2] = Pairing.G1Point(uint256(14548545129502259069026547328012710742416048860809889195881907206952252416017),uint256(3228019127016928543942878181040938702662111374432682887727142995462783476447)); + vk.IC[3] = Pairing.G1Point(uint256(14373384695365988284659515115291314982184320080618552455788003283931361168551),uint256(8036736519216864070653705682127086068109886836500549090511686027151133616841)); + vk.IC[4] = Pairing.G1Point(uint256(16675333368700753066857800168703829812516465703476953717896334935892560689090),uint256(21608453333300419224392882163943662578792079956113795409183520246170299650376)); + vk.IC[5] = Pairing.G1Point(uint256(15736222309742563960248671973021862579667636851297012518581665096370726236454),uint256(21335199829751875203976028398898650985868040373956185059024547759260250305410)); + vk.IC[6] = Pairing.G1Point(uint256(16015435326083107624534169308129329045670274526456331351092633532436693939936),uint256(7453357474723762629421327112394063535945396093961872225177306831806502964062)); + vk.IC[7] = Pairing.G1Point(uint256(20800366726240207296493046386720608820175660231494817648971335534167674634983),uint256(2240276722181725673183741162820624252693987652993756341839102628211641338510)); + vk.IC[8] = Pairing.G1Point(uint256(21685869598701747502602869356260040072202071791936602760677041477453356238587),uint256(1570490528987142417400349354081659284444484408158915693119127128346469764684)); + vk.IC[9] = Pairing.G1Point(uint256(14687796710661759670182543591397320527000297314362566109212833620898352944810),uint256(14435809464288477390543880429818949557411637937848005232403789999458897870591)); + vk.IC[10] = Pairing.G1Point(uint256(4062878755941944424289598715546694691639070862682597049472966026221368157214),uint256(16596126292359214329416908692838229109530151425321455496930453385135619684735)); } diff --git a/contracts/contracts/snarkVerifiers/README.md b/contracts/contracts/snarkVerifiers/README.md index b105541b0..bf7bce33d 100644 --- a/contracts/contracts/snarkVerifiers/README.md +++ b/contracts/contracts/snarkVerifiers/README.md @@ -1,3 +1,6 @@ # SNARK verifiers -Trusted setup: https://ipfs.io/ipfs/QmateegDyF81zE1T8cfxE5qNo5aphEV4r7b1oxYMBsty5N +Trusted setup: + +- 'test' circuits: https://gateway.pinata.cloud/ipfs/Qmbi3nqjBwANPMk5BRyKjCJ4QSHK6WNp7v9NLLo4uwrG1f +- 'medium' circuits: https://gateway.pinata.cloud/ipfs/QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD diff --git a/contracts/utils/deployment.ts b/contracts/utils/deployment.ts index fd479cce6..1663d9565 100644 --- a/contracts/utils/deployment.ts +++ b/contracts/utils/deployment.ts @@ -28,6 +28,11 @@ const CIRCUITS: {[name: string]: any} = { qvtVerifier: 'QuadVoteTallyVerifierSmall', treeDepths: { stateTreeDepth: 8, messageTreeDepth: 11, voteOptionTreeDepth: 3 }, }, + medium: { + batchUstVerifier: 'BatchUpdateStateTreeVerifierMedium', + qvtVerifier: 'QuadVoteTallyVerifierMedium', + treeDepths: { stateTreeDepth: 9, messageTreeDepth: 13, voteOptionTreeDepth: 3 }, + }, } export async function deployContract( diff --git a/docs/admin.md b/docs/admin.md index 66a314419..9fb115df7 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -18,7 +18,7 @@ Deploy MACI factory: ``` const [deployer] = await ethers.getSigners() const { deployMaciFactory } = require('./utils/deployment') -const maciFactory = await deployMaciFactory(deployer, 'small') +const maciFactory = await deployMaciFactory(deployer, 'medium') ``` The `deployMaciFactory` function deploys MACI factory and other contracts required by it: @@ -33,8 +33,8 @@ Alternatively, one can deploy these contracts one by one: const { deployContract, deployMaciFactory } = require('./utils/deployment') const poseidonT3 = await deployContract(deployer, ':PoseidonT3') const poseidonT6 = await deployContract(deployer, ':PoseidonT6') -const batchUstVerifier = await deployContract(deployer, 'BatchUpdateStateTreeVerifierSmall') -const qvtVerifier = await deployContract(deployer, 'QuadVoteTallyVerifierSmall') +const batchUstVerifier = await deployContract(deployer, 'BatchUpdateStateTreeVerifierMedium') +const qvtVerifier = await deployContract(deployer, 'QuadVoteTallyVerifierMedium') const maciFactory = await deployMaciFactory(deployer, 'small', { poseidonT3, poseidonT6, batchUstVerifier, qvtVerifier }) ``` @@ -116,13 +116,13 @@ maciParameters.update({ signUpDuration: 86400 * 14, votingDuration: 86400 * 3 }) await factory.setMaciParameters(...maciParameters.values()) ``` -Add [funding source](./funding-source.md): +Add [funding source](./funding-source.md) (if needed): ``` await factory.addFundingSource('
') ``` -Remove funding source: +Or remove funding source: ``` await factory.removeFundingSource('
') diff --git a/docs/coordinator.md b/docs/coordinator.md index b914e3728..dc3721f02 100644 --- a/docs/coordinator.md +++ b/docs/coordinator.md @@ -12,11 +12,11 @@ git checkout v0.6.7 Follow instructions in README.md to install necessary dependencies. -Download trusted setup files into `circuits/params/` directory and rebuild the keys: +Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD) for 'medium' circuits into `circuits/params/` directory and rebuild the keys: ``` cd circuits -./scripts/buildSnarksSmall.sh +./scripts/buildSnarksMedium.sh ``` Recompile the contracts: @@ -83,10 +83,10 @@ Switch to `contracts` directory: cd contracts/ ``` -Download [zkSNARK parameters](https://ipfs.io/ipfs/QmateegDyF81zE1T8cfxE5qNo5aphEV4r7b1oxYMBsty5N) for 'small' circuits to `snark-params` directory. Example: +Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD) for 'medium' circuits to `snark-params` directory. Example: ``` -ipfs get --output snark-params QmateegDyF81zE1T8cfxE5qNo5aphEV4r7b1oxYMBsty5N +ipfs get --output snark-params QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD ``` Set the path to downloaded parameter files and also the path to `zkutil` binary (if needed): diff --git a/docs/trusted-setup.md b/docs/trusted-setup.md index 6a4d9e42c..5e20bcbac 100644 --- a/docs/trusted-setup.md +++ b/docs/trusted-setup.md @@ -11,11 +11,11 @@ git checkout v0.6.7 Follow instructions in README.md to install necessary dependencies. -Download trusted setup files into `circuits/params/` directory and rebuild the keys: +Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD) for 'medium' circuits into `circuits/params/` directory and rebuild the keys: ``` cd circuits -./scripts/buildSnarksSmall.sh +./scripts/buildSnarksMedium.sh ``` Recompile the contracts: From c2c274247f6b567708adcd2c1bdb9735add4ff24 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Sat, 20 Mar 2021 23:06:04 +0300 Subject: [PATCH 07/24] Frontend: Fix bug in calculation of deadlines --- vue-app/src/api/round.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vue-app/src/api/round.ts b/vue-app/src/api/round.ts index 9f6698fca..5ad87f48a 100644 --- a/vue-app/src/api/round.ts +++ b/vue-app/src/api/round.ts @@ -100,10 +100,10 @@ export async function getRoundInfo(fundingRoundAddress: string): Promise Date: Sat, 27 Mar 2021 01:48:38 +0300 Subject: [PATCH 08/24] Bump version --- contracts/package.json | 2 +- vue-app/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/package.json b/contracts/package.json index 488661302..c80e1832f 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@clrfund/contracts", - "version": "0.5.0", + "version": "0.6.0", "license": "GPL-3.0", "scripts": { "hardhat": "hardhat", diff --git a/vue-app/package.json b/vue-app/package.json index 86696ed4e..677efcbe4 100644 --- a/vue-app/package.json +++ b/vue-app/package.json @@ -1,6 +1,6 @@ { "name": "@clrfund/vue-app", - "version": "0.5.0", + "version": "0.6.0", "private": true, "scripts": { "gun": "gun --host localhost", From 5105319d37a0d38414148f74cdec2d2c32a3e0bb Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Sat, 27 Mar 2021 12:28:31 +0300 Subject: [PATCH 09/24] Frontend: Show correct token name on registry page --- docs/admin.md | 2 +- .../src/api/recipient-registry-optimistic.ts | 4 +++- vue-app/src/components/Profile.vue | 9 ++------- vue-app/src/utils/networks.ts | 17 +++++++++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 vue-app/src/utils/networks.ts diff --git a/docs/admin.md b/docs/admin.md index 9fb115df7..7b88b0227 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -35,7 +35,7 @@ const poseidonT3 = await deployContract(deployer, ':PoseidonT3') const poseidonT6 = await deployContract(deployer, ':PoseidonT6') const batchUstVerifier = await deployContract(deployer, 'BatchUpdateStateTreeVerifierMedium') const qvtVerifier = await deployContract(deployer, 'QuadVoteTallyVerifierMedium') -const maciFactory = await deployMaciFactory(deployer, 'small', { poseidonT3, poseidonT6, batchUstVerifier, qvtVerifier }) +const maciFactory = await deployMaciFactory(deployer, 'medium', { poseidonT3, poseidonT6, batchUstVerifier, qvtVerifier }) ``` ### Funding round factory diff --git a/vue-app/src/api/recipient-registry-optimistic.ts b/vue-app/src/api/recipient-registry-optimistic.ts index 3bf6d5dc9..a8b95139d 100644 --- a/vue-app/src/api/recipient-registry-optimistic.ts +++ b/vue-app/src/api/recipient-registry-optimistic.ts @@ -3,6 +3,7 @@ import { TransactionResponse, TransactionReceipt } from '@ethersproject/abstract import { isHexString } from '@ethersproject/bytes' import { DateTime } from 'luxon' import { getEventArg } from '@/utils/contracts' +import { getNetworkToken } from '@/utils/networks' import { OptimisticRecipientRegistry } from './abi' import { provider, ipfsGatewayUrl, recipientRegistryPolicy } from './core' @@ -19,9 +20,10 @@ export async function getRegistryInfo(registryAddress: string): Promise { diff --git a/vue-app/src/utils/networks.ts b/vue-app/src/utils/networks.ts new file mode 100644 index 000000000..9ff190bd4 --- /dev/null +++ b/vue-app/src/utils/networks.ts @@ -0,0 +1,17 @@ +import { Network } from '@ethersproject/networks' + +export function getNetworkName(network: Network): string { + if (network.name === 'unknown' && network.chainId === 100) { + return 'xdai' + } else { + return network.name + } +} + +export function getNetworkToken(network: Network): string { + if (network.name === 'unknown' && network.chainId === 100) { + return 'XDAI' + } else { + return 'ETH' + } +} From 920f8bac88baecc47a529c2a651b4fb15830a738 Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Sat, 27 Mar 2021 12:35:37 +0300 Subject: [PATCH 10/24] Frontend: Allow to set multiple GunDb peers --- vue-app/.env.example | 7 ++++++- vue-app/src/api/core.ts | 3 ++- vue-app/src/api/gun.ts | 6 ++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/vue-app/.env.example b/vue-app/.env.example index e2eeda6bb..bc4c52de3 100644 --- a/vue-app/.env.example +++ b/vue-app/.env.example @@ -1,7 +1,10 @@ VUE_APP_ETHEREUM_API_URL=http://localhost:18545 VUE_APP_BLOCK_EXPLORER=https://etherscan.io/tx/ VUE_APP_IPFS_GATEWAY_URL=https://ipfs.io -VUE_APP_GUN_API_URL=http://localhost:8765/gun + +# Comma-separated list of URLs +VUE_APP_GUN_PEERS=http://localhost:8765/gun + VUE_APP_CLRFUND_FACTORY_ADDRESS=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 # Supported values: simple, brightid @@ -11,4 +14,6 @@ VUE_APP_USER_REGISTRY_TYPE=simple VUE_APP_RECIPIENT_REGISTRY_TYPE=simple VUE_APP_RECIPIENT_REGISTRY_POLICY=QmeygKjvrpidJeFHv6ywjUrj718nwtFQgCCPPR4r5nL87R + +# Comma-separated list of IPFS hashes VUE_APP_EXTRA_ROUNDS= diff --git a/vue-app/src/api/core.ts b/vue-app/src/api/core.ts index 0dce7ca74..27445ba82 100644 --- a/vue-app/src/api/core.ts +++ b/vue-app/src/api/core.ts @@ -7,7 +7,8 @@ export const provider = new ethers.providers.StaticJsonRpcProvider( ) export const blockExplorer = process.env.VUE_APP_BLOCK_EXPLORER export const ipfsGatewayUrl = process.env.VUE_APP_IPFS_GATEWAY_URL -export const gunApiUrl = process.env.VUE_APP_GUN_API_URL as string +export const gunPeers: string[] = process.env.VUE_APP_GUN_PEERS ? + process.env.VUE_APP_GUN_PEERS.split(',') : [] export const factory = new ethers.Contract( process.env.VUE_APP_CLRFUND_FACTORY_ADDRESS as string, diff --git a/vue-app/src/api/gun.ts b/vue-app/src/api/gun.ts index ffabfeba9..d5b7c4faf 100644 --- a/vue-app/src/api/gun.ts +++ b/vue-app/src/api/gun.ts @@ -3,7 +3,7 @@ import Gun from 'gun/gun' import 'gun/sea' -import { gunApiUrl } from './core' +import { gunPeers } from './core' import { LOGIN_MESSAGE } from './user' import { md5 } from '@/utils/crypto' @@ -12,9 +12,7 @@ interface GunSchema { } const db = Gun({ - peers: [ - gunApiUrl, - ], + peers: gunPeers, }) const user = db.user() as any From 31f8311db07aa1287e747a8eac6861db6584456f Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Sat, 27 Mar 2021 12:55:59 +0300 Subject: [PATCH 11/24] Contracts: Update get-bytecode script --- contracts/scripts/get-bytecode.ts | 27 +++++++++++++++++++++++++++ contracts/scripts/linkPoseidon.ts | 20 -------------------- 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 contracts/scripts/get-bytecode.ts delete mode 100644 contracts/scripts/linkPoseidon.ts diff --git a/contracts/scripts/get-bytecode.ts b/contracts/scripts/get-bytecode.ts new file mode 100644 index 000000000..ae49a4567 --- /dev/null +++ b/contracts/scripts/get-bytecode.ts @@ -0,0 +1,27 @@ +// Usage: yarn ts-node scripts/get-bytecode.ts MACI +import { artifacts } from 'hardhat' +import { linkBytecode } from '../utils/deployment' + +async function main() { + const contractName = process.argv[2] + const poseidonT3Address = process.argv[3] + const poseidonT6Address = process.argv[4] + const artifact = await artifacts.readArtifact(contractName) + let result: string + if (poseidonT3Address && poseidonT6Address) { + result = linkBytecode(artifact.deployedBytecode, { + 'maci-contracts/sol/Poseidon.sol:PoseidonT3': poseidonT3Address, + 'maci-contracts/sol/Poseidon.sol:PoseidonT6': poseidonT6Address, + }) + } else { + result = artifact.deployedBytecode + } + console.info(result) +} + +main() + .then(() => process.exit(0)) + .catch(error => { + console.error(error) + process.exit(1) + }) diff --git a/contracts/scripts/linkPoseidon.ts b/contracts/scripts/linkPoseidon.ts deleted file mode 100644 index 4dfc4d89d..000000000 --- a/contracts/scripts/linkPoseidon.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { linkBytecode } from '../utils/deployment' - -async function main() { - const contractName = process.argv[2] - const poseidonT3Address = process.argv[3] - const poseidonT6Address = process.argv[4] - const artifact = await import(`../build/contracts/${contractName}.json`) - const result = linkBytecode(artifact.deployedBytecode, { - 'maci-contracts/sol/Poseidon.sol:PoseidonT3': poseidonT3Address, - 'maci-contracts/sol/Poseidon.sol:PoseidonT6': poseidonT6Address, - }) - console.info(result) -} - -main() - .then(() => process.exit(0)) - .catch(error => { - console.error(error) - process.exit(1) - }) From 68fe7ae6ddbf30d011f117bf879a1377ae782dbd Mon Sep 17 00:00:00 2001 From: Kirill Goncharov Date: Mon, 29 Mar 2021 22:43:40 +0300 Subject: [PATCH 12/24] Frontend: Render project description as markdown --- vue-app/package.json | 2 + vue-app/src/components/ProjectListItem.vue | 7 +++- .../components/RecipientSubmissionModal.vue | 1 + vue-app/src/utils/markdown.ts | 10 +++++ vue-app/src/views/Project.vue | 7 +++- vue-app/src/views/RecipientRegistry.vue | 9 ++++- yarn.lock | 38 +++++++++++++++++++ 7 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 vue-app/src/utils/markdown.ts diff --git a/vue-app/package.json b/vue-app/package.json index 677efcbe4..a3b0bcfef 100644 --- a/vue-app/package.json +++ b/vue-app/package.json @@ -22,6 +22,8 @@ "is-ipfs": "^2.0.0", "luxon": "^1.26.0", "maci-domainobjs": "~0.6.7", + "markdown-it": "^12.0.4", + "markdown-it-link-attributes": "^3.0.0", "qrcode": "^1.4.4", "vue": "^2.6.11", "vue-class-component": "^7.2.2", diff --git a/vue-app/src/components/ProjectListItem.vue b/vue-app/src/components/ProjectListItem.vue index 9623d9d67..b1062e539 100644 --- a/vue-app/src/components/ProjectListItem.vue +++ b/vue-app/src/components/ProjectListItem.vue @@ -13,7 +13,7 @@ > {{ project.name }} -
{{ project.description }}
+