diff --git a/src/test/identity-manager/WorldIDIdentityManagerDataQuery.t.sol b/src/test/identity-manager/WorldIDIdentityManagerDataQuery.t.sol index fa32ab9..65fbcb3 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerDataQuery.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerDataQuery.t.sol @@ -50,10 +50,10 @@ contract WorldIDIdentityManagerDataQuery is WorldIDIdentityManagerTest { vm.assume(newPreRoot != newPostRoot); vm.assume(identities.length <= 1000); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length])); makeNewIdentityManager( treeDepth, @@ -93,10 +93,10 @@ contract WorldIDIdentityManagerDataQuery is WorldIDIdentityManagerTest { vm.assume(SimpleVerify.isValidInput(uint256(prf[0]))); vm.assume(identities.length <= 1000); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length])); makeNewIdentityManager( treeDepth, diff --git a/src/test/identity-manager/WorldIDIdentityManagerGettersSetters.t.sol b/src/test/identity-manager/WorldIDIdentityManagerGettersSetters.t.sol index 3779360..6d26c51 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerGettersSetters.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerGettersSetters.t.sol @@ -121,7 +121,7 @@ contract WorldIDIdentityManagerGettersSetters is WorldIDIdentityManagerTest { /// identity deletion proofs. function testCanSetDeleteIdentitiesVerifierLookupTable() public { // Setup - (,, VerifierLookupTable deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); + (,, deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); address newVerifiersAddress = address(deletionVerifiers); bytes memory callData = abi.encodeCall(ManagerImpl.setDeleteIdentitiesVerifierLookupTable, (deletionVerifiers)); @@ -142,7 +142,7 @@ contract WorldIDIdentityManagerGettersSetters is WorldIDIdentityManagerTest { function testCannotSetDeleteIdentitiesVerifierLookupTableUnlessOwner(address notOwner) public { // Setup vm.assume(notOwner != address(this) && notOwner != address(0x0)); - (,, VerifierLookupTable deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); + (,, deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); bytes memory callData = abi.encodeCall( ManagerImplV1.setRegisterIdentitiesVerifierLookupTable, (deletionVerifiers) ); @@ -157,7 +157,7 @@ contract WorldIDIdentityManagerGettersSetters is WorldIDIdentityManagerTest { /// identity deletion unless called via the proxy. function testCannotSetDeleteIdentitiesVerifierLookupTableUnlessViaProxy() public { // Setup - (,, VerifierLookupTable deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); + (,, deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([40])); vm.expectRevert("Function must be called through delegatecall"); // Test diff --git a/src/test/identity-manager/WorldIDIdentityManagerIdentityDeletion.t.sol b/src/test/identity-manager/WorldIDIdentityManagerIdentityDeletion.t.sol index af666f5..b3256c1 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerIdentityDeletion.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerIdentityDeletion.t.sol @@ -37,10 +37,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { // Setup ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([40])); deletionVerifiers.addVerifier(deletionBatchSize, actualVerifier); makeNewIdentityManager( @@ -86,10 +86,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { vm.assume(packedDeletionIndices.length % 4 == 0); vm.assume(identityOperator != nullAddress && identityOperator != thisAddress); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([packedDeletionIndices.length / 4])); makeNewIdentityManager( treeDepth, @@ -133,10 +133,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { bytes memory secondIndices = abi.encodePacked(uint32(0), uint32(2), uint32(4), uint32(6)); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([deletionBatchSize, secondIndices.length / 4])); makeNewIdentityManager( treeDepth, @@ -181,10 +181,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { vm.assume(packedDeletionIndices.length > 4); vm.assume(packedDeletionIndices.length % 4 == 0); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = // the -1 offsets the correct batch size by 1 thus causing the error makeVerifierLookupTables(TC.makeDynArray([(packedDeletionIndices.length / 4) - 1])); @@ -221,10 +221,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { ITreeVerifier actualVerifier = new TreeVerifier(); uint32 indicesLength = uint32(packedDeletionIndices.length / 4); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); deletionVerifiers.addVerifier(indicesLength, actualVerifier); makeNewIdentityManager( @@ -254,10 +254,10 @@ contract WorldIDIdentityManagerIdentityDeletion is WorldIDIdentityManagerTest { vm.assume(newPostRoot != deletionPostRoot && newPostRoot < SNARK_SCALAR_FIELD); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); deletionVerifiers.addVerifier(deletionBatchSize, actualVerifier); makeNewIdentityManager( diff --git a/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration.t.sol b/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration.t.sol index c08e8e5..0a3193e 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration.t.sol @@ -38,10 +38,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes // Setup ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([40])); insertVerifiers.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -88,10 +88,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(identities.length <= 1000); vm.assume(identityOperator != nullAddress && identityOperator != thisAddress); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length])); makeNewIdentityManager( treeDepth, @@ -137,10 +137,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(identities.length <= 1000 && identities.length > 0); uint256 secondIdentsLength = identities.length / 2; ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length, secondIdentsLength])); makeNewIdentityManager( treeDepth, @@ -191,10 +191,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(newPreRoot != newPostRoot); vm.assume(identities.length > 0); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length - 1])); makeNewIdentityManager( treeDepth, @@ -229,10 +229,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(!SimpleVerify.isValidInput(uint256(prf[0]))); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers.addVerifier(identityCommitments.length, actualVerifier); makeNewIdentityManager( @@ -261,10 +261,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(newStartIndex != startIndex); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -305,10 +305,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes identities[invalidSlot] = identity; ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -339,9 +339,9 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes managerImplV2Address = address(managerImplV2); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, + insertVerifiers, + deletionVerifiers, + updateVerifiers, ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers.addVerifier(identityCommitmentsSize, actualVerifier); @@ -430,10 +430,10 @@ contract WorldIDIdentityManagerIdentityRegistration is WorldIDIdentityManagerTes vm.assume(zeroPosition < identitiesLength && zeroPosition > 0); uint256[] memory identities = new uint256[](identitiesLength); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identitiesLength])); makeNewIdentityManager( treeDepth, diff --git a/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration4844.t.sol b/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration4844.t.sol index 5e50ca7..f523677 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration4844.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerIdentityRegistration4844.t.sol @@ -38,10 +38,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage // Setup ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([40])); insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -104,10 +104,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(identities.length <= 1000); vm.assume(identityOperator != nullAddress && identityOperator != thisAddress); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length])); makeNewIdentityManager( treeDepth, @@ -168,10 +168,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(identities.length <= 1000 && identities.length > 0); uint256 secondIdentsLength = identities.length / 2; ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length, secondIdentsLength])); makeNewIdentityManager( treeDepth, @@ -240,10 +240,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(newPreRoot != newPostRoot); vm.assume(identities.length > 0); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identities.length - 1])); makeNewIdentityManager( treeDepth, @@ -292,10 +292,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(!SimpleVerify.isValidInput(uint256(prf[0]))); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers4844.addVerifier(identityCommitments.length, actualVerifier); makeNewIdentityManager( @@ -339,10 +339,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(newStartIndex != startIndex); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -392,10 +392,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage identities[invalidSlot] = identity; ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( @@ -441,10 +441,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage managerImplV2Address = address(managerImplV2); ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([70])); insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); @@ -586,10 +586,10 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage vm.assume(zeroPosition < identitiesLength && zeroPosition > 0); uint256[] memory identities = new uint256[](identitiesLength); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([identitiesLength])); makeNewIdentityManager( treeDepth, @@ -660,17 +660,17 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage // Setup ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertionVerifier4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([40])); - insertionVerifier4844.addVerifier(identityCommitmentsSize, actualVerifier); + insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( treeDepth, insertionPreRoot, insertVerifiers, - insertionVerifier4844, + insertVerifiers4844, deletionVerifiers, updateVerifiers, semaphoreVerifier @@ -707,17 +707,17 @@ contract WorldIDIdentityManagerIdentityRegistration4844 is WorldIDIdentityManage // Setup ITreeVerifier actualVerifier = new TreeVerifier(); ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertionVerifier4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(TC.makeDynArray([40])); - insertionVerifier4844.addVerifier(identityCommitmentsSize, actualVerifier); + insertVerifiers4844.addVerifier(identityCommitmentsSize, actualVerifier); makeNewIdentityManager( treeDepth, insertionPreRoot, insertVerifiers, - insertionVerifier4844, + insertVerifiers4844, deletionVerifiers, updateVerifiers, semaphoreVerifier diff --git a/src/test/identity-manager/WorldIDIdentityManagerTest.sol b/src/test/identity-manager/WorldIDIdentityManagerTest.sol index 581122b..f7ffd189 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerTest.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerTest.sol @@ -236,6 +236,11 @@ contract WorldIDIdentityManagerTest is WorldIDTest { ]; } + VerifierLookupTable insertVerifiers; + VerifierLookupTable deletionVerifiers; + VerifierLookupTable updateVerifiers; + VerifierLookupTable4844 insertVerifiers4844; + /// @notice This function runs before every single test. /// @dev It is run before every single iteration of a property-based fuzzing test. function setUp() public { @@ -274,18 +279,18 @@ contract WorldIDIdentityManagerTest is WorldIDTest { /// @dev It is initialised in the globals. /// /// @param actualPreRoot The pre-root to use. - /// @param insertVerifiers The insertion verifier lookup table. - /// @param insertVerifiers4844 The insertion verifier lookup table for EIP-4844 proofs. - /// @param updateVerifiers The udpate verifier lookup table. - /// @param actualSemaphoreVerifier The Semaphore verifier instance to use. + /// @param insertVer The insertion verifier lookup table. + /// @param insertVer4844 The insertion verifier lookup table for EIP-4844 proofs. + /// @param updateVer The update verifier lookup table. + /// @param actualSemaphoreVer The Semaphore verifier instance to use. function makeNewIdentityManager( uint8 actualTreeDepth, uint256 actualPreRoot, - VerifierLookupTable insertVerifiers, - VerifierLookupTable4844 insertVerifiers4844, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - ISemaphoreVerifier actualSemaphoreVerifier + VerifierLookupTable insertVer, + VerifierLookupTable4844 insertVer4844, + VerifierLookupTable deletionVer, + VerifierLookupTable updateVer, + ISemaphoreVerifier actualSemaphoreVer ) public { managerImplV1 = new ManagerImplV1(); managerImplV1Address = address(managerImplV1); @@ -295,9 +300,9 @@ contract WorldIDIdentityManagerTest is WorldIDTest { ( actualTreeDepth, actualPreRoot, - insertVerifiers, - updateVerifiers, - actualSemaphoreVerifier + insertVer, + updateVer, + actualSemaphoreVer ) ); @@ -308,7 +313,7 @@ contract WorldIDIdentityManagerTest is WorldIDTest { managerImplV2 = new ManagerImpl(); managerImplV2Address = address(managerImplV2); - bytes memory initCallV2 = abi.encodeCall(managerImplV2.initializeV2, (deletionVerifiers)); + bytes memory initCallV2 = abi.encodeCall(managerImplV2.initializeV2, (deletionVer)); bytes memory upgradeCallV2 = abi.encodeCall( UUPSUpgradeable.upgradeToAndCall, (address(managerImplV2Address), initCallV2) ); @@ -320,7 +325,7 @@ contract WorldIDIdentityManagerTest is WorldIDTest { managerImplV3 = new ManagerImplV3(); managerImplV3Address = address(managerImplV3); - bytes memory initCallV3 = abi.encodeCall(managerImplV3.initializeV3, (insertVerifiers4844)); + bytes memory initCallV3 = abi.encodeCall(managerImplV3.initializeV3, (insertVer4844)); bytes memory upgradeCallV3 = abi.encodeCall( UUPSUpgradeable.upgradeToAndCall, (address(managerImplV3Address), initCallV3) ); @@ -340,10 +345,10 @@ contract WorldIDIdentityManagerTest is WorldIDTest { /// @custom:reverts string If `batchSizes` is empty. function makeNewIdentityManager(uint256 actualPreRoot, uint256[] calldata batchSizes) public { ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, - VerifierLookupTable4844 insertVerifiers4844 + insertVerifiers, + deletionVerifiers, + updateVerifiers, + insertVerifiers4844 ) = makeVerifierLookupTables(batchSizes); defaultInsertVerifiers = insertVerifiers; defaultDeletionVerifiers = deletionVerifiers; @@ -377,9 +382,9 @@ contract WorldIDIdentityManagerTest is WorldIDTest { function makeVerifierLookupTables(uint256[] memory batchSizes) public returns ( - VerifierLookupTable insertVerifiers, - VerifierLookupTable deletionVerifiers, - VerifierLookupTable updateVerifiers, + VerifierLookupTable insertVerifiers, + VerifierLookupTable deletionVerifiers, + VerifierLookupTable updateVerifiers, VerifierLookupTable4844 insertVerifiers4844 ) { diff --git a/src/test/identity-manager/WorldIDIdentityManagerUninit.t.sol b/src/test/identity-manager/WorldIDIdentityManagerUninit.t.sol index 13b583b..e64927a 100644 --- a/src/test/identity-manager/WorldIDIdentityManagerUninit.t.sol +++ b/src/test/identity-manager/WorldIDIdentityManagerUninit.t.sol @@ -123,7 +123,7 @@ contract WorldIDIdentityManagerUninit is WorldIDIdentityManagerTest { function testShouldNotCallSetRegisterIdentitiesVerifierLookupTableWhileUninit() public { // Setup makeUninitIdentityManager(); - (VerifierLookupTable insertVerifiers,,,) = makeVerifierLookupTables(TC.makeDynArray([75])); + (insertVerifiers,,,) = makeVerifierLookupTables(TC.makeDynArray([75])); bytes memory callData = abi.encodeCall( ManagerImplV1.setRegisterIdentitiesVerifierLookupTable, (insertVerifiers) ); @@ -153,7 +153,7 @@ contract WorldIDIdentityManagerUninit is WorldIDIdentityManagerTest { function testShouldNotCallSetDeleteIdentitiesVerifierLookupTableWhileUninit() public { // Setup makeUninitIdentityManager(); - (,, VerifierLookupTable deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([75])); + (,, deletionVerifiers,) = makeVerifierLookupTables(TC.makeDynArray([75])); bytes memory callData = abi.encodeCall(ManagerImpl.setDeleteIdentitiesVerifierLookupTable, (deletionVerifiers)); bytes memory expectedError =