8000 Bump validator versions and target deploy addresses by AndriianChestnykh · Pull Request #360 · iden3/contracts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bump validator versions and target deploy addresses #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract CredentialAtomicQueryMTPV2Validator is CredentialAtomicQueryV2Validator
/**
* @dev Version of contract
*/
string public constant VERSION = "2.1.1";
string public constant VERSION = "3.0.0";

string internal constant CIRCUIT_ID = "credentialAtomicQueryMTPV2OnChain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract CredentialAtomicQuerySigV2Validator is CredentialAtomicQueryV2Validator
/**
* @dev Version of contract
*/
string public constant VERSION = "2.1.1";
string public constant VERSION = "3.0.0";

string internal constant CIRCUIT_ID = "credentialAtomicQuerySigV2OnChain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ contract CredentialAtomicQueryV3Validator is CredentialAtomicQueryValidatorBase
/**
* @dev Version of contract
*/
string public constant VERSION = "2.1.1-beta.1";
string public constant VERSION = "3.0.0-beta.1";

string internal constant CIRCUIT_ID = "credentialAtomicQueryV3OnChain-beta.1";

Expand Down
20 changes: 10 additions & 10 deletions helpers/constants.ts
10000
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const contractsInfo = Object.freeze({
UNIVERSAL_VERIFIER: {
name: "UniversalVerifier",
version: "2.0.0",
unifiedAddress: "0xfcc86A79fCb057A8e55C6B853dff9479C3cf607c", // TODO: Recalculate new address
unifiedAddress: "0x2B0D3f664A5EbbfBD76E6cbc2cA9A504a68d2F4F",
create2Calldata: ethers.hexlify(ethers.toUtf8Bytes("iden3.create2.UniversalVerifier.v2")),
verificationOpts: {
// For verifying the different contracts with proxy we need verification with different constructor arguments
Expand Down Expand Up @@ -141,10 +141,10 @@ export const contractsInfo = Object.freeze({
},
VALIDATOR_SIG: {
name: "CredentialAtomicQuerySigV2Validator",
version: "2.1.1",
unifiedAddress: "0x59B347f0D3dd4B98cc2E056Ee6C53ABF14F8581b",
version: "3.0.0",
unifiedAddress: "0x5BD60F3Ef5890260906172EEe1f0a965707791f1",
create2Calldata: ethers.hexlify(
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQuerySigV2Validator"),
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQuerySigV2Validator.v3"),
),
verificationOpts: {
constructorArgsImplementation: [],
Expand All @@ -159,10 +159,10 @@ export const contractsInfo = Object.freeze({
},
VALIDATOR_MTP: {
name: "CredentialAtomicQueryMTPV2Validator",
version: "2.1.1",
unifiedAddress: "0x27bDFFCeC5478a648f89764E22fE415486A42Ede",
version: "3.0.0",
unifiedAddress: "0xec9EF9c4595B46abF2b6A923BD1529081E03fbBB",
create2Calldata: ethers.hexlify(
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQueryMTPV2Validator"),
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQueryMTPV2Validator.v3"),
),
verificationOpts: {
constructorArgsImplementation: [],
Expand All @@ -177,10 +177,10 @@ export const contractsInfo = Object.freeze({
},
VALIDATOR_V3: {
name: "CredentialAtomicQueryV3Validator",
version: "2.1.1-beta.1",
unifiedAddress: "0xd179f29d00Cd0E8978eb6eB847CaCF9E2A956336",
version: "3.0.0-beta.1",
unifiedAddress: "0xC616963610A5545EF89b373e1fEAE8A1e505FaFF",
create2Calldata: ethers.hexlify(
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQueryV3Validator"),
ethers.toUtf8Bytes("iden3.create2.CredentialAtomicQueryV3Validator.v3"),
),
verificationOpts: {
constructorArgsImplementation: [],
Expand Down
6 changes: 6 additions & 0 deletions test/check-unified-addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const GeneralProxyModule = buildModule("GeneralProxyModule", (m) => {

it("Calculate and check unified addresses for proxy contracts", async () => {
await ignition.deploy(Create2AddressAnchorModule, { strategy: "create2" });
let isCheckSuccess = true;

for (const property in contractsInfo) {
if (contractsInfo[property].create2Calldata !== "") {
Expand All @@ -63,11 +64,16 @@ it("Calculate and check unified addresses for proxy contracts", async () => {
Logger.error(
`${contractsInfo[property].name} deployed with unified address: ${await proxyDeployed.getAddress()} (expected: ${contractsInfo[property].unifiedAddress})`,
);
isCheckSuccess = false;
} else {
Logger.success(
`${contractsInfo[property].name} deployed with unified address: ${await proxyDeployed.getAddress()}`,
);
}
}
}

if (!isCheckSuccess) {
throw new Error("Unified address check failed");
}
});
Loading
0