diff --git a/contracts/lib/GenesisUtils.sol b/contracts/lib/GenesisUtils.sol index 975cf262..0d0974f1 100644 --- a/contracts/lib/GenesisUtils.sol +++ b/contracts/lib/GenesisUtils.sol @@ -38,12 +38,9 @@ library GenesisUtils { ); bytes memory cutState = PrimitiveTypeUtils.slice(userStateB1, userStateB1.length - 27, 27); - bytes memory beforeChecksum = PrimitiveTypeUtils.concat(abi.encodePacked(idType), cutState); - require(beforeChecksum.length == 29, "Checksum requires 29 length array"); uint16 checksum = PrimitiveTypeUtils.reverseUint16(sum(beforeChecksum)); - bytes memory checkSumBytes = abi.encodePacked(checksum); bytes memory idBytes = PrimitiveTypeUtils.concat(beforeChecksum, checkSumBytes); diff --git a/contracts/package.json b/contracts/package.json index 80f6827e..cdc8fa62 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,7 +1,7 @@ { "name": "@iden3/contracts", "description": "Smart Contract library for Solidity", - "version": "2.1.0", + "version": "2.1.1", "files": [ "**/*.sol", "/build/contracts/*.json", diff --git a/contracts/state/State.sol b/contracts/state/State.sol index b534b2e5..a5016849 100644 --- a/contracts/state/State.sol +++ b/contracts/state/State.sol @@ -14,7 +14,7 @@ contract State is Ownable2StepUpgradeable, IState { /** * @dev Version of contract */ - string public constant VERSION = "2.4.0"; + string public constant VERSION = "2.4.1"; // This empty reserved space is put in place to allow future versions // of the State contract to inherit from other contracts without a risk of diff --git a/contracts/test-helpers/ValidatorStub.sol b/contracts/test-helpers/ValidatorStub.sol index f5bc65ae..0796ca82 100644 --- a/contracts/test-helpers/ValidatorStub.sol +++ b/contracts/test-helpers/ValidatorStub.sol @@ -8,7 +8,7 @@ import {ICircuitValidator} from "../interfaces/ICircuitValidator.sol"; * @dev ValidatorStub validator */ contract ValidatorStub is ICircuitValidator, ERC165 { - string public constant VERSION = "2.0.0-mock"; + string public constant VERSION = "2.0.1-mock"; string internal constant CIRCUIT_ID = "mock-stub"; diff --git a/contracts/validators/CredentialAtomicQueryMTPV2Validator.sol b/contracts/validators/CredentialAtomicQueryMTPV2Validator.sol index a99614aa..e83eccc8 100644 --- a/contracts/validators/CredentialAtomicQueryMTPV2Validator.sol +++ b/contracts/validators/CredentialAtomicQueryMTPV2Validator.sol @@ -9,7 +9,7 @@ contract CredentialAtomicQueryMTPV2Validator is CredentialAtomicQueryV2Validator /** * @dev Version of contract */ - string public constant VERSION = "2.0.2"; + string public constant VERSION = "2.0.3"; string internal constant CIRCUIT_ID = "credentialAtomicQueryMTPV2OnChain"; diff --git a/contracts/validators/CredentialAtomicQuerySigV2Validator.sol b/contracts/validators/CredentialAtomicQuerySigV2Validator.sol index 9debbc30..ae2bf64a 100644 --- a/contracts/validators/CredentialAtomicQuerySigV2Validator.sol +++ b/contracts/validators/CredentialAtomicQuerySigV2Validator.sol @@ -9,7 +9,7 @@ contract CredentialAtomicQuerySigV2Validator is CredentialAtomicQueryV2Validator /** * @dev Version of contract */ - string public constant VERSION = "2.0.2"; + string public constant VERSION = "2.0.3"; string internal constant CIRCUIT_ID = "credentialAtomicQuerySigV2OnChain"; diff --git a/contracts/validators/CredentialAtomicQueryV3Validator.sol b/contracts/validators/CredentialAtomicQueryV3Validator.sol index ac93ae9d..0db1a784 100644 --- a/contracts/validators/CredentialAtomicQueryV3Validator.sol +++ b/contracts/validators/CredentialAtomicQueryV3Validator.sol @@ -46,7 +46,7 @@ contract CredentialAtomicQueryV3Validator is CredentialAtomicQueryValidatorBase /** * @dev Version of contract */ - string public constant VERSION = "2.0.2-beta.1"; + string public constant VERSION = "2.0.3-beta.1"; string internal constant CIRCUIT_ID = "credentialAtomicQueryV3OnChain-beta.1"; diff --git a/contracts/verifiers/UniversalVerifier.sol b/contracts/verifiers/UniversalVerifier.sol index 0f288e32..f6fb6c6f 100644 --- a/contracts/verifiers/UniversalVerifier.sol +++ b/contracts/verifiers/UniversalVerifier.sol @@ -21,7 +21,7 @@ contract UniversalVerifier is /** * @dev Version of contract */ - string public constant VERSION = "1.0.1"; + string public constant VERSION = "1.0.2"; /// @dev Event emitted upon submitting a ZKP request event ZKPResponseSubmitted(uint64 indexed requestId, address indexed caller); diff --git a/test/verifier/embedded-zkp-verifier.test.ts b/test/verifier/embedded-zkp-verifier.test.ts index 24b8afe6..eaca7eb2 100644 --- a/test/verifier/embedded-zkp-verifier.test.ts +++ b/test/verifier/embedded-zkp-verifier.test.ts @@ -59,7 +59,7 @@ describe("Embedded ZKP Verifier", function () { expect(isProofVerified).to.be.equal(true); const proofStatus = await verifier.getProofStatus(ownerAddress, requestID); expect(proofStatus.isVerified).to.be.equal(true); - expect(proofStatus.validatorVersion).to.be.equal("2.0.0-mock"); + expect(proofStatus.validatorVersion).to.be.equal("2.0.1-mock"); expect(proofStatus.blockNumber).to.be.equal(txRes.blockNumber); expect(proofStatus.blockTimestamp).to.be.equal(txResTimestamp); }); diff --git a/test/verifier/universal-verifier.test.ts b/test/verifier/universal-verifier.test.ts index f8e22e8a..520e78f1 100644 --- a/test/verifier/universal-verifier.test.ts +++ b/test/verifier/universal-verifier.test.ts @@ -115,7 +115,7 @@ describe("Universal Verifier MTP & SIG validators", function () { const status = await verifier.getProofStatus(signerAddress, requestId); expect(status.isVerified).to.be.true; - expect(status.validatorVersion).to.be.equal("2.0.0-mock"); + expect(status.validatorVersion).to.be.equal("2.0.1-mock"); expect(status.blockNumber).to.be.equal(txRes.blockNumber); expect(status.blockTimestamp).to.be.equal(txResTimestamp);