From 38d9a4b96b75ce436157c31732bb759d3029f886 Mon Sep 17 00:00:00 2001 From: Sora Suegami <31360991+SoraSuegami@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:39:44 +0900 Subject: [PATCH] Feat/audit fix 2024 08 (#58) * Audit fixes for circuits * Update verifier for the new circuit * Fix maskedSubject attack vector and timestamp bug * Allow lower/uppercases address in the subject * Fix typo. * Add test case to check "invalid masked subject length" and "invalid size of the skipped subject prefix". * Add range check to Digit2Int * Add comments about an email address in the subject. * Update snarkjs version * Add idx validations to the circuit * Change range of LessThan * Update zk-email circuit version * Optimize regex_out in the circuit * Fix lastTimestamp update logic * Fix commented out codes * feat: update api * Fix inactive_guardian api * Fix inactive_guardian * fix: patch db query * Add python logger * Revert "Add python logger" This reverts commit 92be537438ef900449aa561a02e8d4309c128c31. * Logger in the prover worked (#54) * Update prover version * Logger in the prover worked * Update dependencies * Fix the versions of circuit dependencies * Fix relayer-utils version * Update verifier * Update proving key * Fix integration test on base sepolia * feat: update api * Update prover address. * Fix requirements * feat: update api * Feature/update deployment logic using factory (#52) * Add ZKSyncCreate2Factory, EmailAccountRecovery test casees split by function. * Failed: update integration testing with foundry-zksync. * Update integration testing command with foundry-zksync. * Failed: update integration testing with foundry. * Add DeployEmailAuthWithCreate2.s.sol. * Disable DeployEmailAuthWIthCreate2.s.sol. * Fix integration test for foundry * Fail: integration testing for foundry zksync. * Fix integration testing for foundry zksync * Tweak README.md * Add EmailAccountRecoveryZkSync * Uncomment some contracts which are used for foundry zksync * make deployEmailAuthProxy as internal function * Update yarn build, yarn test * Remove specific foundry version * Update foundry version * chore: git rm --cached * chore: Update after git rm --cached * chore: git rm --cached * chore: Update after git rm --cached * Fix build-test-fmt on github action * Rename DeployEmailAuthWIthCreate2 * Update deployment files in docs --------- Co-authored-by: wshino Co-authored-by: Aditya Bisht --- .github/workflows/build-test-fmt.yml | 4 +- .github/workflows/unit-tests.yml | 2 +- .gitignore | 1 + docs/getting-started.md | 7 - packages/circuits/README.md | 2 + packages/circuits/package.json | 8 +- .../circuits/src/email_auth_template.circom | 32 +- .../src/regexes/invitation_code_regex.circom | 16 +- .../invitation_code_with_prefix_regex.circom | 23 +- packages/circuits/src/utils/digit2int.circom | 7 + packages/circuits/src/utils/hash_sign.circom | 2 +- packages/circuits/tests/email_auth.test.ts | 79 ++ .../circuits/tests/recipient_enabled.test.ts | 18 + packages/contracts/README.md | 112 +- packages/contracts/foundry.toml | 5 +- packages/contracts/package.json | 8 +- packages/contracts/script/ChangeOwners.s.sol | 1 + .../DeployEmailAuthWithCreate2ZKSync.s.sol | 56 + .../DeployRecoveryControllerZKSync.s.sol | 164 +++ .../contracts/src/EmailAccountRecovery.sol | 120 +- .../src/EmailAccountRecoveryZKSync.sol | 81 ++ packages/contracts/src/EmailAuth.sol | 36 +- .../contracts/src/libraries/SubjectUtils.sol | 33 +- .../contracts/src/utils/Groth16Verifier.sol | 283 ++--- .../src/utils/ZKSyncCreate2Factory.sol | 29 + .../src/utils/ZKSyncCreate2FactoryBase.sol | 16 + .../test/ComputeCreate2Address.t.sol | 93 -- .../test/ComputeCreate2AddressZKSync.t.sol | 44 + ...tRecovery_acceptanceSubjectTemplates.t.sol | 30 + ...mailAccountRecovery_completeRecovery.t.sol | 237 ++++ ...mailAccountRecovery_handleAcceptance.t.sol | 218 ++++ ...EmailAccountRecovery_handleRecovery.t.sol} | 402 +----- ...untRecovery_recoverySubjectTemplates.t.sol | 33 + ...EmailAccountRecovery_rejectRecovery.t.sol} | 161 +-- ...EmailAccountRecovery_requestGuardian.t.sol | 88 ++ .../EmailAccountRecovery_transfer.t.sol | 68 + .../EmailAccountRecovery_withdraw.t.sol | 67 + ...countRecoveryZKSync_completeRecovery.t.sol | 235 ++++ ...countRecoveryZKSync_handleAcceptance.t.sol | 218 ++++ ...AccountRecoveryZKSync_handleRecovery.t.sol | 433 +++++++ ...AccountRecoveryZKSync_rejectRecovery.t.sol | 265 ++++ ...ccountRecoveryZKSync_requestGuardian.t.sol | 88 ++ .../EmailAccountRecoveryZKSync_transfer.t.sol | 68 + .../EmailAccountRecoveryZKSync_withdraw.t.sol | 67 + ...eryZkSync_acceptanceSubjectTemplates.t.sol | 30 + ...overyZkSync_recoverySubjectTemplates.t.sol | 33 + packages/contracts/test/EmailAuth.t.sol | 42 + packages/contracts/test/Integration.t.sol | 51 +- .../contracts/test/IntegrationZKSync.t.sol | 377 ++++++ packages/contracts/test/emails/300/accept.eml | 104 +- .../contracts/test/emails/300/recovery.eml | 104 +- .../contracts/test/emails/8453/accept.eml | 104 +- .../contracts/test/emails/8453/recovery.eml | 105 +- .../test/helpers/DeploymentHelper.sol | 79 +- .../test/helpers/RecoveryControllerZKSync.sol | 191 +++ .../contracts/test/script/ChangeOwners.t.sol | 7 +- ...ChangeSignerInECDSAOwnedDKIMRegistry.t.sol | 7 +- .../ChangeSourceInForwardDKIMRegistry.t.sol | 7 +- .../contracts/test/script/DeployCommons.t.sol | 7 +- .../script/DeployRecoveryController.t.sol | 8 +- .../test/script/DeploySimpleWallet.t.sol | 12 +- .../test/script/RenounceOwners.t.sol | 7 +- packages/contracts/test/script/Upgrades.t.sol | 7 +- packages/prover/Dockerfile | 2 +- packages/prover/local_setup.sh | 2 +- packages/prover/modal_server.py | 2 +- .../src/abis/email_account_recovery.rs | 44 + yarn.lock | 1119 ++++++++--------- 68 files changed, 4596 insertions(+), 1815 deletions(-) create mode 100644 packages/contracts/script/DeployEmailAuthWithCreate2ZKSync.s.sol create mode 100644 packages/contracts/script/DeployRecoveryControllerZKSync.s.sol create mode 100644 packages/contracts/src/EmailAccountRecoveryZKSync.sol create mode 100644 packages/contracts/src/utils/ZKSyncCreate2Factory.sol create mode 100644 packages/contracts/src/utils/ZKSyncCreate2FactoryBase.sol delete mode 100644 packages/contracts/test/ComputeCreate2Address.t.sol create mode 100644 packages/contracts/test/ComputeCreate2AddressZKSync.t.sol create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_acceptanceSubjectTemplates.t.sol create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_completeRecovery.t.sol create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleAcceptance.t.sol rename packages/contracts/test/{EmailAccountRecovery.t.sol => EmailAccountRecovery/EmailAccountRecovery_handleRecovery.t.sol} (54%) create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_recoverySubjectTemplates.t.sol rename packages/contracts/test/{EmailAccountRecoveryForRejectRecovery.t.sol => EmailAccountRecovery/EmailAccountRecovery_rejectRecovery.t.sol} (63%) create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_requestGuardian.t.sol create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_transfer.t.sol create mode 100644 packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_withdraw.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_completeRecovery.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleAcceptance.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleRecovery.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_rejectRecovery.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_requestGuardian.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_transfer.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_withdraw.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_acceptanceSubjectTemplates.t.sol create mode 100644 packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_recoverySubjectTemplates.t.sol create mode 100644 packages/contracts/test/IntegrationZKSync.t.sol create mode 100644 packages/contracts/test/helpers/RecoveryControllerZKSync.sol diff --git a/.github/workflows/build-test-fmt.yml b/.github/workflows/build-test-fmt.yml index e36b588..17f9435 100644 --- a/.github/workflows/build-test-fmt.yml +++ b/.github/workflows/build-test-fmt.yml @@ -26,11 +26,11 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: - version: nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970 + version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b - name: Run tests working-directory: packages/contracts - run: forge build + run: yarn build - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index fe42c3c..29740de 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -57,7 +57,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1.2.0 with: - version: nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970 + version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b - name: Run tests working-directory: packages/contracts diff --git a/.gitignore b/.gitignore index e07a445..0ee936e 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ book # For zksync zkout +.cache diff --git a/docs/getting-started.md b/docs/getting-started.md index 2d145a4..b1c1833 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -10,13 +10,6 @@ First, install foundry by running the following command: curl -L https://foundry.paradigm.xyz | bash ``` -Then, install the specific version of foundry by running the following command: -Note: The latest version of foundry fails some tests. - -```sh -foundryup -v nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970 -``` - ## Clone the repository ```sh diff --git a/packages/circuits/README.md b/packages/circuits/README.md index 934b2d7..74f58d1 100644 --- a/packages/circuits/README.md +++ b/packages/circuits/README.md @@ -61,3 +61,5 @@ The `email_auth.circom` makes constraints and computes the public output as foll 13. If `is_code_exist` is 1, assert that `embedded_code` is equal to `account_code`. 14. Let `account_salt` be `PoseidonHash(from_addr|0..0, account_code, 0)`. 15. Let `masked_subject` be a string that removes `code_str`, the prefix of the invitation code, and one email address from `subject`, if they appear in `subject`. + +Note that the email address in the subject is assumbed not to overlap with the invitation code. \ No newline at end of file diff --git a/packages/circuits/package.json b/packages/circuits/package.json index 6cb8ec4..99f7d7f 100644 --- a/packages/circuits/package.json +++ b/packages/circuits/package.json @@ -10,11 +10,11 @@ "test": "NODE_OPTIONS=--max_old_space_size=8192 jest" }, "dependencies": { - "@zk-email/circuits": "^6.1.1", - "@zk-email/zk-regex-circom": "^2.1.0", - "@zk-email/relayer-utils": "^0.2.4", + "@zk-email/circuits": "=6.1.5", + "@zk-email/relayer-utils": "=0.2.4", + "@zk-email/zk-regex-circom": "=2.1.1", "commander": "^11.0.0", - "snarkjs": "^0.7.0" + "snarkjs": "^0.7.4" }, "devDependencies": { "@babel/preset-env": "^7.22.20", diff --git a/packages/circuits/src/email_auth_template.circom b/packages/circuits/src/email_auth_template.circom index 1e61deb..13069d8 100644 --- a/packages/circuits/src/email_auth_template.circom +++ b/packages/circuits/src/email_auth_template.circom @@ -5,6 +5,7 @@ include "circomlib/circuits/comparators.circom"; include "circomlib/circuits/poseidon.circom"; include "@zk-email/circuits/email-verifier.circom"; include "@zk-email/circuits/utils/regex.circom"; +include "@zk-email/circuits/utils/functions.circom"; include "./utils/constants.circom"; include "./utils/account_salt.circom"; include "./utils/hash_sign.circom"; @@ -63,7 +64,7 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal output is_code_exist; // Verify Email Signature - component email_verifier = EmailVerifier(max_header_bytes, 0, n, k, 1); + component email_verifier = EmailVerifier(max_header_bytes, 0, n, k, 1, 0, 0); email_verifier.emailHeader <== padded_header; email_verifier.pubkey <== public_key; email_verifier.signature <== signature; @@ -75,6 +76,8 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal from_regex_out, from_regex_reveal[max_header_bytes]; (from_regex_out, from_regex_reveal) <== FromAddrRegex(max_header_bytes)(padded_header); from_regex_out === 1; + signal is_valid_from_addr_idx <== LessThan(log2Ceil(max_header_bytes))([from_addr_idx, max_header_bytes]); + is_valid_from_addr_idx === 1; signal from_email_addr[email_max_bytes]; from_email_addr <== SelectRegexReveal(max_header_bytes, email_max_bytes)(from_regex_reveal, from_addr_idx); @@ -82,10 +85,13 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal domain_regex_out, domain_regex_reveal[email_max_bytes]; (domain_regex_out, domain_regex_reveal) <== EmailDomainRegex(email_max_bytes)(from_email_addr); domain_regex_out === 1; + signal is_valid_domain_idx <== LessThan(log2Ceil(email_max_bytes))([domain_idx, email_max_bytes]); + is_valid_domain_idx === 1; signal domain_name_bytes[domain_len]; domain_name_bytes <== SelectRegexReveal(email_max_bytes, domain_len)(domain_regex_reveal, domain_idx); domain_name <== Bytes2Ints(domain_len)(domain_name_bytes); + /// EMAIL NULLIFIER signal sign_hash; signal sign_ints[k2_chunked_size]; (sign_hash, sign_ints) <== HashSign(n,k)(signature); @@ -96,28 +102,35 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) signal subject_regex_out, subject_regex_reveal[max_header_bytes]; (subject_regex_out, subject_regex_reveal) <== SubjectAllRegex(max_header_bytes)(padded_header); subject_regex_out === 1; + signal is_valid_subject_idx <== LessThan(log2Ceil(max_header_bytes))([subject_idx, max_header_bytes]); + is_valid_subject_idx === 1; signal subject_all[max_subject_bytes]; subject_all <== SelectRegexReveal(max_header_bytes, max_subject_bytes)(subject_regex_reveal, subject_idx); // Timestamp regex + convert to decimal format signal timestamp_regex_out, timestamp_regex_reveal[max_header_bytes]; (timestamp_regex_out, timestamp_regex_reveal) <== TimestampRegex(max_header_bytes)(padded_header); - // timestamp_regex_out === 1; + signal is_valid_timestamp_idx <== LessThan(log2Ceil(max_header_bytes))([timestamp_idx, max_header_bytes]); + is_valid_timestamp_idx === 1; signal timestamp_str[timestamp_len]; timestamp_str <== SelectRegexReveal(max_header_bytes, timestamp_len)(timestamp_regex_reveal, timestamp_idx); signal raw_timestamp <== Digit2Int(timestamp_len)(timestamp_str); timestamp <== timestamp_regex_out * raw_timestamp; + /// MASKED SUBJECT + /// INVITATION CODE WITH PREFIX REGEX signal prefixed_code_regex_out, prefixed_code_regex_reveal[max_subject_bytes]; (prefixed_code_regex_out, prefixed_code_regex_reveal) <== InvitationCodeWithPrefixRegex(max_subject_bytes)(subject_all); - is_code_exist <== IsZero()(prefixed_code_regex_out-1); + is_code_exist <== prefixed_code_regex_out; signal removed_code[max_subject_bytes]; for(var i = 0; i < max_subject_bytes; i++) { removed_code[i] <== is_code_exist * prefixed_code_regex_reveal[i]; } + /// EMAIL ADDRESS REGEX + /// Note: the email address in the subject should not overlap with the invitation code signal subject_email_addr_regex_out, subject_email_addr_regex_reveal[max_subject_bytes]; (subject_email_addr_regex_out, subject_email_addr_regex_reveal) <== EmailAddrRegex(max_subject_bytes)(subject_all); - signal is_subject_email_addr_exist <== IsZero()(subject_email_addr_regex_out-1); + signal is_subject_email_addr_exist <== subject_email_addr_regex_out; signal removed_subject_email_addr[max_subject_bytes]; for(var i = 0; i < max_subject_bytes; i++) { removed_subject_email_addr[i] <== is_subject_email_addr_exist * subject_email_addr_regex_reveal[i]; @@ -131,8 +144,7 @@ template EmailAuth(n, k, max_header_bytes, max_subject_bytes, recipient_enabled) // INVITATION CODE REGEX signal code_regex_out, code_regex_reveal[max_header_bytes]; (code_regex_out, code_regex_reveal) <== InvitationCodeRegex(max_header_bytes)(padded_header); - signal code_consistency <== IsZero()(is_code_exist * (1 - code_regex_out)); - code_consistency === 1; + is_code_exist * (1 - code_regex_out) === 0; signal replaced_code_regex_reveal[max_header_bytes]; for(var i=0; i { } await expect(failFn).rejects.toThrow(); }); + + + it("Verify a sent email with a too large from_addr_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.from_addr_idx = 1024; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); + + it("Verify a sent email with a too large domain_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.domain_idx = 256; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); + + it("Verify a sent email with a too large subject_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.subject_idx = 1024; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); + + it("Verify a sent email with a too large timestamp_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.timestamp_idx = 1024; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); + + it("Verify a sent email with a too large code_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.code_idx = 1024; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); + + it("Verify a sent email with a too large code_idx 2", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const circuitInputs = await genEmailAuthInput(emailFilePath, accountCode); + circuitInputs.code_idx = 1024 * 4; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); }); diff --git a/packages/circuits/tests/recipient_enabled.test.ts b/packages/circuits/tests/recipient_enabled.test.ts index fa6a2c8..d38fe35 100644 --- a/packages/circuits/tests/recipient_enabled.test.ts +++ b/packages/circuits/tests/recipient_enabled.test.ts @@ -271,4 +271,22 @@ describe("Email Auth", () => { witness[1 + domainFields.length + 3 + maskedSubjectFields.length + 3] ); }); + + it("Verify a sent email with a too large subject_email_addr_idx", async () => { + const emailFilePath = path.join(__dirname, "./emails/email_auth_test1.eml"); + const accountCode = + "0x01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; + const emailAuthInput = await genEmailAuthInput(emailFilePath, accountCode); + const recipientInput = await genRecipientInput(emailFilePath); + const circuitInputs = { + ...emailAuthInput, + subject_email_addr_idx: recipientInput.subject_email_addr_idx, + }; + circuitInputs.subject_email_addr_idx = 605; + async function failFn() { + const witness = await circuit.calculateWitness(circuitInputs); + await circuit.checkConstraints(witness); + } + await expect(failFn).rejects.toThrow(); + }); }); diff --git a/packages/contracts/README.md b/packages/contracts/README.md index ddf54f2..406c600 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -25,14 +25,14 @@ $ yarn test Run integration tests Before running integration tests, you need to make a `packages/contracts/test/build_integration` directory, download the zip file from the following link, and place its unzipped directory under that directory. -https://drive.google.com/file/d/1TChinAnHr9eV8H_OV9SVReF8Rvu6h1XH/view?usp=sharing +https://drive.google.com/file/d/1Ybtxe1TCVUtHzCPUs9cuZAGbM-MVwigE/view?usp=drive_link Then, move `email_auth.zkey` and `email_auth.wasm` in the unzipped directory `params` to `build_integration`. Run each integration tests **one by one** as each test will consume lot of memory. ```bash -Eg: forge test --match-test 'testIntegration_Account_Recovery' -vvv --chain 8453 --ffi +Eg: contracts % forge test --skip '*ZKSync*' --match-contract "IntegrationTest" -vvv --chain 8453 --ffi ``` #### Deploy Common Contracts. You need to deploy common contracts, i.e., `ECDSAOwnedDKIMRegistry`, `Verifier`, and implementations of `EmailAuth` and `SimpleWallet`, only once before deploying each wallet. @@ -42,9 +42,9 @@ You need to deploy common contracts, i.e., `ECDSAOwnedDKIMRegistry`, `Verifier`, 4. `forge script script/DeployCommons.s.sol:Deploy --rpc-url $RPC_URL --chain-id $CHAIN_ID --etherscan-api-key $ETHERSCAN_API_KEY --broadcast --verify -vvvv` #### Deploy Each Wallet. -After deploying common contracts, you can deploy a proxy contract of `SimpleWallet`, which is an example contract supporting our email-based account recovery. +After deploying common contracts, you can deploy a proxy contract of `SimpleWallet`, which is an example contract supporting our email-based account recovery by `RecoveryController`. 1. Check that the env values of `DKIM`, `VERIFIER`, `EMAIL_AUTH_IMPL`, and `SIMPLE_WALLET_IMPL` are the same as those output by the `DeployCommons.s.sol` script. -2. `forge script script/DeploySimpleWallet.s.sol:Deploy --rpc-url $RPC_URL --chain-id $CHAIN_ID --broadcast -vvvv` +2. `forge script script/DeployRecoveryController.s.sol:Deploy --rpc-url $RPC_URL --chain-id $CHAIN_ID --broadcast -vvvv` ## Specification There are four main contracts that developers should understand: `IDKIMRegistry`, `Verifier`, `EmailAuth` and `EmailAccountRecovery`. @@ -251,62 +251,40 @@ Next, you should uncomment the following lines in `foundry.toml`. # via-ir = true ``` -And then you should uncomment the following lines in `src/EmailAccountRecovery.sol`. +Partial comment-out files can be found the following. Please uncomment them. +(Uncomment from `FOR_ZKSYNC:START` to `FOR_ZKSYNC:END`) -``` -// import {SystemContractsCaller} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; -// import {DEPLOYER_SYSTEM_CONTRACT} from "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; -``` - -And lines 229 - 263 in the `handleAcceptance` function too. +- src/utils/ZKSyncCreate2Factory.sol +- test/helpers/DeploymentHelper.sol -At the first forge build, you got the following warning like the following. +At the first forge build, you need to detect the missing libraries. ``` -┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Warning: Your code or one of its dependencies uses the 'extcodesize' instruction, which is │ -│ usually needed in the following cases: │ -│ 1. To detect whether an address belongs to a smart contract. │ -│ 2. To detect whether the deploy code execution has finished. │ -│ zkSync Era comes with native account abstraction support (so accounts are smart contracts, │ -│ including private-key controlled EOAs), and you should avoid differentiating between contracts │ -│ and non-contract addresses. │ -└──────────────────────────────────────────────────────────────────────────────────────────────────┘ ---> ../../node_modules/forge-std/src/StdCheats.sol - -Failed to compile with zksolc: Missing libraries detected [ZkMissingLibrary { contract_name: "SubjectUtils", contract_path: "src/libraries/SubjectUtils.sol", missing_libraries: ["src/libraries/DecimalUtils.sol:DecimalUtils"] }, ZkMissingLibrary { contract_name: "DecimalUtils", contract_path: "src/libraries/DecimalUtils.sol", missing_libraries: [] }] +forge build --zksync --zk-detect-missing-libraries ``` -Please run the following command in order to deploy the missing libraries: +As you saw before, you need to deploy missing libraries. +You can deploy them by the following command for example. ``` -forge create --deploy-missing-libraries --private-key --rpc-url --chain --zksync -forge create --deploy-missing-libraries --private-key {YOUR_PRIVATE_KEY} --rpc-url https://sepolia.era.zksync.dev --chain 300 --zksync +$ forge build --zksync --zk-detect-missing-libraries +Missing libraries detected: src/libraries/SubjectUtils.sol:SubjectUtils, src/libraries/DecimalUtils.sol:DecimalUtils ``` -The above command output the following(for example): +Run the following command in order to deploy each missing library: ``` -[⠊] Compiling... -No files changed, compilation skipped -Deployer: 0xfB1CcCBDa2C41a77cDAC448641006Fc7fcf1f3b9 -Deployed to: 0x91cc0f0A227b8dD56794f9391E8Af48B40420A0b -Transaction hash: 0x4f94ab71443d01988105540c3abb09ed66f8af5d0bb6a88691e2dafa88b3583d -[⠢] Compiling... -[⠃] Compiling 68 files with 0.8.26 -[⠆] Solc 0.8.26 finished in 12.20s -Compiler run successful! -Deployer: 0xfB1CcCBDa2C41a77cDAC448641006Fc7fcf1f3b9 -Deployed to: 0x981E3Df952358A57753C7B85dE7949Da4aBCf54A -Transaction hash: 0xfdca7b9eb3ae933ca123111489572427ee95eb6be74978b24c73fe74cb4988d7 +forge create src/libraries/DecimalUtils.sol:DecimalUtils --private-key {YOUR_PRIVATE_KEY} --rpc-url https://sepolia.era.zksync.dev --chain 300 --zksync +forge create src/libraries/SubjectUtils.sol:SubjectUtils --private-key {YOUR_PRIVATE_KEY} --rpc-url https://sepolia.era.zksync.dev --chain 300 --zksync --libraries src/libraries/DecimalUtils.sol:DecimalUtils:{DECIMAL_UTILS_DEPLOYED_ADDRESS} ``` After that, you can see the following line in foundry.toml. Also, this line is needed only for foundry-zksync, if you use foundry, please remove this line. Otherwise, the test will fail. ``` -libraries = ["{PROJECT_DIR}/packages/contracts/src/libraries/DecimalUtils.sol:DecimalUtils:{DEPLOYED_ADDRESS}", "{PROJECT_DIR}/packages/contracts/src/libraries/SubjectUtils.sol:SubjectUtils:{DEPLOYED_ADDRESS}"] - +libraries = [ + "{PROJECT_DIR}/packages/contracts/src/libraries/DecimalUtils.sol:DecimalUtils:{DEPLOYED_ADDRESS}", + "{PROJECT_DIR}/packages/contracts/src/libraries/SubjectUtils.sol:SubjectUtils:{DEPLOYED_ADDRESS}"] ``` Incidentally, the above line already exists in `foundy.toml` with it commented out, if you uncomment it by replacing `{PROJECT_DIR}` with the appropriate path, it will also work. @@ -336,7 +314,7 @@ https://github.com/matter-labs/foundry-zksync/issues/382 Failing test cases are here. -EmailAuthWithUserOverrideableDkim.t.sol +DKIMRegistryUpgrade.t.sol - testAuthEmail() @@ -348,25 +326,47 @@ EmailAuth.t.sol - testExpectRevertAuthEmailInvalidSubject() - testExpectRevertAuthEmailInvalidTimestamp() -DeployCommons.t.sol +EmailAuthWithUserOverrideableDkim.t.sol + +- testAuthEmail() -- test_run() +# For integration testing -DeployRecoveryController.t.sol +To pass the instegration testing, you should use era-test-node. +See the following URL and install it. +https://github.com/matter-labs/era-test-node -- test_run() +Run the era-test-node -DeploySimpleWallet.t.sol +``` +era_test_node fork https://sepolia.era.zksync.dev +``` -- test_run() -- test_run_no_dkim() -- test_run_no_email_auth() -- test_run_no_simple_wallet() -- test_run_no_verifier() +You remove .zksolc-libraries-cache directory, and run the following command. -# For integration testing +``` +forge build --zksync --zk-detect-missing-libraries +``` + +As you saw before, you need to deploy missing libraries. +You can deploy them by the following command for example. + +``` +Missing libraries detected: src/libraries/SubjectUtils.sol:SubjectUtils, src/libraries/DecimalUtils.sol:DecimalUtils + +Run the following command in order to deploy each missing library: -forge test --match-test 'testIntegration_Account_Recovery' --zksync --chain 300 -vvv --ffi +forge create src/libraries/DecimalUtils.sol:DecimalUtils --private-key {YOUR_PRIVATE_KEY} --rpc-url http://127.0.0.1:8011 --chain 260 --zksync +forge create src/libraries/SubjectUtils.sol:SubjectUtils --private-key {YOUR_PRIVATE_KEY} --rpc-url http://127.0.0.1:8011 --chain 260 --zksync --libraries src/libraries/DecimalUtils.sol:DecimalUtils:{DECIMAL_UTILS_DEPLOYED_ADDRESS} +``` + +Set the libraries in foundry.toml using the above deployed address. + +And then, run the integration testing. + +``` +forge test --match-contract "IntegrationZkSyncTest" --system-mode=true --zksync --gas-limit 1000000000 --chain 300 -vvv --ffi +``` # For zkSync deployment (For test net) @@ -375,6 +375,6 @@ Second just run the following commands with `--zksync` ``` source .env -forge script script/DeployCommons.s.sol:Deploy --zksync --rpc-url $SEPOLIA_RPC_URL --broadcast -vvvv +forge script script/DeployRecoveryControllerZKSync.s.sol:Deploy --zksync --rpc-url $RPC_URL --broadcast --slow --via-ir --system-mode true -vvvv ``` diff --git a/packages/contracts/foundry.toml b/packages/contracts/foundry.toml index 5c54641..7ff2e1a 100644 --- a/packages/contracts/foundry.toml +++ b/packages/contracts/foundry.toml @@ -22,7 +22,10 @@ build_info = true extra_output = ["storageLayout"] # For missing libraries, please comment out this if you use foundry-zksync -#libraries = ["{PROJECT_DIR}/packages/contracts/src/libraries/DecimalUtils.sol:DecimalUtils:0x91cc0f0a227b8dd56794f9391e8af48b40420a0b", "{PROJECT_DIR}/packages/contracts/src/libraries/SubjectUtils.sol:SubjectUtils:0x981e3df952358a57753c7b85de7949da4abcf54a"] +#libraries = [ +# "{PROJECT_DIR}/packages/contracts/src/libraries/DecimalUtils.sol:DecimalUtils:0x91cc0f0a227b8dd56794f9391e8af48b40420a0b", +# "{PROJECT_DIR}/packages/contracts/src/libraries/SubjectUtils.sol:SubjectUtils:0x981e3df952358a57753c7b85de7949da4abcf54a" +#] [rpc_endpoints] localhost = "${LOCALHOST_RPC_URL}" diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 0f53be8..8893e58 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -3,16 +3,16 @@ "version": "1.0.0", "license": "MIT", "scripts": { - "build": "forge build", + "build": "forge build --skip '*ZKSync*'", "zkbuild": "forge build --zksync", - "test": "forge test --no-match-test \"testIntegration\"", - "zktest": "forge test --no-match-test \"testIntegration\" --zksync --chain 300", + "test": "forge test --no-match-test \"testIntegration\" --skip '*ZKSync*'", + "zktest": "forge test --no-match-test \"testIntegration\" --system-mode=true --zksync --gas-limit 1000000000 --chain 300", "lint": "solhint 'src/**/*.sol'" }, "dependencies": { "@openzeppelin/contracts": "^5.0.0", "@openzeppelin/contracts-upgradeable": "^5.0.0", - "@zk-email/contracts": "^6.1.2", + "@zk-email/contracts": "^6.1.5", "@matterlabs/zksync-contracts": "^0.6.1", "solady": "^0.0.123" }, diff --git a/packages/contracts/script/ChangeOwners.s.sol b/packages/contracts/script/ChangeOwners.s.sol index 2507fab..8f7bd0e 100644 --- a/packages/contracts/script/ChangeOwners.s.sol +++ b/packages/contracts/script/ChangeOwners.s.sol @@ -10,6 +10,7 @@ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Own contract ChangeOwners is Script { function run() external { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); if (deployerPrivateKey == 0) { console.log("PRIVATE_KEY env var not set"); diff --git a/packages/contracts/script/DeployEmailAuthWithCreate2ZKSync.s.sol b/packages/contracts/script/DeployEmailAuthWithCreate2ZKSync.s.sol new file mode 100644 index 0000000..5997291 --- /dev/null +++ b/packages/contracts/script/DeployEmailAuthWithCreate2ZKSync.s.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Script.sol"; + +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import "../src/EmailAuth.sol"; +import {ZKSyncCreate2Factory} from "../src/utils/ZKSyncCreate2Factory.sol"; + +contract Deploy is Script { + using ECDSA for *; + + function run() external { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + if (deployerPrivateKey == 0) { + console.log("PRIVATE_KEY env var not set"); + return; + } + + vm.startBroadcast(deployerPrivateKey); + + EmailAuth emailAuth = new EmailAuth(); + + address recoveredAccount = address(0x1); + bytes32 accountSalt = 0x0; + + ERC1967Proxy proxy = new ERC1967Proxy( + address(emailAuth), + abi.encodeCall(emailAuth.initialize, (recoveredAccount, accountSalt, address(this))) + ); + console.log("normal deployed proxyAddress %s", address(proxy)); + + ZKSyncCreate2Factory factory = new ZKSyncCreate2Factory(); + string memory artifact = vm.readFile("zkout/ERC1967Proxy.sol/ERC1967Proxy.json"); + bytes32 bytecodeHash = vm.parseJsonBytes32(artifact, ".hash"); + console.log("bytecodeHash"); + console.logBytes32(bytes32(bytecodeHash)); + + bytes memory emailAuthInit = abi.encode( + address(emailAuth), abi.encodeCall(EmailAuth.initialize, (recoveredAccount, accountSalt, address(this))) + ); + + address computedAddress = factory.computeAddress(accountSalt, bytecodeHash, emailAuthInit); + console.log("computedAddress", computedAddress); + + (bool success, bytes memory returnData) = factory.deploy(accountSalt, bytecodeHash, emailAuthInit); + + address payable proxyAddress = abi.decode(returnData, (address)); + console.log("proxyAddress %s", proxyAddress); + + EmailAuth emailAuthProxy = EmailAuth(proxyAddress); + console.log("emailAuthProxy.controller() %s", emailAuthProxy.controller()); + vm.stopBroadcast(); + } +} diff --git a/packages/contracts/script/DeployRecoveryControllerZKSync.s.sol b/packages/contracts/script/DeployRecoveryControllerZKSync.s.sol new file mode 100644 index 0000000..6767cc5 --- /dev/null +++ b/packages/contracts/script/DeployRecoveryControllerZKSync.s.sol @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Script.sol"; + +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "../test/helpers/SimpleWallet.sol"; +import "../test/helpers/RecoveryControllerZKSync.sol"; +import "../src/utils/Verifier.sol"; +import "../src/utils/ECDSAOwnedDKIMRegistry.sol"; +// import "../src/utils/ForwardDKIMRegistry.sol"; +import "../src/EmailAuth.sol"; +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import {ZKSyncCreate2Factory} from "../src/utils/ZKSyncCreate2Factory.sol"; + +contract Deploy is Script { + using ECDSA for *; + + ECDSAOwnedDKIMRegistry dkim; + Verifier verifier; + EmailAuth emailAuthImpl; + SimpleWallet simpleWallet; + RecoveryControllerZKSync recoveryControllerZKSync; + ZKSyncCreate2Factory factoryImpl; + + function run() external { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + if (deployerPrivateKey == 0) { + console.log("PRIVATE_KEY env var not set"); + return; + } + address signer = vm.envAddress("SIGNER"); + if (signer == address(0)) { + console.log("SIGNER env var not set"); + return; + } + + vm.startBroadcast(deployerPrivateKey); + address initialOwner = msg.sender; + + // Deploy ECDSAOwned DKIM registry + dkim = ECDSAOwnedDKIMRegistry(vm.envOr("ECDSA_DKIM", address(0))); + if (address(dkim) == address(0)) { + ECDSAOwnedDKIMRegistry ecdsaDkimImpl = new ECDSAOwnedDKIMRegistry(); + console.log( + "ECDSAOwnedDKIMRegistry implementation deployed at: %s", + address(ecdsaDkimImpl) + ); + ERC1967Proxy ecdsaDkimProxy = new ERC1967Proxy( + address(ecdsaDkimImpl), + abi.encodeCall(ecdsaDkimImpl.initialize, (initialOwner, signer)) + ); + dkim = ECDSAOwnedDKIMRegistry(address(ecdsaDkimProxy)); + console.log( + "ECDSAOwnedDKIMRegistry deployed at: %s", + address(dkim) + ); + vm.setEnv("ECDSA_DKIM", vm.toString(address(dkim))); + // dkimImpl = new ForwardDKIMRegistry(); + // console.log( + // "ForwardDKIMRegistry implementation deployed at: %s", + // address(dkimImpl) + // ); + // ERC1967Proxy dkimProxy = new ERC1967Proxy( + // address(dkimImpl), + // abi.encodeCall(dkimImpl.initialize, (initialOwner, signer)) + // ); + // dkim = ForwardDKIMRegistry(address(dkimProxy)); + // console.log("ForwardDKIMRegistry deployed at: %s", address(dkim)); + // vm.setEnv("DKIM", vm.toString(address(dkim))); + } + // Deploy Verifier + verifier = Verifier(vm.envOr("VERIFIER", address(0))); + if (address(verifier) == address(0)) { + Verifier verifierImpl = new Verifier(); + console.log( + "Verifier implementation deployed at: %s", + address(verifierImpl) + ); + ERC1967Proxy verifierProxy = new ERC1967Proxy( + address(verifierImpl), + abi.encodeCall(verifierImpl.initialize, (initialOwner)) + ); + verifier = Verifier(address(verifierProxy)); + console.log("Verifier deployed at: %s", address(verifier)); + vm.setEnv("VERIFIER", vm.toString(address(verifier))); + } + + // Deploy EmailAuth Implementation + emailAuthImpl = EmailAuth(vm.envOr("EMAIL_AUTH_IMPL", address(0))); + if (address(emailAuthImpl) == address(0)) { + emailAuthImpl = new EmailAuth(); + console.log( + "EmailAuth implementation deployed at: %s", + address(emailAuthImpl) + ); + vm.setEnv("EMAIL_AUTH_IMPL", vm.toString(address(emailAuthImpl))); + } + + // Deploy Factory + factoryImpl = ZKSyncCreate2Factory(vm.envOr("FACTORY", address(0))); + if (address(factoryImpl) == address(0)) { + factoryImpl = new ZKSyncCreate2Factory(); + console.log( + "Factory implementation deployed at: %s", + address(factoryImpl) + ); + vm.setEnv("FACTORY", vm.toString(address(factoryImpl))); + } + + // Create RecoveryControllerZKSync as EmailAccountRecovery implementation + { + RecoveryControllerZKSync recoveryControllerZKSyncImpl = new RecoveryControllerZKSync(); + ERC1967Proxy recoveryControllerZKSyncProxy = new ERC1967Proxy( + address(recoveryControllerZKSyncImpl), + abi.encodeCall( + recoveryControllerZKSyncImpl.initialize, + ( + signer, + address(verifier), + address(dkim), + address(emailAuthImpl), + address(factoryImpl) + ) + ) + ); + recoveryControllerZKSync = RecoveryControllerZKSync( + payable(address(recoveryControllerZKSyncProxy)) + ); + console.log( + "RecoveryControllerZKSync deployed at: %s", + address(recoveryControllerZKSync) + ); + vm.setEnv( + "RECOVERY_CONTROLLER_ZKSYNC", + vm.toString(address(recoveryControllerZKSync)) + ); + } + + // Deploy SimpleWallet Implementation + { + SimpleWallet simpleWalletImpl = new SimpleWallet(); + console.log( + "SimpleWallet implementation deployed at: %s", + address(simpleWalletImpl) + ); + vm.setEnv( + "SIMPLE_WALLET_IMPL", + vm.toString(address(simpleWalletImpl)) + ); + ERC1967Proxy simpleWalletProxy = new ERC1967Proxy( + address(simpleWalletImpl), + abi.encodeCall( + simpleWalletImpl.initialize, + (signer, address(recoveryControllerZKSync)) + ) + ); + simpleWallet = SimpleWallet(payable(address(simpleWalletProxy))); + console.log("SimpleWallet deployed at: %s", address(simpleWallet)); + vm.setEnv("SIMPLE_WALLET", vm.toString(address(simpleWallet))); + } + vm.stopBroadcast(); + } +} diff --git a/packages/contracts/src/EmailAccountRecovery.sol b/packages/contracts/src/EmailAccountRecovery.sol index 5de0591..c1a87ac 100644 --- a/packages/contracts/src/EmailAccountRecovery.sol +++ b/packages/contracts/src/EmailAccountRecovery.sol @@ -4,9 +4,6 @@ pragma solidity ^0.8.12; import "./EmailAuth.sol"; import "@openzeppelin/contracts/utils/Create2.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; -import {L2ContractHelper} from "@matterlabs/zksync-contracts/l2/contracts/L2ContractHelper.sol"; -// import {SystemContractsCaller} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; -// import {DEPLOYER_SYSTEM_CONTRACT} from "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; /// @title Email Account Recovery Contract /// @notice Provides mechanisms for email-based account recovery, leveraging guardians and template-based email verification. @@ -16,7 +13,6 @@ abstract contract EmailAccountRecovery { address public verifierAddr; address public dkimAddr; address public emailAuthImplementationAddr; - bytes32 public proxyBytecodeHash = 0x0100008338d33e12c716a5b695c6f7f4e526cf162a9378c0713eea5386c09951; /// @notice Returns the address of the verifier contract. /// @dev This function is virtual and can be overridden by inheriting contracts. @@ -117,51 +113,46 @@ abstract contract EmailAccountRecovery { function computeEmailAuthAddress( address recoveredAccount, bytes32 accountSalt - ) public view returns (address) { - // If on zksync, we use L2ContractHelper.computeCreate2Address - if (block.chainid == 324 || block.chainid == 300) { - // The bytecodeHash is hardcoded here because type(ERC1967Proxy).creationCode doesn't work on eraVM currently - // If you failed some test cases, check the bytecodeHash by yourself - // see, test/ComputeCreate2Address.t.sol - return - L2ContractHelper.computeCreate2Address( - address(this), - accountSalt, - bytes32( - proxyBytecodeHash - ), - keccak256( + ) public view virtual returns (address) { + return + Create2.computeAddress( + accountSalt, + keccak256( + abi.encodePacked( + type(ERC1967Proxy).creationCode, abi.encode( emailAuthImplementation(), abi.encodeCall( EmailAuth.initialize, - (recoveredAccount, accountSalt, address(this)) - ) - ) - ) - ); - } else { - return - Create2.computeAddress( - accountSalt, - keccak256( - abi.encodePacked( - type(ERC1967Proxy).creationCode, - abi.encode( - emailAuthImplementation(), - abi.encodeCall( - EmailAuth.initialize, - ( - recoveredAccount, - accountSalt, - address(this) - ) + ( + recoveredAccount, + accountSalt, + address(this) ) ) ) ) - ); - } + ) + ); + } + + /// @notice Deploys a new proxy contract for email authentication. + /// @dev This function uses the CREATE2 opcode to deploy a new ERC1967Proxy contract with a deterministic address. + /// @param recoveredAccount The address of the account to be recovered. + /// @param accountSalt A bytes32 salt value used to ensure the uniqueness of the deployed proxy address. + /// @return address The address of the newly deployed proxy contract. + function deployEmailAuthProxy( + address recoveredAccount, + bytes32 accountSalt + ) internal virtual returns (address) { + ERC1967Proxy proxy = new ERC1967Proxy{salt: accountSalt}( + emailAuthImplementation(), + abi.encodeCall( + EmailAuth.initialize, + (recoveredAccount, accountSalt, address(this)) + ) + ); + return address(proxy); } /// @notice Calculates a unique subject template ID for an acceptance subject template using its index. @@ -226,51 +217,8 @@ abstract contract EmailAccountRecovery { EmailAuth guardianEmailAuth; if (guardian.code.length == 0) { - // // Deploy proxy of the guardian's EmailAuth contract - // if (block.chainid == 324 || block.chainid == 300) { - // (bool success, bytes memory returnData) = SystemContractsCaller - // .systemCallWithReturndata( - // uint32(gasleft()), - // address(DEPLOYER_SYSTEM_CONTRACT), - // uint128(0), - // abi.encodeCall( - // DEPLOYER_SYSTEM_CONTRACT.create2, - // ( - // emailAuthMsg.proof.accountSalt, - // proxyBytecodeHash, - // abi.encode( - // emailAuthImplementation(), - // abi.encodeCall( - // EmailAuth.initialize, - // ( - // recoveredAccount, - // emailAuthMsg.proof.accountSalt, - // address(this) - // ) - // ) - // ) - // ) - // ) - // ); - // address payable proxyAddress = abi.decode(returnData, (address)); - // ERC1967Proxy proxy = ERC1967Proxy(proxyAddress); - // guardianEmailAuth = EmailAuth(address(proxy)); - // guardianEmailAuth.initialize( - // recoveredAccount, - // emailAuthMsg.proof.accountSalt, - // address(this) - // ); - // } else { - // Deploy proxy of the guardian's EmailAuth contract - ERC1967Proxy proxy = new ERC1967Proxy{salt: emailAuthMsg.proof.accountSalt}( - emailAuthImplementation(), - abi.encodeCall( - EmailAuth.initialize, - (recoveredAccount, emailAuthMsg.proof.accountSalt, address(this)) - ) - ); - guardianEmailAuth = EmailAuth(address(proxy)); - // } + address proxyAddress = deployEmailAuthProxy(recoveredAccount, emailAuthMsg.proof.accountSalt); + guardianEmailAuth = EmailAuth(proxyAddress); guardianEmailAuth.initDKIMRegistry(dkim()); guardianEmailAuth.initVerifier(verifier()); for ( diff --git a/packages/contracts/src/EmailAccountRecoveryZKSync.sol b/packages/contracts/src/EmailAccountRecoveryZKSync.sol new file mode 100644 index 0000000..fbd14a6 --- /dev/null +++ b/packages/contracts/src/EmailAccountRecoveryZKSync.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import {EmailAuth} from "./EmailAuth.sol"; +import {EmailAccountRecovery} from "./EmailAccountRecovery.sol"; +import {ZKSyncCreate2Factory} from "./utils/ZKSyncCreate2Factory.sol"; + +/// @title Email Account Recovery Contract +/// @notice Provides mechanisms for email-based account recovery, leveraging guardians and template-based email verification. +/// @dev This contract is abstract and requires implementation of several methods for configuring a new guardian and recovering an account contract. +abstract contract EmailAccountRecoveryZKSync is EmailAccountRecovery { + + // This is the address of the zkSync factory contract + address public factoryAddr; + // The bytecodeHash is hardcoded here because type(ERC1967Proxy).creationCode doesn't work on eraVM currently + // If you failed some test cases, check the bytecodeHash by yourself + // see, test/ComputeCreate2Address.t.sol + bytes32 public constant proxyBytecodeHash = 0x0100008338d33e12c716a5b695c6f7f4e526cf162a9378c0713eea5386c09951; + + /// @notice Returns the address of the zkSyncfactory contract. + /// @dev This function is virtual and can be overridden by inheriting contracts. + /// @return address The address of the zkSync factory contract. + function factory() public view virtual returns (address) { + return factoryAddr; + } + + /// @notice Computes the address for email auth contract using the CREATE2 opcode. + /// @dev This function utilizes the `ZKSyncCreate2Factory` to compute the address. The computation uses a provided account address to be recovered, account salt, + /// and the hash of the encoded ERC1967Proxy creation code concatenated with the encoded email auth contract implementation + /// address and the initialization call data. This ensures that the computed address is deterministic and unique per account salt. + /// @param recoveredAccount The address of the account to be recovered. + /// @param accountSalt A bytes32 salt value defined as a hash of the guardian's email address and an account code. This is assumed to be unique to a pair of the guardian's email address and the wallet address to be recovered. + /// @return address The computed address. + function computeEmailAuthAddress( + address recoveredAccount, + bytes32 accountSalt + ) public view override returns (address) { + // If on zksync, we use another logic to calculate create2 address. + return ZKSyncCreate2Factory(factory()).computeAddress( + accountSalt, + proxyBytecodeHash, + abi.encode( + emailAuthImplementation(), + abi.encodeCall( + EmailAuth.initialize, + (recoveredAccount, accountSalt, address(this)) + ) + ) + ); + } + + /// @notice Deploys a proxy contract for email authentication using the CREATE2 opcode. + /// @dev This function utilizes the `ZKSyncCreate2Factory` to deploy the proxy contract. The deployment uses a provided account address to be recovered, account salt, + /// and the hash of the encoded ERC1967Proxy creation code concatenated with the encoded email auth contract implementation + /// address and the initialization call data. This ensures that the deployed address is deterministic and unique per account salt. + /// @param recoveredAccount The address of the account to be recovered. + /// @param accountSalt A bytes32 salt value defined as a hash of the guardian's email address and an account code. This is assumed to be unique to a pair of the guardian's email address and the wallet address to be recovered. + /// @return address The address of the deployed proxy contract. + function deployEmailAuthProxy( + address recoveredAccount, + bytes32 accountSalt + ) internal override returns (address) { + (bool success, bytes memory returnData) = ZKSyncCreate2Factory(factory()).deploy( + accountSalt, + proxyBytecodeHash, + abi.encode( + emailAuthImplementation(), + abi.encodeCall( + EmailAuth.initialize, + ( + recoveredAccount, + accountSalt, + address(this) + ) + ) + ) + ); + address payable proxyAddress = abi.decode(returnData, (address)); + return proxyAddress; + } +} \ No newline at end of file diff --git a/packages/contracts/src/EmailAuth.sol b/packages/contracts/src/EmailAuth.sol index ae850d4..19297fd 100644 --- a/packages/contracts/src/EmailAuth.sol +++ b/packages/contracts/src/EmailAuth.sol @@ -221,27 +221,45 @@ contract EmailAuth is OwnableUpgradeable, UUPSUpgradeable { emailAuthMsg.proof.timestamp > lastTimestamp, "invalid timestamp" ); + require( + bytes(emailAuthMsg.proof.maskedSubject).length <= + verifier.SUBJECT_BYTES(), + "invalid masked subject length" + ); + require( + emailAuthMsg.skipedSubjectPrefix < verifier.SUBJECT_BYTES(), + "invalid size of the skipped subject prefix" + ); // Construct an expectedSubject from template and the values of emailAuthMsg.subjectParams. - string memory expectedSubject = SubjectUtils.computeExpectedSubject( - emailAuthMsg.subjectParams, - template - ); string memory trimmedMaskedSubject = removePrefix( emailAuthMsg.proof.maskedSubject, emailAuthMsg.skipedSubjectPrefix ); - require( - Strings.equal(expectedSubject, trimmedMaskedSubject), - "invalid subject" - ); + string memory expectedSubject = ""; + for (uint stringCase = 0; stringCase < 3; stringCase++) { + expectedSubject = SubjectUtils.computeExpectedSubject( + emailAuthMsg.subjectParams, + template, + stringCase + ); + if (Strings.equal(expectedSubject, trimmedMaskedSubject)) { + break; + } + if (stringCase == 2) { + revert("invalid subject"); + } + } + require( verifier.verifyEmailProof(emailAuthMsg.proof) == true, "invalid email proof" ); usedNullifiers[emailAuthMsg.proof.emailNullifier] = true; - lastTimestamp = emailAuthMsg.proof.timestamp; + if (timestampCheckEnabled && emailAuthMsg.proof.timestamp != 0) { + lastTimestamp = emailAuthMsg.proof.timestamp; + } emit EmailAuthed( emailAuthMsg.proof.emailNullifier, emailAuthMsg.proof.accountSalt, diff --git a/packages/contracts/src/libraries/SubjectUtils.sol b/packages/contracts/src/libraries/SubjectUtils.sol index 2364fde..8482393 100644 --- a/packages/contracts/src/libraries/SubjectUtils.sol +++ b/packages/contracts/src/libraries/SubjectUtils.sol @@ -15,6 +15,21 @@ library SubjectUtils { string public constant DECIMALS_MATCHER = "{decimals}"; string public constant ETH_ADDR_MATCHER = "{ethAddr}"; + function addressToHexString( + address addr, + uint stringCase + ) internal pure returns (string memory) { + if (stringCase == 0) { + return addressToChecksumHexString(addr); + } else if (stringCase == 1) { + return Strings.toHexString(addr); + } else if (stringCase == 2) { + return lowerToUpperCase(Strings.toHexString(addr)); + } else { + revert("invalid stringCase"); + } + } + function addressToChecksumHexString( address addr ) internal pure returns (string memory) { @@ -58,6 +73,18 @@ library SubjectUtils { return string(result); } + function lowerToUpperCase( + string memory hexStr + ) internal pure returns (string memory) { + bytes memory bytesStr = bytes(hexStr); + for (uint i = 0; i < bytesStr.length; i++) { + if (bytesStr[i] >= 0x61 && bytesStr[i] <= 0x66) { + bytesStr[i] = bytes1(uint8(bytesStr[i]) - 32); + } + } + return string(bytesStr); + } + /// @notice Convert bytes to hex string without 0x prefix /// @param data bytes to convert function bytesToHexString( @@ -78,9 +105,11 @@ library SubjectUtils { /// @notice Calculate the expected subject. /// @param subjectParams Params to be used in the subject /// @param template Template to be used for the subject + /// @param stringCase Case of the string - 0:checksumed, 1: lowercase, 2: uppercase function computeExpectedSubject( bytes[] memory subjectParams, - string[] memory template + string[] memory template, + uint stringCase ) public pure returns (string memory expectedSubject) { // Construct an expectedSubject from template and the values of emailAuthMsg.subjectParams. uint8 nextParamIndex = 0; @@ -117,7 +146,7 @@ library SubjectUtils { subjectParams[nextParamIndex], (address) ); - stringParam = addressToChecksumHexString(param); + stringParam = addressToHexString(param, stringCase); } else { isParamExist = false; stringParam = template[i]; diff --git a/packages/contracts/src/utils/Groth16Verifier.sol b/packages/contracts/src/utils/Groth16Verifier.sol index 914d7df..68dce98 100644 --- a/packages/contracts/src/utils/Groth16Verifier.sol +++ b/packages/contracts/src/utils/Groth16Verifier.sol @@ -37,126 +37,117 @@ contract Groth16Verifier { uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; - uint256 constant deltax1 = 12348375662783824431360707906202475009449369812921990201376235771680861701966; - uint256 constant deltax2 = 1390621091717691233659791897033569945783127756008503250856151404215287127098; - uint256 constant deltay1 = 21545653682963288007472972452138234474169143155774752223643789231933860474340; - uint256 constant deltay2 = 10610549897370405036411988417557836327116891506639515374316821127902275605593; + uint256 constant deltax1 = 15319578088144148433870292454392579210531397678084258888038350512286180645447; + uint256 constant deltax2 = 1086199161593118582719091177042876064789126336461297231728792628701689859806; + uint256 constant deltay1 = 4446519589909698948619442693220675737896467901545229603388595770900353019149; + uint256 constant deltay2 = 8139820593384559533426709059696820531467462438480254791000622464992960199684; - uint256 constant IC0x = 5901406458595327327953646561359621442218448144107991955344827840671354857930; - uint256 constant IC0y = 21253883398616811363937453025480398551698716152192802899988370991179418894921; + uint256 constant IC0x = 13986287304781811629818135937460078168318260622373795543277096066372223143543; + uint256 constant IC0y = 15894331243762149015069486145475096510770522826153695662065578862511865498937; - uint256 constant IC1x = 1112924942971302135990579038492068551965379862222416146684206705079782572000; - uint256 constant IC1y = 6845816202276549205403237603547410855545803354942552863847676397548741086071; + uint256 constant IC1x = 6657352747838160193290269178909503517423918732593479650799343149184802404227; + uint256 constant IC1y = 17531545371284544846757265261390554928852673143570772606416106283932089249579; - uint256 constant IC2x = 14146397086704743317768846126489596483634956428235300380826232977310804058751; - uint256 constant IC2y = 19618883007025739156467626277666586024401705866552606313791444982720962403992; + uint256 constant IC2x = 16051798939592501067339450771812211828093389728707303947187369590196641845613; + uint256 constant IC2y = 10642771260914469864609917257305668847488863380437098896048772227333105938215; - uint256 constant IC3x = 3901572409202614942721645284047738923242593674037512752046910139604415193490; - uint256 constant IC3y = 20492449392704526941468738279820790768424887146903635663987211396806301809154; + uint256 constant IC3x = 11516771157572865390427149046363199727462471754207638386939698647160647244244; + uint256 constant IC3y = 17750959699385211687017966515706019664346563638845176389048062816482362876919; - uint256 constant IC4x = 18540181064351079043471661082110994395960833330341135578479476830087776228683; - uint256 constant IC4y = 11176005255132390129621080493002450161350701375862520723126575901394028996036; + uint256 constant IC4x = 16585945905928734303656632207622552215825428661762022954125060983592130784974; + uint256 constant IC4y = 3229598948329671362480222913836846699152815669479715539731783730018250763823; - uint256 constant IC5x = 19561918792572579721654605669351975749853953476158354443105355794367963998057; - uint256 constant IC5y = 8218678694141104830016990002861269810060858478661593498963178088127632633272; + uint256 constant IC5x = 2735854243292750270201823836486550894787960439689214123103674588113028210303; + uint256 constant IC5y = 10229313779238541038726274141671860314069645438049912809508167509745776241686; - uint256 constant IC6x = 9430924798221081020093287735191121193795036835461664479209198319741867653703; - uint256 constant IC6y = 8320455794218847878770580093897658145962468495286236900439725456006531945699; + uint256 constant IC6x = 14190416281134666159920819160995974222908686549823480648732091214431137294963; + uint256 constant IC6y = 9029501137578433593499338927272434967030906660585173877815017333537018567602; - uint256 constant IC7x = 5026847283727041400632489144741052290976729570767028644525050581059876916251; - uint256 constant IC7y = 18709603090338372683001965035561848282369713676288357172691730209331905334650; + uint256 constant IC7x = 12170260117675309582350267080302912575028682087359352382893089877455951772473; + uint256 constant IC7y = 20464605792252479349840655650760617496046593314952148684746613675335058350942; - uint256 constant IC8x = 17783950150020738154914534833285662833687830065154708170534593149023190841571; - uint256 constant IC8y = 6711670108831861054349992265875143708175087706665287716580642850559233815182; + uint256 constant IC8x = 4668263935738216597600035713072363446560555431149535779407481594748353348299; + uint256 constant IC8y = 6761669100053229151181201776369124528384949481913373501345799877551671442490; - uint256 constant IC9x = 6456809683101221239825536925658971026995917443342977471616457395354933010826; - uint256 constant IC9y = 2014292748365982904981992383163603273504856743882959093701478470668783800522; + uint256 constant IC9x = 17613426733350227864491099426537059832375604576663256857363196285633689216670; + uint256 constant IC9y = 5805908718695762877817749042508472227770796644334990955096436485320700026010; - uint256 constant IC10x = 6628245325000975286546535223213930648454767286000819266622720989919128655736; - uint256 constant IC10y = 14513751619334179776611945559238333965209884013883320491822197554011245102668; + uint256 constant IC10x = 1007270225032823010989311002543641079754257589690234134844035082768426542620; + uint256 constant IC10y = 21475642872129196888302396594264201358769263783216674834698667474324214197953; - uint256 constant IC11x = 18570424159211943648550772570282559547250130191621494465657111355378707354500; - uint256 constant IC11y = 3142881938352899028782850032628554749777583832256141371247984173352247988131; + uint256 constant IC11x = 15081923087373370787973554347749696256252721214961183946262805192094431665288; + uint256 constant IC11y = 16680069154888020053830495566095733479743182649643804408659380808462437769348; - uint256 constant IC12x = 5223991002378260090449510454796281831282905631623677469960113091483024319301; - uint256 constant IC12y = 9427018011817145184335218137442223127741016816822775509206816206494077869941; + uint256 constant IC12x = 7353920573820203673864179902327357836943865465363806932276427158533966054007; + uint256 constant IC12y = 4906960257966631805968560571985842137400392165080887614941226783003180438368; - uint256 constant IC13x = 17733384847564503082934979078550596341075160377145956961996412508907155849602; - uint256 constant IC13y = 15345500273986785785979010183753446192836470842052033037545791683924216389909; + uint256 constant IC13x = 4533862304475638755375693106780349782380565190034231050848543922795764879802; + uint256 constant IC13y = 598446044155555715891219562107384479652732465225600288479065093170075495657; - uint256 constant IC14x = 6541603162653988673614876540286498610416711433782997011446804048984497507717; - uint256 constant IC14y = 9471585496716317833911101487553454694761435169521054429602533117895220539092; + uint256 constant IC14x = 7122480915086391928930945426177923412929688778313549168236076125436940484112; + uint256 constant IC14y = 9038961138446510912414783948801197218570794393245280448178371602457294281632; - uint256 constant IC15x = 6574110840837190171512762164893486105535576711656029901056739039814628526912; - uint256 constant IC15y = 12107221022070295505274408663667253928323650746131661962928553805430682213730; + uint256 constant IC15x = 6714101981980268884481533101476229027015190942378292707659542820827021193397; + uint256 constant IC15y = 11272887771609959733703167827323622301549783063678829277178890525700670890129; - uint256 constant IC16x = 2983775925467162306639671044788352921278318217335490557023737802970494396161; - uint256 constant IC16y = 15155657642358487296835454918514213311356981076876734700573166757257484354564; + uint256 constant IC16x = 20437112715761765707147148391773769986470432308919910067302657232573395960162; + uint256 constant IC16y = 15321179474484971518132512130588191553678751040283340303685576790320739150657; - uint256 constant IC17x = 8967042914633055089306636825844718647849951037719728238537295360572488150548; - uint256 constant IC17y = 16316365584620447093615538375124020157614277415345119540410103156547686499616; + uint256 constant IC17x = 19219092435091423465633523463253249487338506702794487406401643619518191650129; + uint256 constant IC17y = 17282626638553680622130806938296519057489422178618812871701640691501519771672; - uint256 constant IC18x = 10539075382040152021577786214341262536565753081943101851679620745620126843721; - uint256 constant IC18y = 4734602432159888257161632785059762380496749946015675717019228118945872853040; + uint256 constant IC18x = 16606183112206685785600995921349860405026995817135601022134279364752803469536; + uint256 constant IC18y = 16043499772242927375270363061004003839285471350971879635887182974533742603287; - uint256 constant IC19x = 16904274081002162388173688128412241495718571792446724759784404749590000812400; - uint256 constant IC19y = 10801084318813806801902242112307629808119029411792686266329164737317751231217; + uint256 constant IC19x = 1210707359308302969770163002263119043614552129675869248158635495219906105852; + uint256 constant IC19y = 12680511356057658336130187063160473463083334743891046286452211277763548137276; - uint256 constant IC20x = 15575787937775277998941372228242544347460724933647624890935023166333401850163; - uint256 constant IC20y = 7296638718677056910701470329118855562874930285186351569007798599358833717218; + uint256 constant IC20x = 11086125674217491500739269827053901222271696690174050254374133368712953243088; + uint256 constant IC20y = 6053103800204978405773186514845086084032005357588363656542377416178871564775; - uint256 constant IC21x = 4551313941391400232712859196059035637265126775160423752556164701565012171961; - uint256 constant IC21y = 21401656423982733211718420214626338184514587667446979844631973864641456629261; + uint256 constant IC21x = 14748494146527412772741859783064786419256684299339014876234608950795174044510; + uint256 constant IC21y = 8712883247211066789641782294202642212131980591356063435892043611448376329402; - uint256 constant IC22x = 2935540066773152386094450378156329519379475479888931777862603161088003692041; - uint256 constant IC22y = 3754706265995206762948051647660125270465347882441656302776943004798594006627; + uint256 constant IC22x = 11839379700336717343079420809622942111687375327897345508451774961872673770316; + uint256 constant IC22y = 8895701596719783222411291561512126156358240424160295697039536555088618180915; - uint256 constant IC23x = 14941485327978437375521006241254634444037644973379906367567115351627139641414; - uint256 constant IC23y = 10702407562034274430221897944829443699402512693373259167588271091307663372710; + uint256 constant IC23x = 18344723580640218566078573334781871542714315793755378650476142891258578517167; + uint256 constant IC23y = 6037447496975377303076282689670453476478799098316334507779292520966118416141; - uint256 constant IC24x = 8275896680177260146907953439805305572759478043924598922328323793281943403370; - uint256 constant IC24y = 4247674182996730416195978445155055073549714994568066175487529509583649388873; + uint256 constant IC24x = 1219018687863146079804927794790349811713233524506071692145203043151155579912; + uint256 constant IC24y = 12259329329644691804803466046583012104373647543094116751541858451574329049339; - uint256 constant IC25x = 5689003246975774737588871342271076456426408075813318043434367952407244465697; - uint256 constant IC25y = 5331139184498747881817447962895230742876804067387026910085264060106931675015; + uint256 constant IC25x = 18616266469772173270024938497854580018451184027620595567381348061717260755876; + uint256 constant IC25y = 13657793433977158706390923089623450140219483127718023788044217038622204508743; - uint256 constant IC26x = 9133389296516422045582607363916275184958302548102626374643142889003044665947; - uint256 constant IC26y = 21212127989644328313744743046359043793974008456261367858588476558007302881330; + uint256 constant IC26x = 12727423626475319557504848343871689884624000795573098126755145386839939527511; + uint256 constant IC26y = 2938262592563768549228983305699572862280081061292424052023446347112367143549; - uint256 constant IC27x = 1846381662521291690941661313906009843371539776920831630929177290350683400816; - uint256 constant IC27y = 14037588365801936321970551415842797526891505906435930017587651178284699267713; + uint256 constant IC27x = 21487591408762398705234938070547673395123973173141617628201773263097079121694; + uint256 constant IC27y = 12720246748523909661755448585533297402316709697570936404470276522191359637563; - uint256 constant IC28x = 9781100104817210330466721014252420484088695894046800561845749556748658092046; - uint256 constant IC28y = 5247283488585909287681175111965979900241094426050812131890410213638115643151; + uint256 constant IC28x = 16467178226026300059831605377943086050334723191464668213518101445484504783848; + uint256 constant IC28y = 9139131916495414634537516523354727831542697092324217153640571950935058484467; - uint256 constant IC29x = 2601884709396729070900092103586635418201773412881087270429648554918650589212; - uint256 constant IC29y = 9908981325212548797939830108274909156521241172863051558205007650971279318517; + uint256 constant IC29x = 11813394657812788297263465566473337219295871229603907247462957762987163286727; + uint256 constant IC29y = 2333466569019313289053951330259295038552214976343543633683510156531235807982; - uint256 constant IC30x = 9939266818987304280716292846681442246091197219658249578844451051169120630547; - uint256 constant IC30y = 2572015044563341438903424542575536095020061887469225890988354903901552937232; + uint256 constant IC30x = 5758319522107086585563855735449863655068464994393372981823525634565012585161; + uint256 constant IC30y = 281303738559625778766939028867621386494750433481191839742375920626126152406; - uint256 constant IC31x = 13118893670705126645185968274218628155008227884751114852720068135196260630881; - uint256 constant IC31y = 6230722867526865558981774022287077378574474669760549030286133277816703673143; + uint256 constant IC31x = 10766255441893413771043297335573055973288564739850120191905483233382630740246; + uint256 constant IC31y = 8012588191039935342856190453376510257080197619321852273994553617995812833773; - uint256 constant IC32x = 17212407207955414163237618089196466668701707894128397707051726962337098549169; - uint256 constant IC32y = 8404846513505663468605283225980364311579458231305844344066234966448248022846; + uint256 constant IC32x = 13740647652203492799542105246627141268848155986372129145815588390071245063824; + uint256 constant IC32y = 12989805147963975539185412669782613149167981050611353053030652178298637898321; - uint256 constant IC33x = 11738484603497709502459820489878480711987723990943728339865918189223648597498; - uint256 constant IC33y = 4876663067150136827802187921986818211983158246723787276826534383019800886864; + uint256 constant IC33x = 11678473503165871308190682100052535955722167524502187482920769926720343167599; + uint256 constant IC33y = 13548393914151182724283386224251830133662331816742832947222699249802146353834; + + uint256 constant IC34x = 20746424191835410865488887203537015077703505567964632145891041247460534632431; + uint256 constant IC34y = 14888985375914925013094608784755252069956164909406628467775584250729953169513; - uint256 constant IC34x = 10388736566666345681097260475847864743327046424517259125467497894377198799740; - uint256 constant IC34y = 18058504066267363666256588143336895545386092144245446448007719752461244713629; - - // For zksync mainnet TODO: Current addresses are on zkSync sepolia, - // Please deploy them before you deploy the Groth16Verifier. - address constant ecAddAddrZkSync = 0x4cc3aa31951FADa114cBAd54686E2A082Df6C4fa; - address constant ecMulAddrZkSync = 0x2abE798291c05B054475BDEB017161737A6A1b4F; - address constant ecPairingAddrZkSync = 0x9F7D2961D2E522D5B1407dD1e364A520DdC8a77F; - // For zksync sepolia - address constant ecAddAddrZkSyncSepolia = 0x4cc3aa31951FADa114cBAd54686E2A082Df6C4fa; - address constant ecMulAddrZkSyncSepolia = 0x2abE798291c05B054475BDEB017161737A6A1b4F; - address constant ecPairingAddrZkSyncSepolia = 0x9F7D2961D2E522D5B1407dD1e364A520DdC8a77F; // Memory data uint16 constant pVk = 0; @@ -165,44 +156,24 @@ contract Groth16Verifier { uint16 constant pLastMem = 896; function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[34] calldata _pubSignals) public view returns (bool) { - - uint16 zksync; - if(block.chainid == 300) { - zksync = 2; // zkSync sepolia - } else if(block.chainid == 324) { - zksync = 1; // zkSync mainnet - } else { - zksync = 0; // others - } - assembly { - function checkField(v) { - if iszero(lt(v, q)) { + if iszero(lt(v, r)) { mstore(0, 0) return(0, 0x20) } } // G1 function to multiply a G1 value(x,y) to value in an address - function g1_mulAccC(pR, x, y, s, z) { + function g1_mulAccC(pR, x, y, s) { let success let mIn := mload(0x40) mstore(mIn, x) mstore(add(mIn, 32), y) mstore(add(mIn, 64), s) - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecMulAddrZkSync, mIn, 96, mIn, 64) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecMulAddrZkSyncSepolia, mIn, 96, mIn, 64) - } - default { - success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) - } - + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + if iszero(success) { mstore(0, 0) return(0, 0x20) @@ -211,17 +182,7 @@ contract Groth16Verifier { mstore(add(mIn, 64), mload(pR)) mstore(add(mIn, 96), mload(add(pR, 32))) - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecAddAddrZkSync, mIn, 128, pR, 64) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecAddAddrZkSyncSepolia, mIn, 128, pR, 64) - } - default { - success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) - } - + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) if iszero(success) { mstore(0, 0) @@ -229,7 +190,7 @@ contract Groth16Verifier { } } - function checkPairing(pA, pB, pC, pubSignals, pMem, z) -> isOk { + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { let _pPairing := add(pMem, pPairing) let _pVk := add(pMem, pVk) @@ -238,73 +199,73 @@ contract Groth16Verifier { // Compute the linear combination vk_x - g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0)), z) + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) - g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32)), z) + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) - g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64)), z) + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) - g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96)), z) + g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96))) - g1_mulAccC(_pVk, IC5x, IC5y, calldataload(add(pubSignals, 128)), z) + g1_mulAccC(_pVk, IC5x, IC5y, calldataload(add(pubSignals, 128))) - g1_mulAccC(_pVk, IC6x, IC6y, calldataload(add(pubSignals, 160)), z) + g1_mulAccC(_pVk, IC6x, IC6y, calldataload(add(pubSignals, 160))) - g1_mulAccC(_pVk, IC7x, IC7y, calldataload(add(pubSignals, 192)), z) + g1_mulAccC(_pVk, IC7x, IC7y, calldataload(add(pubSignals, 192))) - g1_mulAccC(_pVk, IC8x, IC8y, calldataload(add(pubSignals, 224)), z) + g1_mulAccC(_pVk, IC8x, IC8y, calldataload(add(pubSignals, 224))) - g1_mulAccC(_pVk, IC9x, IC9y, calldataload(add(pubSignals, 256)), z) + g1_mulAccC(_pVk, IC9x, IC9y, calldataload(add(pubSignals, 256))) - g1_mulAccC(_pVk, IC10x, IC10y, calldataload(add(pubSignals, 288)), z) + g1_mulAccC(_pVk, IC10x, IC10y, calldataload(add(pubSignals, 288))) - g1_mulAccC(_pVk, IC11x, IC11y, calldataload(add(pubSignals, 320)), z) + g1_mulAccC(_pVk, IC11x, IC11y, calldataload(add(pubSignals, 320))) - g1_mulAccC(_pVk, IC12x, IC12y, calldataload(add(pubSignals, 352)), z) + g1_mulAccC(_pVk, IC12x, IC12y, calldataload(add(pubSignals, 352))) - g1_mulAccC(_pVk, IC13x, IC13y, calldataload(add(pubSignals, 384)), z) + g1_mulAccC(_pVk, IC13x, IC13y, calldataload(add(pubSignals, 384))) - g1_mulAccC(_pVk, IC14x, IC14y, calldataload(add(pubSignals, 416)), z) + g1_mulAccC(_pVk, IC14x, IC14y, calldataload(add(pubSignals, 416))) - g1_mulAccC(_pVk, IC15x, IC15y, calldataload(add(pubSignals, 448)), z) + g1_mulAccC(_pVk, IC15x, IC15y, calldataload(add(pubSignals, 448))) - g1_mulAccC(_pVk, IC16x, IC16y, calldataload(add(pubSignals, 480)), z) + g1_mulAccC(_pVk, IC16x, IC16y, calldataload(add(pubSignals, 480))) - g1_mulAccC(_pVk, IC17x, IC17y, calldataload(add(pubSignals, 512)), z) + g1_mulAccC(_pVk, IC17x, IC17y, calldataload(add(pubSignals, 512))) - g1_mulAccC(_pVk, IC18x, IC18y, calldataload(add(pubSignals, 544)), z) + g1_mulAccC(_pVk, IC18x, IC18y, calldataload(add(pubSignals, 544))) - g1_mulAccC(_pVk, IC19x, IC19y, calldataload(add(pubSignals, 576)), z) + g1_mulAccC(_pVk, IC19x, IC19y, calldataload(add(pubSignals, 576))) - g1_mulAccC(_pVk, IC20x, IC20y, calldataload(add(pubSignals, 608)), z) + g1_mulAccC(_pVk, IC20x, IC20y, calldataload(add(pubSignals, 608))) - g1_mulAccC(_pVk, IC21x, IC21y, calldataload(add(pubSignals, 640)), z) + g1_mulAccC(_pVk, IC21x, IC21y, calldataload(add(pubSignals, 640))) - g1_mulAccC(_pVk, IC22x, IC22y, calldataload(add(pubSignals, 672)), z) + g1_mulAccC(_pVk, IC22x, IC22y, calldataload(add(pubSignals, 672))) - g1_mulAccC(_pVk, IC23x, IC23y, calldataload(add(pubSignals, 704)), z) + g1_mulAccC(_pVk, IC23x, IC23y, calldataload(add(pubSignals, 704))) - g1_mulAccC(_pVk, IC24x, IC24y, calldataload(add(pubSignals, 736)), z) + g1_mulAccC(_pVk, IC24x, IC24y, calldataload(add(pubSignals, 736))) - g1_mulAccC(_pVk, IC25x, IC25y, calldataload(add(pubSignals, 768)), z) + g1_mulAccC(_pVk, IC25x, IC25y, calldataload(add(pubSignals, 768))) - g1_mulAccC(_pVk, IC26x, IC26y, calldataload(add(pubSignals, 800)), z) + g1_mulAccC(_pVk, IC26x, IC26y, calldataload(add(pubSignals, 800))) - g1_mulAccC(_pVk, IC27x, IC27y, calldataload(add(pubSignals, 832)), z) + g1_mulAccC(_pVk, IC27x, IC27y, calldataload(add(pubSignals, 832))) - g1_mulAccC(_pVk, IC28x, IC28y, calldataload(add(pubSignals, 864)), z) + g1_mulAccC(_pVk, IC28x, IC28y, calldataload(add(pubSignals, 864))) - g1_mulAccC(_pVk, IC29x, IC29y, calldataload(add(pubSignals, 896)), z) + g1_mulAccC(_pVk, IC29x, IC29y, calldataload(add(pubSignals, 896))) - g1_mulAccC(_pVk, IC30x, IC30y, calldataload(add(pubSignals, 928)), z) + g1_mulAccC(_pVk, IC30x, IC30y, calldataload(add(pubSignals, 928))) - g1_mulAccC(_pVk, IC31x, IC31y, calldataload(add(pubSignals, 960)), z) + g1_mulAccC(_pVk, IC31x, IC31y, calldataload(add(pubSignals, 960))) - g1_mulAccC(_pVk, IC32x, IC32y, calldataload(add(pubSignals, 992)), z) + g1_mulAccC(_pVk, IC32x, IC32y, calldataload(add(pubSignals, 992))) - g1_mulAccC(_pVk, IC33x, IC33y, calldataload(add(pubSignals, 1024)), z) + g1_mulAccC(_pVk, IC33x, IC33y, calldataload(add(pubSignals, 1024))) - g1_mulAccC(_pVk, IC34x, IC34y, calldataload(add(pubSignals, 1056)), z) + g1_mulAccC(_pVk, IC34x, IC34y, calldataload(add(pubSignals, 1056))) // -A @@ -349,17 +310,7 @@ contract Groth16Verifier { mstore(add(_pPairing, 736), deltay2) - let success := false - switch z - case 1 { - success := staticcall(sub(gas(), 2000), ecPairingAddrZkSync, _pPairing, 768, _pPairing, 0x20) - } - case 2 { - success := staticcall(sub(gas(), 2000), ecPairingAddrZkSyncSepolia, _pPairing, 768, _pPairing, 0x20) - } - default { - success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) - } + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) isOk := and(success, mload(_pPairing)) } @@ -441,7 +392,7 @@ contract Groth16Verifier { // Validate all evaluations - let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem, zksync) + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) mstore(0, isValid) return(0, 0x20) diff --git a/packages/contracts/src/utils/ZKSyncCreate2Factory.sol b/packages/contracts/src/utils/ZKSyncCreate2Factory.sol new file mode 100644 index 0000000..ee3ba88 --- /dev/null +++ b/packages/contracts/src/utils/ZKSyncCreate2Factory.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import {ZKSyncCreate2FactoryBase} from "./ZKSyncCreate2FactoryBase.sol"; +// // FOR_ZKSYNC:START +// import {L2ContractHelper} from "@matterlabs/zksync-contracts/l2/contracts/L2ContractHelper.sol"; +// import {SystemContractsCaller} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; +// import {DEPLOYER_SYSTEM_CONTRACT} from "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +// // FOR_ZKSYNC:END + +contract ZKSyncCreate2Factory is ZKSyncCreate2FactoryBase { + // // FOR_ZKSYNC:START + // function computeAddress(bytes32 salt, bytes32 bytecodeHash, bytes memory input) external view returns (address) { + // return L2ContractHelper.computeCreate2Address(address(this), salt, bytes32(bytecodeHash), keccak256(input)); + // } + + // function deploy(bytes32 salt, bytes32 bytecodeHash, bytes memory input) + // external + // returns (bool success, bytes memory returnData) + // { + // (success, returnData) = SystemContractsCaller.systemCallWithReturndata( + // uint32(gasleft()), + // address(DEPLOYER_SYSTEM_CONTRACT), + // uint128(0), + // abi.encodeCall(DEPLOYER_SYSTEM_CONTRACT.create2, (salt, bytecodeHash, input)) + // ); + // } + // // FOR_ZKSYNC:END +} diff --git a/packages/contracts/src/utils/ZKSyncCreate2FactoryBase.sol b/packages/contracts/src/utils/ZKSyncCreate2FactoryBase.sol new file mode 100644 index 0000000..f97447e --- /dev/null +++ b/packages/contracts/src/utils/ZKSyncCreate2FactoryBase.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +contract ZKSyncCreate2FactoryBase { + function computeAddress(bytes32 salt, bytes32 bytecodeHash, bytes memory input) external virtual view returns (address) { + return address(0); + } + + function deploy(bytes32 salt, bytes32 bytecodeHash, bytes memory input) + external + virtual + returns (bool success, bytes memory returnData) + { + return (false, ""); + } +} diff --git a/packages/contracts/test/ComputeCreate2Address.t.sol b/packages/contracts/test/ComputeCreate2Address.t.sol deleted file mode 100644 index abd0289..0000000 --- a/packages/contracts/test/ComputeCreate2Address.t.sol +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.12; - -import "forge-std/Test.sol"; -import "forge-std/console.sol"; - -import {L2ContractHelper} from "@matterlabs/zksync-contracts/l2/contracts/L2ContractHelper.sol"; -import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; -// import {SystemContractsCaller} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; -// import {DEPLOYER_SYSTEM_CONTRACT} from "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; - -import "../src/EmailAuth.sol"; -import "./helpers/StructHelper.sol"; - -contract ComputeCreate2AddressTest is StructHelper { - constructor() {} - - function testComputeCreate2Address() public { - // This test is not neccessary for non zkSync chains - if (block.chainid != 324 && block.chainid != 300) { - console.log("skip"); - return; - } - - address recoveredAccount = address(0x1); - bytes32 accountSalt = 0x0; - - // See the example code - // https://github.com/matter-labs/foundry-zksync/blob/13497a550e4a097c57bec7430435ab810a6d10fc/zk-tests/src/Contracts.t.sol#L195 - string memory artifact = vm.readFile( - "zkout/ERC1967Proxy.sol/ERC1967Proxy.json" - ); - bytes32 bytecodeHash = vm.parseJsonBytes32( - artifact, - '.hash' - ); - console.log("bytecodeHash"); - console.logBytes32(bytes32(bytecodeHash)); - address computedAddress = L2ContractHelper.computeCreate2Address( - address(this), - accountSalt, - bytes32(bytecodeHash), - keccak256( - abi.encode( - address(emailAuth), - abi.encodeCall( - EmailAuth.initialize, - (recoveredAccount, accountSalt, address(this)) - ) - ) - ) - ); - - console.log("computedAddress", computedAddress); - - // This is the previous way to deploy the proxy -> test has been passed but not working actually by clave side - // ERC1967Proxy proxy = new ERC1967Proxy{salt: accountSalt}( - // address(emailAuth), - // abi.encodeCall( - // EmailAuth.initialize, - // (recoveredAccount, accountSalt, address(this)) - // ) - // ); - // console.log("proxy", address(proxy)); - // assertEq(computedAddress, address(proxy)); - - // (bool success, bytes memory returnData) = SystemContractsCaller - // .systemCallWithReturndata( - // uint32(gasleft()), - // address(DEPLOYER_SYSTEM_CONTRACT), - // uint128(0), - // abi.encodeCall( - // DEPLOYER_SYSTEM_CONTRACT.create2, - // ( - // accountSalt, - // bytecodeHash, - // abi.encode( - // address(emailAuth), - // abi.encodeCall( - // EmailAuth.initialize, - // ( - // recoveredAccount, - // accountSalt, - // address(this) - // ) - // ) - // ) - // ) - // ) - // ); - // address payable proxyAddress = abi.decode(returnData, (address)); - } -} diff --git a/packages/contracts/test/ComputeCreate2AddressZKSync.t.sol b/packages/contracts/test/ComputeCreate2AddressZKSync.t.sol new file mode 100644 index 0000000..eb68cbc --- /dev/null +++ b/packages/contracts/test/ComputeCreate2AddressZKSync.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; + +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import {ZKSyncCreate2Factory} from "../src/utils/ZKSyncCreate2Factory.sol"; +import "../src/EmailAuth.sol"; +import "./helpers/StructHelper.sol"; + +contract ComputeCreate2AddressZKSyncTest is StructHelper { + constructor() {} + + function testComputeCreate2Address() public { + // This test is not neccessary for non zkSync chains + if (block.chainid != 324 && block.chainid != 300) { + console.log("skip"); + return; + } + + address recoveredAccount = address(0x1); + bytes32 accountSalt = 0x0; + ZKSyncCreate2Factory factory = new ZKSyncCreate2Factory(); + bytes memory emailAuthInit = abi.encode( + address(emailAuth), abi.encodeCall(EmailAuth.initialize, (recoveredAccount, accountSalt, address(this))) + ); + + // See the example code + // https://github.com/matter-labs/foundry-zksync/blob/13497a550e4a097c57bec7430435ab810a6d10fc/zk-tests/src/Contracts.t.sol#L195 + string memory artifact = vm.readFile("zkout/ERC1967Proxy.sol/ERC1967Proxy.json"); + bytes32 bytecodeHash = vm.parseJsonBytes32(artifact, ".hash"); + console.log("bytecodeHash"); + console.logBytes32(bytes32(bytecodeHash)); + + address computedAddress = factory.computeAddress(accountSalt, bytecodeHash, emailAuthInit); + console.log("computedAddress", computedAddress); + + (bool success, bytes memory returnData) = factory.deploy(accountSalt, bytecodeHash, emailAuthInit); + + address payable proxyAddress = abi.decode(returnData, (address)); + assertEq(proxyAddress, computedAddress); + } +} \ No newline at end of file diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_acceptanceSubjectTemplates.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_acceptanceSubjectTemplates.t.sol new file mode 100644 index 0000000..71ebc88 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_acceptanceSubjectTemplates.t.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_acceptanceSubjectTemplates is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testAcceptanceSubjectTemplates() public { + skipIfZkSync(); + + setUp(); + string[][] memory res = recoveryController.acceptanceSubjectTemplates(); + assertEq(res[0][0], "Accept"); + assertEq(res[0][1], "guardian"); + assertEq(res[0][2], "request"); + assertEq(res[0][3], "for"); + assertEq(res[0][4], "{ethAddr}"); + } +} diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_completeRecovery.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_completeRecovery.t.sol new file mode 100644 index 0000000..b76c15b --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_completeRecovery.t.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_completeRecovery is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function requestGuardian() public { + setUp(); + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryController.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + } + + function handleAcceptance() public { + requestGuardian(); + + console.log("guardian", guardian); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.ACCEPTED + ); + } + + function handleRecovery() public { + handleAcceptance(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + recoveryController.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), true); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryController.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + } + + function testCompleteRecovery() public { + skipIfZkSync(); + + handleRecovery(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryController.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.startPrank(someRelayer); + vm.warp(4 days); + recoveryController.completeRecovery( + address(simpleWallet), + new bytes(0) + ); + vm.stopPrank(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), newSigner); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + } + + function testExpectRevertCompleteRecoveryRecoveryNotInProgress() public { + skipIfZkSync(); + + handleAcceptance(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + vm.startPrank(someRelayer); + vm.warp(4 days); + vm.expectRevert(bytes("recovery not in progress")); + bytes memory recoveryCalldata; + recoveryController.completeRecovery( + address(simpleWallet), + recoveryCalldata + ); + + vm.stopPrank(); + } + + function testExpectRevertCompleteRecovery() public { + skipIfZkSync(); + + vm.warp(block.timestamp + 3 days); + + handleRecovery(); + + assertEq(recoveryController.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryController.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryController.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryController.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.warp(0); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("timelock not expired")); + bytes memory recoveryCalldata; + recoveryController.completeRecovery( + address(simpleWallet), + recoveryCalldata + ); + + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleAcceptance.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleAcceptance.t.sol new file mode 100644 index 0000000..2bda392 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleAcceptance.t.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_handleAcceptance is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function requestGuardian() public { + skipIfZkSync(); + + setUp(); + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryController.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + } + + function testHandleAcceptance() public { + skipIfZkSync(); + + requestGuardian(); + + console.log("guardian", guardian); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.ACCEPTED + ); + } + + // Can not test recovery in progress using handleAcceptance + // Can not test invalid guardian using handleAcceptance + + function testExpectRevertHandleAcceptanceGuardianStatusMustBeRequested() + public + { + skipIfZkSync(); + + requestGuardian(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + emailAuthMsg.proof.accountSalt = 0x0; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("guardian status must be REQUESTED")); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidTemplateIndex() public { + skipIfZkSync(); + + requestGuardian(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 1; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid template index")); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidSubjectParams() public { + skipIfZkSync(); + + requestGuardian(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](2); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + subjectParamsForAcceptance[1] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid subject params")); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidWalletAddressInEmail() + public + { + skipIfZkSync(); + + requestGuardian(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryController.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(0x0)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryController.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid account in email")); + recoveryController.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecovery.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleRecovery.t.sol similarity index 54% rename from packages/contracts/test/EmailAccountRecovery.t.sol rename to packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleRecovery.t.sol index f567025..f497a36 100644 --- a/packages/contracts/test/EmailAccountRecovery.t.sol +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_handleRecovery.t.sol @@ -3,130 +3,20 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; import "forge-std/console.sol"; -import {EmailAuthMsg} from "../src/EmailAuth.sol"; -import "./helpers/StructHelper.sol"; -import "./helpers/SimpleWallet.sol"; - +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -contract EmailAccountRecoveryTest is StructHelper { +contract EmailAccountRecoveryTest_handleRecovery is StructHelper { constructor() {} function setUp() public override { super.setUp(); } - function testTransfer() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(receiver.balance, 0 ether); - - vm.startPrank(deployer); - simpleWallet.transfer(receiver, 1 ether); - vm.stopPrank(); - - assertEq(address(simpleWallet).balance, 0 ether); - assertEq(receiver.balance, 1 ether); - } - - function testExpectRevertTransferOnlyOwner() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(receiver.balance, 0 ether); - - vm.startPrank(receiver); - vm.expectRevert( - abi.encodeWithSelector( - OwnableUpgradeable.OwnableUnauthorizedAccount.selector, - receiver - ) - ); - simpleWallet.transfer(receiver, 1 ether); - vm.stopPrank(); - } - - function testExpectRevertTransferOnlyOwnerInsufficientBalance() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(receiver.balance, 0 ether); - - vm.startPrank(deployer); - assertEq(receiver.balance, 0 ether); - vm.expectRevert(bytes("insufficient balance")); - simpleWallet.transfer(receiver, 2 ether); - vm.stopPrank(); - } - - function testWithdraw() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(deployer.balance, 0 ether); - - vm.startPrank(deployer); - simpleWallet.withdraw(1 ether); - vm.stopPrank(); - - assertEq(address(simpleWallet).balance, 0 ether); - assertEq(deployer.balance, 1 ether); - } - - function testExpectRevertWithdrawOnlyOwner() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(deployer.balance, 0 ether); - - vm.startPrank(receiver); - vm.expectRevert( - abi.encodeWithSelector( - OwnableUpgradeable.OwnableUnauthorizedAccount.selector, - address(receiver) - ) - ); - simpleWallet.withdraw(1 ether); - vm.stopPrank(); - } - - function testExpectRevertWithdrawInsufficientBalance() public { - setUp(); - - assertEq(address(simpleWallet).balance, 1 ether); - assertEq(deployer.balance, 0 ether); - - vm.startPrank(deployer); - vm.expectRevert(bytes("insufficient balance")); - simpleWallet.withdraw(10 ether); - vm.stopPrank(); - } - - function testAcceptanceSubjectTemplates() public { - setUp(); - string[][] memory res = recoveryController.acceptanceSubjectTemplates(); - assertEq(res[0][0], "Accept"); - assertEq(res[0][1], "guardian"); - assertEq(res[0][2], "request"); - assertEq(res[0][3], "for"); - assertEq(res[0][4], "{ethAddr}"); - } - - function testRecoverySubjectTemplates() public { - setUp(); - string[][] memory res = recoveryController.recoverySubjectTemplates(); - assertEq(res[0][0], "Set"); - assertEq(res[0][1], "the"); - assertEq(res[0][2], "new"); - assertEq(res[0][3], "signer"); - assertEq(res[0][4], "of"); - assertEq(res[0][5], "{ethAddr}"); - assertEq(res[0][6], "to"); - assertEq(res[0][7], "{ethAddr}"); - } - - function testRequestGuardian() public { + function requestGuardian() public { setUp(); require( recoveryController.guardians(guardian) == @@ -143,55 +33,10 @@ contract EmailAccountRecoveryTest is StructHelper { ); } - // function testRequestGuardianNotOwner() public { - // setUp(); - - // require( - // recoveryController.guardians(guardian) == - // recoveryController.GuardianStatus.NONE - // ); - - // vm.startPrank(receiver); - // recoveryController.requestGuardian(guardian); - // vm.stopPrank(); - - // require( - // recoveryController.guardians(guardian) == - // recoveryController.GuardianStatus.NONE - // ); - // } - - function testExpectRevertRequestGuardianInvalidGuardian() public { - setUp(); + function handleAcceptance() public { + skipIfZkSync(); - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.NONE - ); - - vm.startPrank(deployer); - vm.expectRevert(bytes("invalid guardian")); - recoveryController.requestGuardian(address(0x0)); - vm.stopPrank(); - } - - function testExpectRevertRequestGuardianGuardianStatusMustBeNone() public { - setUp(); - - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.NONE - ); - - vm.startPrank(deployer); - recoveryController.requestGuardian(guardian); - vm.expectRevert(bytes("guardian status must be NONE")); - recoveryController.requestGuardian(guardian); - vm.stopPrank(); - } - - function testHandleAcceptance() public { - testRequestGuardian(); + requestGuardian(); console.log("guardian", guardian); @@ -228,141 +73,10 @@ contract EmailAccountRecoveryTest is StructHelper { ); } - // Can not test recovery in progress using handleAcceptance - // Can not test invalid guardian using handleAcceptance - - function testExpectRevertHandleAcceptanceGuardianStatusMustBeRequested() - public - { - testRequestGuardian(); - - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.REQUESTED - ); - - uint templateIdx = 0; - - EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - uint templateId = recoveryController.computeAcceptanceTemplateId( - templateIdx - ); - emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; - emailAuthMsg.proof.accountSalt = 0x0; - - vm.mockCall( - address(recoveryController.emailAuthImplementationAddr()), - abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), - abi.encode(0x0) - ); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("guardian status must be REQUESTED")); - recoveryController.handleAcceptance(emailAuthMsg, templateIdx); - vm.stopPrank(); - } - - function testExpectRevertHandleAcceptanceInvalidTemplateIndex() public { - testRequestGuardian(); - - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.REQUESTED - ); - - uint templateIdx = 1; - - EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - uint templateId = recoveryController.computeAcceptanceTemplateId( - templateIdx - ); - emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; - - vm.mockCall( - address(recoveryController.emailAuthImplementationAddr()), - abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), - abi.encode(0x0) - ); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid template index")); - recoveryController.handleAcceptance(emailAuthMsg, templateIdx); - vm.stopPrank(); - } - - function testExpectRevertHandleAcceptanceInvalidSubjectParams() public { - testRequestGuardian(); - - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.REQUESTED - ); - - uint templateIdx = 0; - - EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - uint templateId = recoveryController.computeAcceptanceTemplateId( - templateIdx - ); - emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](2); - subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); - subjectParamsForAcceptance[1] = abi.encode(address(simpleWallet)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; - - vm.mockCall( - address(recoveryController.emailAuthImplementationAddr()), - abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), - abi.encode(0x0) - ); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid subject params")); - recoveryController.handleAcceptance(emailAuthMsg, templateIdx); - vm.stopPrank(); - } - - function testExpectRevertHandleAcceptanceInvalidWalletAddressInEmail() - public - { - testRequestGuardian(); - - require( - recoveryController.guardians(guardian) == - RecoveryController.GuardianStatus.REQUESTED - ); - - uint templateIdx = 0; - - EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - uint templateId = recoveryController.computeAcceptanceTemplateId( - templateIdx - ); - emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForAcceptance = new bytes[](1); - subjectParamsForAcceptance[0] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForAcceptance; - - vm.mockCall( - address(recoveryController.emailAuthImplementationAddr()), - abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), - abi.encode(0x0) - ); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid account in email")); - recoveryController.handleAcceptance(emailAuthMsg, templateIdx); - vm.stopPrank(); - } - function testHandleRecovery() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -417,7 +131,9 @@ contract EmailAccountRecoveryTest is StructHelper { } function testExpectRevertHandleRecoveryGuardianIsNotDeployed() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -458,7 +174,9 @@ contract EmailAccountRecoveryTest is StructHelper { } function testExpectRevertHandleRecoveryInvalidTemplateId() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -499,7 +217,9 @@ contract EmailAccountRecoveryTest is StructHelper { function testExpectRevertHandleRecoveryGuardianStatusMustBeAccepted() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -553,7 +273,9 @@ contract EmailAccountRecoveryTest is StructHelper { } function testExpectRevertHandleRecoveryInvalidTemplateIndex() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -592,7 +314,9 @@ contract EmailAccountRecoveryTest is StructHelper { } function testExpectRevertHandleRecoveryInvalidSubjectParams() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -632,7 +356,7 @@ contract EmailAccountRecoveryTest is StructHelper { } // function testExpectRevertHandleRecoveryInvalidGuardianInEmail() public { - // testHandleAcceptance(); + // handleAcceptance(); // assertEq(recoveryController.isRecovering(address(simpleWallet)), false); // assertEq( @@ -667,7 +391,9 @@ contract EmailAccountRecoveryTest is StructHelper { // } function testExpectRevertHandleRecoveryInvalidNewSigner() public { - testHandleAcceptance(); + skipIfZkSync(); + + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); assertEq( @@ -704,70 +430,4 @@ contract EmailAccountRecoveryTest is StructHelper { recoveryController.handleRecovery(emailAuthMsg, templateIdx); vm.stopPrank(); } - - function testExpectRevertRejectRecoveryOwnableUnauthorizedAccount() public { - testHandleRecovery(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), true); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - block.timestamp + - recoveryController.timelockPeriodOfAccount( - address(simpleWallet) - ) - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - newSigner - ); - - vm.startPrank(deployer); - vm.expectRevert("recovery not in progress"); - recoveryController.rejectRecovery(); - vm.stopPrank(); - } - - function testCompleteRecovery() public { - testHandleRecovery(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), true); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - block.timestamp + - recoveryController.timelockPeriodOfAccount( - address(simpleWallet) - ) - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - newSigner - ); - - vm.startPrank(someRelayer); - vm.warp(4 days); - recoveryController.completeRecovery( - address(simpleWallet), - new bytes(0) - ); - vm.stopPrank(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), false); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - 0 - ); - assertEq(simpleWallet.owner(), newSigner); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - address(0x0) - ); - } } diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_recoverySubjectTemplates.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_recoverySubjectTemplates.t.sol new file mode 100644 index 0000000..50e720a --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_recoverySubjectTemplates.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_recoverySubjectTemplates is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testRecoverySubjectTemplates() public { + skipIfZkSync(); + + setUp(); + string[][] memory res = recoveryController.recoverySubjectTemplates(); + assertEq(res[0][0], "Set"); + assertEq(res[0][1], "the"); + assertEq(res[0][2], "new"); + assertEq(res[0][3], "signer"); + assertEq(res[0][4], "of"); + assertEq(res[0][5], "{ethAddr}"); + assertEq(res[0][6], "to"); + assertEq(res[0][7], "{ethAddr}"); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_rejectRecovery.t.sol similarity index 63% rename from packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol rename to packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_rejectRecovery.t.sol index 7b346fc..2c55471 100644 --- a/packages/contracts/test/EmailAccountRecoveryForRejectRecovery.t.sol +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_rejectRecovery.t.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; import "forge-std/console.sol"; -import {EmailAuthMsg} from "../src/EmailAuth.sol"; -import "./helpers/StructHelper.sol"; -import "./helpers/SimpleWallet.sol"; - +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { +contract EmailAccountRecoveryForRejectRecoveryTest_rejectRecovery is StructHelper { constructor() {} function setUp() public override { @@ -140,6 +140,8 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { } function testRejectRecovery() public { + skipIfZkSync(); + vm.warp(block.timestamp + 3 days); handleRecovery(); @@ -181,6 +183,8 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { } function testExpectRevertRejectRecoveryRecoveryNotInProgress() public { + skipIfZkSync(); + handleAcceptance(); assertEq(recoveryController.isRecovering(address(simpleWallet)), false); @@ -203,6 +207,8 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { } function testExpectRevertRejectRecovery() public { + skipIfZkSync(); + vm.warp(block.timestamp + 1 days); handleRecovery(); @@ -230,150 +236,9 @@ contract EmailAccountRecoveryForRejectRecoveryTest is StructHelper { vm.stopPrank(); } - function testCompleteRecovery() public { - handleRecovery(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), true); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - block.timestamp + - recoveryController.timelockPeriodOfAccount( - address(simpleWallet) - ) - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - newSigner - ); - - vm.startPrank(someRelayer); - vm.warp(4 days); - bytes memory recoveryCalldata; - recoveryController.completeRecovery( - address(simpleWallet), - recoveryCalldata - ); - vm.stopPrank(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), false); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - 0 - ); - assertEq(simpleWallet.owner(), newSigner); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - address(0x0) - ); - } - - function testExpectRevertCompleteRecoveryRecoveryNotInProgress() public { - handleAcceptance(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), false); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - 0 - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - address(0x0) - ); - - vm.startPrank(someRelayer); - vm.warp(4 days); - vm.expectRevert(bytes("recovery not in progress")); - bytes memory recoveryCalldata; - recoveryController.completeRecovery( - address(simpleWallet), - recoveryCalldata - ); - - vm.stopPrank(); - } - - function testExpectRevertCompleteRecovery() public { - vm.warp(block.timestamp + 3 days); - - handleRecovery(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), true); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - block.timestamp + - recoveryController.timelockPeriodOfAccount( - address(simpleWallet) - ) - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - newSigner - ); - - vm.warp(0); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("timelock not expired")); - bytes memory recoveryCalldata; - recoveryController.completeRecovery( - address(simpleWallet), - recoveryCalldata - ); - - vm.stopPrank(); - } - - function testExpectRevertHandleRecoveryInvalidNewSigner() public { - handleAcceptance(); - - assertEq(recoveryController.isRecovering(address(simpleWallet)), false); - assertEq( - recoveryController.currentTimelockOfAccount(address(simpleWallet)), - 0 - ); - assertEq(simpleWallet.owner(), deployer); - assertEq( - recoveryController.newSignerCandidateOfAccount( - address(simpleWallet) - ), - address(0x0) - ); - uint templateIdx = 0; - - EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); - uint templateId = recoveryController.computeRecoveryTemplateId( - templateIdx - ); - emailAuthMsg.templateId = templateId; - bytes[] memory subjectParamsForRecovery = new bytes[](2); - subjectParamsForRecovery[0] = abi.encode(simpleWallet); - subjectParamsForRecovery[1] = abi.encode(address(0x0)); - emailAuthMsg.subjectParams = subjectParamsForRecovery; - - vm.mockCall( - address(recoveryController.emailAuthImplementationAddr()), - abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), - abi.encode(0x0) - ); - - vm.startPrank(someRelayer); - vm.expectRevert(bytes("invalid new signer")); - recoveryController.handleRecovery(emailAuthMsg, templateIdx); - vm.stopPrank(); - } - function testExpectRevertRejectRecoveryOwnableUnauthorizedAccount() public { + skipIfZkSync(); + handleRecovery(); assertEq(recoveryController.isRecovering(address(simpleWallet)), true); diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_requestGuardian.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_requestGuardian.t.sol new file mode 100644 index 0000000..e03bdaf --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_requestGuardian.t.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_requestGuardian is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testRequestGuardian() public { + skipIfZkSync(); + + setUp(); + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryController.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.REQUESTED + ); + } + + // function testRequestGuardianNotOwner() public { + // setUp(); + + // require( + // recoveryController.guardians(guardian) == + // recoveryController.GuardianStatus.NONE + // ); + + // vm.startPrank(receiver); + // recoveryController.requestGuardian(guardian); + // vm.stopPrank(); + + // require( + // recoveryController.guardians(guardian) == + // recoveryController.GuardianStatus.NONE + // ); + // } + + function testExpectRevertRequestGuardianInvalidGuardian() public { + skipIfZkSync(); + + setUp(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + vm.expectRevert(bytes("invalid guardian")); + recoveryController.requestGuardian(address(0x0)); + vm.stopPrank(); + } + + function testExpectRevertRequestGuardianGuardianStatusMustBeNone() public { + skipIfZkSync(); + + setUp(); + + require( + recoveryController.guardians(guardian) == + RecoveryController.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryController.requestGuardian(guardian); + vm.expectRevert(bytes("guardian status must be NONE")); + recoveryController.requestGuardian(guardian); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_transfer.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_transfer.t.sol new file mode 100644 index 0000000..460700a --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_transfer.t.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_transfer is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testTransfer() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(deployer); + simpleWallet.transfer(receiver, 1 ether); + vm.stopPrank(); + + assertEq(address(simpleWallet).balance, 0 ether); + assertEq(receiver.balance, 1 ether); + } + + function testExpectRevertTransferOnlyOwner() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(receiver); + vm.expectRevert( + abi.encodeWithSelector( + OwnableUpgradeable.OwnableUnauthorizedAccount.selector, + receiver + ) + ); + simpleWallet.transfer(receiver, 1 ether); + vm.stopPrank(); + } + + function testExpectRevertTransferOnlyOwnerInsufficientBalance() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(deployer); + assertEq(receiver.balance, 0 ether); + vm.expectRevert(bytes("insufficient balance")); + simpleWallet.transfer(receiver, 2 ether); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_withdraw.t.sol b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_withdraw.t.sol new file mode 100644 index 0000000..4eefa10 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecovery/EmailAccountRecovery_withdraw.t.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryTest_withdraw is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testWithdraw() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(deployer); + simpleWallet.withdraw(1 ether); + vm.stopPrank(); + + assertEq(address(simpleWallet).balance, 0 ether); + assertEq(deployer.balance, 1 ether); + } + + function testExpectRevertWithdrawOnlyOwner() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(receiver); + vm.expectRevert( + abi.encodeWithSelector( + OwnableUpgradeable.OwnableUnauthorizedAccount.selector, + address(receiver) + ) + ); + simpleWallet.withdraw(1 ether); + vm.stopPrank(); + } + + function testExpectRevertWithdrawInsufficientBalance() public { + skipIfZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(deployer); + vm.expectRevert(bytes("insufficient balance")); + simpleWallet.withdraw(10 ether); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_completeRecovery.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_completeRecovery.t.sol new file mode 100644 index 0000000..6713f75 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_completeRecovery.t.sol @@ -0,0 +1,235 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_completeRecovery is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function requestGuardian() public { + setUp(); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + } + + function handleAcceptance() public { + requestGuardian(); + + console.log("guardian", guardian); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.ACCEPTED + ); + } + + function handleRecovery() public { + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + } + + function testCompleteRecovery() public { + skipIfNotZkSync(); + + handleRecovery(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.startPrank(someRelayer); + vm.warp(4 days); + recoveryControllerZKSync.completeRecovery( + address(simpleWallet), + new bytes(0) + ); + vm.stopPrank(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), newSigner); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + } + + function testExpectRevertCompleteRecoveryRecoveryNotInProgress() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + vm.startPrank(someRelayer); + vm.warp(4 days); + vm.expectRevert(bytes("recovery not in progress")); + bytes memory recoveryCalldata; + recoveryControllerZKSync.completeRecovery( + address(simpleWallet), + recoveryCalldata + ); + + vm.stopPrank(); + } + + function testExpectRevertCompleteRecovery() public { + vm.warp(block.timestamp + 3 days); + + handleRecovery(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.warp(0); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("timelock not expired")); + bytes memory recoveryCalldata; + recoveryControllerZKSync.completeRecovery( + address(simpleWallet), + recoveryCalldata + ); + + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleAcceptance.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleAcceptance.t.sol new file mode 100644 index 0000000..9db7889 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleAcceptance.t.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_handleAcceptance is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function requestGuardian() public { + skipIfNotZkSync(); + + setUp(); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + } + + function testHandleAcceptance() public { + skipIfNotZkSync(); + + requestGuardian(); + + console.log("guardian", guardian); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.ACCEPTED + ); + } + + // Can not test recovery in progress using handleAcceptance + // Can not test invalid guardian using handleAcceptance + + function testExpectRevertHandleAcceptanceGuardianStatusMustBeRequested() + public + { + skipIfNotZkSync(); + + requestGuardian(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + emailAuthMsg.proof.accountSalt = 0x0; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("guardian status must be REQUESTED")); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidTemplateIndex() public { + skipIfNotZkSync(); + + requestGuardian(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 1; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid template index")); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidSubjectParams() public { + skipIfNotZkSync(); + + requestGuardian(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](2); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + subjectParamsForAcceptance[1] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid subject params")); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleAcceptanceInvalidWalletAddressInEmail() + public + { + skipIfNotZkSync(); + + requestGuardian(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(0x0)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid account in email")); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleRecovery.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleRecovery.t.sol new file mode 100644 index 0000000..3a55ec9 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_handleRecovery.t.sol @@ -0,0 +1,433 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_handleRecovery is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function requestGuardian() public { + setUp(); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + } + + function handleAcceptance() public { + skipIfNotZkSync(); + + requestGuardian(); + + console.log("guardian", guardian); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.ACCEPTED + ); + } + + function testHandleRecovery() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + } + + function testExpectRevertHandleRecoveryGuardianIsNotDeployed() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + emailAuthMsg.proof.accountSalt = 0x0; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("guardian is not deployed")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleRecoveryInvalidTemplateId() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid template id")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + // Can not test recovery in progress using handleRecovery + // Can not test invalid guardian using handleRecovery + + function testExpectRevertHandleRecoveryGuardianStatusMustBeAccepted() + public + { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + emailAuthMsg.proof.accountSalt = 0x0; + + // vm.mockCall( + // address(simpleWallet.emailAuthImplementationAddr()), + // abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + // abi.encode(0x0) + // ); + + // // Deploy mock guardian, that status is NONE + // address mockCallAddress; + // if(block.chainid == 300) { + // mockCallAddress = address(0x889170C6bEe9053626f8460A9875d22Cf6DE0782); + // } else { + // mockCallAddress = address(0x2Cfb66029975B1c8881adaa3b79c5Caa4FEB84B5); + // } + // vm.mockCall( + // mockCallAddress, + // abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + // abi.encode(0x0) + // ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("guardian is not deployed")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleRecoveryInvalidTemplateIndex() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + uint templateIdx = 1; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid template index")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + function testExpectRevertHandleRecoveryInvalidSubjectParams() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](3); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + subjectParamsForRecovery[1] = abi.encode(address(0x0)); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid subject params")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } + + // function testExpectRevertHandleRecoveryInvalidGuardianInEmail() public { + // handleAcceptance(); + + // assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + // assertEq( + // recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + // 0 + // ); + // assertEq(simpleWallet.owner(), deployer); + // assertEq( + // recoveryControllerZKSync.newSignerCandidateOfAccount(address(simpleWallet)), + // address(0x0) + // ); + // uint templateIdx = 0; + + // EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + // uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId(templateIdx); + // emailAuthMsg.templateId = templateId; + // bytes[] memory subjectParamsForRecovery = new bytes[](2); + // subjectParamsForRecovery[0] = abi.encode(address(0x0)); + // subjectParamsForRecovery[1] = abi.encode(newSigner); + // emailAuthMsg.subjectParams = subjectParamsForRecovery; + + // vm.mockCall( + // address(recoveryControllerZKSync.emailAuthImplementationAddr()), + // abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + // abi.encode(0x0) + // ); + + // vm.startPrank(someRelayer); + // vm.expectRevert(bytes("invalid guardian in email")); + // recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + // vm.stopPrank(); + // } + + function testExpectRevertHandleRecoveryInvalidNewSigner() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(address(0x0)); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + vm.expectRevert(bytes("invalid new signer")); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_rejectRecovery.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_rejectRecovery.t.sol new file mode 100644 index 0000000..8293060 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_rejectRecovery.t.sol @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_rejectRecovery is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + /** + * Set up functions + */ + function requestGuardian() public { + setUp(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + } + + function handleAcceptance() public { + requestGuardian(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + + console.log("guardian", guardian); + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + emailAuthMsg.subjectParams = subjectParamsForAcceptance; + address recoveredAccount = recoveryControllerZKSync + .extractRecoveredAccountFromAcceptanceSubject( + emailAuthMsg.subjectParams, + templateIdx + ); + address computedGuardian = recoveryControllerZKSync.computeEmailAuthAddress( + recoveredAccount, + emailAuthMsg.proof.accountSalt + ); + console.log("computed guardian", computedGuardian); + uint templateId = recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + // acceptGuardian is internal, we call handleAcceptance, which calls acceptGuardian internally. + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.ACCEPTED + ); + } + + function handleRecovery() public { + handleAcceptance(); + + assertEq(simpleWallet.owner(), deployer); + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + uint templateIdx = 0; + + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + uint templateId = recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ); + emailAuthMsg.templateId = templateId; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(simpleWallet); + subjectParamsForRecovery[1] = abi.encode(newSigner); + emailAuthMsg.subjectParams = subjectParamsForRecovery; + + vm.mockCall( + address(recoveryControllerZKSync.emailAuthImplementationAddr()), + abi.encodeWithSelector(EmailAuth.authEmail.selector, emailAuthMsg), + abi.encode(0x0) + ); + + vm.startPrank(someRelayer); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + vm.stopPrank(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + } + + function testRejectRecovery() public { + skipIfNotZkSync(); + + vm.warp(block.timestamp + 3 days); + + handleRecovery(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.warp(0); + + vm.startPrank(address(simpleWallet)); + recoveryControllerZKSync.rejectRecovery(); + vm.stopPrank(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + } + + function testExpectRevertRejectRecoveryRecoveryNotInProgress() public { + skipIfNotZkSync(); + + handleAcceptance(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), false); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + 0 + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + address(0x0) + ); + + vm.startPrank(deployer); + vm.expectRevert(bytes("recovery not in progress")); + recoveryControllerZKSync.rejectRecovery(); + vm.stopPrank(); + } + + function testExpectRevertRejectRecovery() public { + skipIfNotZkSync(); + + vm.warp(block.timestamp + 1 days); + + handleRecovery(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.startPrank(address(simpleWallet)); + vm.warp(block.timestamp + 4 days); + vm.expectRevert(bytes("timelock expired")); + recoveryControllerZKSync.rejectRecovery(); + vm.stopPrank(); + } + + function testExpectRevertRejectRecoveryOwnableUnauthorizedAccount() public { + skipIfNotZkSync(); + + handleRecovery(); + + assertEq(recoveryControllerZKSync.isRecovering(address(simpleWallet)), true); + assertEq( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)), + block.timestamp + + recoveryControllerZKSync.timelockPeriodOfAccount( + address(simpleWallet) + ) + ); + assertEq(simpleWallet.owner(), deployer); + assertEq( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ), + newSigner + ); + + vm.startPrank(deployer); + vm.expectRevert("recovery not in progress"); + recoveryControllerZKSync.rejectRecovery(); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_requestGuardian.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_requestGuardian.t.sol new file mode 100644 index 0000000..0341865 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_requestGuardian.t.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_requestGuardian is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testRequestGuardian() public { + skipIfNotZkSync(); + + setUp(); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED + ); + } + + // function testRequestGuardianNotOwner() public { + // setUp(); + + // require( + // recoveryControllerZKSync.guardians(guardian) == + // recoveryControllerZKSync.GuardianStatus.NONE + // ); + + // vm.startPrank(receiver); + // recoveryControllerZKSync.requestGuardian(guardian); + // vm.stopPrank(); + + // require( + // recoveryControllerZKSync.guardians(guardian) == + // recoveryControllerZKSync.GuardianStatus.NONE + // ); + // } + + function testExpectRevertRequestGuardianInvalidGuardian() public { + skipIfNotZkSync(); + + setUp(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + vm.expectRevert(bytes("invalid guardian")); + recoveryControllerZKSync.requestGuardian(address(0x0)); + vm.stopPrank(); + } + + function testExpectRevertRequestGuardianGuardianStatusMustBeNone() public { + skipIfNotZkSync(); + + setUp(); + + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.NONE + ); + + vm.startPrank(deployer); + recoveryControllerZKSync.requestGuardian(guardian); + vm.expectRevert(bytes("guardian status must be NONE")); + recoveryControllerZKSync.requestGuardian(guardian); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_transfer.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_transfer.t.sol new file mode 100644 index 0000000..b784847 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_transfer.t.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_transfer is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testTransfer() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(deployer); + simpleWallet.transfer(receiver, 1 ether); + vm.stopPrank(); + + assertEq(address(simpleWallet).balance, 0 ether); + assertEq(receiver.balance, 1 ether); + } + + function testExpectRevertTransferOnlyOwner() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(receiver); + vm.expectRevert( + abi.encodeWithSelector( + OwnableUpgradeable.OwnableUnauthorizedAccount.selector, + receiver + ) + ); + simpleWallet.transfer(receiver, 1 ether); + vm.stopPrank(); + } + + function testExpectRevertTransferOnlyOwnerInsufficientBalance() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(receiver.balance, 0 ether); + + vm.startPrank(deployer); + assertEq(receiver.balance, 0 ether); + vm.expectRevert(bytes("insufficient balance")); + simpleWallet.transfer(receiver, 2 ether); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_withdraw.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_withdraw.t.sol new file mode 100644 index 0000000..07d347d --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZKSync_withdraw.t.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_withdraw is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testWithdraw() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(deployer); + simpleWallet.withdraw(1 ether); + vm.stopPrank(); + + assertEq(address(simpleWallet).balance, 0 ether); + assertEq(deployer.balance, 1 ether); + } + + function testExpectRevertWithdrawOnlyOwner() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(receiver); + vm.expectRevert( + abi.encodeWithSelector( + OwnableUpgradeable.OwnableUnauthorizedAccount.selector, + address(receiver) + ) + ); + simpleWallet.withdraw(1 ether); + vm.stopPrank(); + } + + function testExpectRevertWithdrawInsufficientBalance() public { + skipIfNotZkSync(); + + setUp(); + + assertEq(address(simpleWallet).balance, 1 ether); + assertEq(deployer.balance, 0 ether); + + vm.startPrank(deployer); + vm.expectRevert(bytes("insufficient balance")); + simpleWallet.withdraw(10 ether); + vm.stopPrank(); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_acceptanceSubjectTemplates.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_acceptanceSubjectTemplates.t.sol new file mode 100644 index 0000000..9290a69 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_acceptanceSubjectTemplates.t.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryControllerZKSync} from "../helpers/RecoveryControllerZKSync.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_acceptanceSubjectTemplates is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testAcceptanceSubjectTemplates() public { + skipIfNotZkSync(); + + setUp(); + string[][] memory res = recoveryController.acceptanceSubjectTemplates(); + assertEq(res[0][0], "Accept"); + assertEq(res[0][1], "guardian"); + assertEq(res[0][2], "request"); + assertEq(res[0][3], "for"); + assertEq(res[0][4], "{ethAddr}"); + } +} diff --git a/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_recoverySubjectTemplates.t.sol b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_recoverySubjectTemplates.t.sol new file mode 100644 index 0000000..051c655 --- /dev/null +++ b/packages/contracts/test/EmailAccountRecoveryZkSync/EmailAccountRecoveryZkSync_recoverySubjectTemplates.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {RecoveryController} from "../helpers/RecoveryController.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; +import {SimpleWallet} from "../helpers/SimpleWallet.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +contract EmailAccountRecoveryZKSyncTest_recoverySubjectTemplates is StructHelper { + constructor() {} + + function setUp() public override { + super.setUp(); + } + + function testRecoverySubjectTemplates() public { + skipIfNotZkSync(); + + setUp(); + string[][] memory res = recoveryController.recoverySubjectTemplates(); + assertEq(res[0][0], "Set"); + assertEq(res[0][1], "the"); + assertEq(res[0][2], "new"); + assertEq(res[0][3], "signer"); + assertEq(res[0][4], "of"); + assertEq(res[0][5], "{ethAddr}"); + assertEq(res[0][6], "to"); + assertEq(res[0][7], "{ethAddr}"); + } +} diff --git a/packages/contracts/test/EmailAuth.t.sol b/packages/contracts/test/EmailAuth.t.sol index 220f886..7ba173a 100644 --- a/packages/contracts/test/EmailAuth.t.sol +++ b/packages/contracts/test/EmailAuth.t.sol @@ -432,6 +432,48 @@ contract EmailAuthTest is StructHelper { vm.stopPrank(); } + function testExpectRevertAuthEmailInvalidMaskedSubjectLength() public { + vm.startPrank(deployer); + _testInsertSubjectTemplate(); + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + vm.stopPrank(); + + assertEq( + emailAuth.usedNullifiers(emailAuthMsg.proof.emailNullifier), + false + ); + assertEq(emailAuth.lastTimestamp(), 0); + + // Set masked subject length to 606, which should be 605 or less defined in the verifier. + emailAuthMsg.proof.maskedSubject = string(new bytes(606)); + + vm.startPrank(deployer); + vm.expectRevert(bytes("invalid masked subject length")); + emailAuth.authEmail(emailAuthMsg); + vm.stopPrank(); + } + + function testExpectRevertAuthEmailInvalidSizeOfTheSkippedSubjectPrefix() public { + vm.startPrank(deployer); + _testInsertSubjectTemplate(); + EmailAuthMsg memory emailAuthMsg = buildEmailAuthMsg(); + vm.stopPrank(); + + assertEq( + emailAuth.usedNullifiers(emailAuthMsg.proof.emailNullifier), + false + ); + assertEq(emailAuth.lastTimestamp(), 0); + + // Set skipped subject prefix length to 605, it should be less than 605. + emailAuthMsg.skipedSubjectPrefix = 605; + + vm.startPrank(deployer); + vm.expectRevert(bytes("invalid size of the skipped subject prefix")); + emailAuth.authEmail(emailAuthMsg); + vm.stopPrank(); + } + function testSetTimestampCheckEnabled() public { vm.startPrank(deployer); diff --git a/packages/contracts/test/Integration.t.sol b/packages/contracts/test/Integration.t.sol index f02f3a9..b17fc0c 100644 --- a/packages/contracts/test/Integration.t.sol +++ b/packages/contracts/test/Integration.t.sol @@ -13,6 +13,7 @@ import "../src/utils/ECDSAOwnedDKIMRegistry.sol"; import "./helpers/SimpleWallet.sol"; import "./helpers/RecoveryController.sol"; import "forge-std/console.sol"; +import "../src/utils/ZKSyncCreate2Factory.sol"; contract IntegrationTest is Test { using Strings for *; @@ -37,16 +38,8 @@ contract IntegrationTest is Test { 0x0ea9c777dc7110e5a9e89b13f0cfc540e3845ba120b2b6dc24024d61488d4788; uint256 startTimestamp = 1723443691; // September 11, 2024, 17:34:51 UTC - bool isZksync = false; - function setUp() public { - if (block.chainid == 300) { - vm.createSelectFork("https://sepolia.era.zksync.dev"); - isZksync = true; - } else { - vm.createSelectFork("https://mainnet.base.org"); - isZksync = false; - } + vm.createSelectFork("https://mainnet.base.org"); vm.warp(startTimestamp); @@ -95,6 +88,11 @@ contract IntegrationTest is Test { console.log("emailAuthImpl"); console.logAddress(address(emailAuthImpl)); + // Create zkSync Factory + ZKSyncCreate2Factory factoryImpl = new ZKSyncCreate2Factory(); + console.log("factoryImpl"); + console.logAddress(address(factoryImpl)); + // Create RecoveryController as EmailAccountRecovery implementation RecoveryController recoveryControllerImpl = new RecoveryController(); ERC1967Proxy recoveryControllerProxy = new ERC1967Proxy( @@ -141,17 +139,10 @@ contract IntegrationTest is Test { vm.deal(address(relayer), 1 ether); console.log("SimpleWallet is at ", address(simpleWallet)); - if (isZksync) { - assertEq( - address(simpleWallet), - 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 - ); - } else { - assertEq( - address(simpleWallet), - 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A - ); - } + assertEq( + address(simpleWallet), + 0xeb8E21A363Dce22ff6057dEEF7c074062037F571 + ); address simpleWalletOwner = simpleWallet.owner(); // Verify the email proof for acceptance @@ -184,13 +175,8 @@ contract IntegrationTest is Test { emailProof.domainName = "gmail.com"; emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9])); emailProof.timestamp = vm.parseUint(pubSignals[11]); - if (isZksync) { - emailProof - .maskedSubject = "Accept guardian request for 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4"; - } else { - emailProof - .maskedSubject = "Accept guardian request for 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A"; - } + emailProof + .maskedSubject = "Accept guardian request for 0xeb8E21A363Dce22ff6057dEEF7c074062037F571"; emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32])); accountSalt = emailProof.accountSalt; @@ -268,15 +254,10 @@ contract IntegrationTest is Test { emailProof.domainName = "gmail.com"; emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9])); emailProof.timestamp = vm.parseUint(pubSignals[11]); - + // 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 is account 9 - if (isZksync) { - emailProof - .maskedSubject = "Set the new signer of 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; - } else { - emailProof - .maskedSubject = "Set the new signer of 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; - } + emailProof + .maskedSubject = "Set the new signer of 0xeb8E21A363Dce22ff6057dEEF7c074062037F571 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32])); diff --git a/packages/contracts/test/IntegrationZKSync.t.sol b/packages/contracts/test/IntegrationZKSync.t.sol new file mode 100644 index 0000000..f30cc72 --- /dev/null +++ b/packages/contracts/test/IntegrationZKSync.t.sol @@ -0,0 +1,377 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import "forge-std/Test.sol"; +import "forge-std/console.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import "@zk-email/contracts/DKIMRegistry.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "../src/EmailAuth.sol"; +import "../src/utils/Verifier.sol"; +import "../src/utils/ECDSAOwnedDKIMRegistry.sol"; +import "./helpers/SimpleWallet.sol"; +import "./helpers/RecoveryControllerZKSync.sol"; +import "forge-std/console.sol"; +import "../src/utils/ZKSyncCreate2Factory.sol"; + +contract IntegrationZKSyncTest is Test { + using Strings for *; + using console for *; + + EmailAuth emailAuth; + Verifier verifier; + ECDSAOwnedDKIMRegistry dkim; + + RecoveryControllerZKSync recoveryControllerZKSync; + SimpleWallet simpleWallet; + + address deployer = vm.addr(1); + address receiver = vm.addr(2); + address guardian = vm.addr(3); + address relayer = deployer; + + bytes32 accountSalt; + string selector = "12345"; + string domainName = "gmail.com"; + bytes32 publicKeyHash = + 0x0ea9c777dc7110e5a9e89b13f0cfc540e3845ba120b2b6dc24024d61488d4788; + uint256 startTimestamp = 1723443691; // September 11, 2024, 17:34:51 UTC + + function setUp() public { + vm.createSelectFork("http://127.0.0.1:8011"); + + vm.warp(startTimestamp); + + vm.startPrank(deployer); + address signer = deployer; + + // Create DKIM registry + { + ECDSAOwnedDKIMRegistry ecdsaDkimImpl = new ECDSAOwnedDKIMRegistry(); + ERC1967Proxy ecdsaDkimProxy = new ERC1967Proxy( + address(ecdsaDkimImpl), + abi.encodeCall(ecdsaDkimImpl.initialize, (msg.sender, signer)) + ); + dkim = ECDSAOwnedDKIMRegistry(address(ecdsaDkimProxy)); + } + string memory signedMsg = dkim.computeSignedMsg( + dkim.SET_PREFIX(), + selector, + domainName, + publicKeyHash + ); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash( + bytes(signedMsg) + ); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); + bytes memory signature = abi.encodePacked(r, s, v); + dkim.setDKIMPublicKeyHash( + selector, + domainName, + publicKeyHash, + signature + ); + + // Create Verifier + { + Verifier verifierImpl = new Verifier(); + ERC1967Proxy verifierProxy = new ERC1967Proxy( + address(verifierImpl), + abi.encodeCall(verifierImpl.initialize, (msg.sender)) + ); + verifier = Verifier(address(verifierProxy)); + } + + // Create EmailAuth + EmailAuth emailAuthImpl = new EmailAuth(); + console.log("emailAuthImpl"); + console.logAddress(address(emailAuthImpl)); + + // Create zkSync Factory + ZKSyncCreate2Factory factoryImpl = new ZKSyncCreate2Factory(); + console.log("factoryImpl"); + console.logAddress(address(factoryImpl)); + + // Create RecoveryController as EmailAccountRecovery implementation + RecoveryControllerZKSync recoveryControllerZKSyncImpl = new RecoveryControllerZKSync(); + ERC1967Proxy recoveryControllerZKSyncProxy = new ERC1967Proxy( + address(recoveryControllerZKSyncImpl), + abi.encodeCall( + recoveryControllerZKSyncImpl.initialize, + ( + signer, + address(verifier), + address(dkim), + address(emailAuthImpl), + address(factoryImpl) + ) + ) + ); + recoveryControllerZKSync = RecoveryControllerZKSync( + payable(address(recoveryControllerZKSyncProxy)) + ); + + // Create SimpleWallet as EmailAccountRecovery implementation + SimpleWallet simpleWalletImpl = new SimpleWallet(); + ERC1967Proxy simpleWalletProxy = new ERC1967Proxy( + address(simpleWalletImpl), + abi.encodeCall( + simpleWalletImpl.initialize, + (signer, address(recoveryControllerZKSync)) + ) + ); + simpleWallet = SimpleWallet(payable(address(simpleWalletProxy))); + // console.log( + // "emailAuthImplementation", + // simpleWallet.emailAuthImplementation() + // ); + + vm.stopPrank(); + } + + function testIntegration_Account_Recovery_ZkSync() public { + console.log("testIntegration_Account_Recovery_ZKSync"); + + bytes32 accountCode = 0x1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54; + uint templateIdx = 0; + + vm.startPrank(relayer); + vm.deal(address(relayer), 1 ether); + + console.log("SimpleWallet is at ", address(simpleWallet)); + assertEq( + address(simpleWallet), + 0x7c5E4b26643682AF77A196781A851c9Fe769472d + ); + address simpleWalletOwner = simpleWallet.owner(); + + // Verify the email proof for acceptance + string[] memory inputGenerationInput = new string[](3); + inputGenerationInput[0] = string.concat( + vm.projectRoot(), + "/test/bin/accept.sh" + ); + inputGenerationInput[1] = string.concat( + vm.projectRoot(), + "/test/emails/", + block.chainid.toString(), + "/accept.eml" + ); + inputGenerationInput[2] = uint256(accountCode).toHexString(32); + vm.ffi(inputGenerationInput); + + string memory publicInputFile = vm.readFile( + string.concat( + vm.projectRoot(), + "/test/build_integration/email_auth_public.json" + ) + ); + string[] memory pubSignals = abi.decode( + vm.parseJson(publicInputFile), + (string[]) + ); + + EmailProof memory emailProof; + emailProof.domainName = "gmail.com"; + emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9])); + emailProof.timestamp = vm.parseUint(pubSignals[11]); + emailProof + .maskedSubject = "Accept guardian request for 0x7c5E4b26643682AF77A196781A851c9Fe769472d"; + emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); + emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32])); + accountSalt = emailProof.accountSalt; + emailProof.isCodeExist = vm.parseUint(pubSignals[33]) == 1; + emailProof.proof = proofToBytes( + string.concat( + vm.projectRoot(), + "/test/build_integration/email_auth_proof.json" + ) + ); + + console.log("dkim public key hash: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[9]))); + console.log("email nullifier: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[10]))); + console.log("timestamp: ", vm.parseUint(pubSignals[11])); + console.log("account salt: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[32]))); + console.log("is code exist: ", vm.parseUint(pubSignals[33])); + + // Call Request guardian -> GuardianStatus.REQUESTED + guardian = recoveryControllerZKSync.computeEmailAuthAddress( + address(simpleWallet), + accountSalt + ); + recoveryControllerZKSync.requestGuardian(guardian); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.REQUESTED, + "GuardianStatus should be REQUESTED" + ); + + // Call handleAcceptance -> GuardianStatus.ACCEPTED + bytes[] memory subjectParamsForAcceptance = new bytes[](1); + subjectParamsForAcceptance[0] = abi.encode(address(simpleWallet)); + EmailAuthMsg memory emailAuthMsg = EmailAuthMsg({ + templateId: recoveryControllerZKSync.computeAcceptanceTemplateId( + templateIdx + ), + subjectParams: subjectParamsForAcceptance, + skipedSubjectPrefix: 0, + proof: emailProof + }); + recoveryControllerZKSync.handleAcceptance(emailAuthMsg, templateIdx); + require( + recoveryControllerZKSync.guardians(guardian) == + RecoveryControllerZKSync.GuardianStatus.ACCEPTED, + "GuardianStatus should be ACCEPTED" + ); + + // Verify the email proof for recovery + inputGenerationInput = new string[](3); + inputGenerationInput[0] = string.concat( + vm.projectRoot(), + "/test/bin/recovery.sh" + ); + inputGenerationInput[1] = string.concat( + vm.projectRoot(), + "/test/emails/", + block.chainid.toString(), + "/recovery.eml" + ); + inputGenerationInput[2] = uint256(accountCode).toHexString(32); + vm.ffi(inputGenerationInput); + + publicInputFile = vm.readFile( + string.concat( + vm.projectRoot(), + "/test/build_integration/email_auth_public.json" + ) + ); + pubSignals = abi.decode(vm.parseJson(publicInputFile), (string[])); + + // EmailProof memory emailProof; + emailProof.domainName = "gmail.com"; + emailProof.publicKeyHash = bytes32(vm.parseUint(pubSignals[9])); + emailProof.timestamp = vm.parseUint(pubSignals[11]); + + // 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 is account 9 + emailProof + .maskedSubject = "Set the new signer of 0x7c5E4b26643682AF77A196781A851c9Fe769472d to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; + + emailProof.emailNullifier = bytes32(vm.parseUint(pubSignals[10])); + emailProof.accountSalt = bytes32(vm.parseUint(pubSignals[32])); + require( + emailProof.accountSalt == accountSalt, + "accountSalt should be the same" + ); + emailProof.isCodeExist = vm.parseUint(pubSignals[33]) == 1; + emailProof.proof = proofToBytes( + string.concat( + vm.projectRoot(), + "/test/build_integration/email_auth_proof.json" + ) + ); + + console.log("dkim public key hash: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[9]))); + console.log("email nullifier: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[10]))); + console.log("timestamp: ", vm.parseUint(pubSignals[11])); + console.log("account salt: "); + console.logBytes32(bytes32(vm.parseUint(pubSignals[32]))); + console.log("is code exist: ", vm.parseUint(pubSignals[33])); + + // Call handleRecovery -> isRecovering = true; + bytes[] memory subjectParamsForRecovery = new bytes[](2); + subjectParamsForRecovery[0] = abi.encode(address(simpleWallet)); + subjectParamsForRecovery[1] = abi.encode( + address(0xa0Ee7A142d267C1f36714E4a8F75612F20a79720) + ); + emailAuthMsg = EmailAuthMsg({ + templateId: recoveryControllerZKSync.computeRecoveryTemplateId( + templateIdx + ), + subjectParams: subjectParamsForRecovery, + skipedSubjectPrefix: 0, + proof: emailProof + }); + recoveryControllerZKSync.handleRecovery(emailAuthMsg, templateIdx); + require( + recoveryControllerZKSync.isRecovering(address(simpleWallet)), + "isRecovering should be set" + ); + require( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ) == 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720, + "newSignerCandidate should be set" + ); + require( + recoveryControllerZKSync.currentTimelockOfAccount(address(simpleWallet)) > + 0, + "timelock should be set" + ); + require( + simpleWallet.owner() == simpleWalletOwner, + "simpleWallet owner should be old one" + ); + + // Call completeRecovery + // Warp at 3 days + 10 seconds later + vm.warp(startTimestamp + (3 * 24 * 60 * 60) + 10); + recoveryControllerZKSync.completeRecovery( + address(simpleWallet), + new bytes(0) + ); + console.log("simpleWallet owner: ", simpleWallet.owner()); + require( + !recoveryControllerZKSync.isRecovering(address(simpleWallet)), + "isRecovering should be reset" + ); + require( + recoveryControllerZKSync.newSignerCandidateOfAccount( + address(simpleWallet) + ) == address(0), + "newSignerCandidate should be reset" + ); + require( + recoveryControllerZKSync.currentTimelockOfAccount( + address(simpleWallet) + ) == 0, + "timelock should be reset" + ); + require( + simpleWallet.owner() == 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720, + "simpleWallet owner should be new one" + ); + vm.stopPrank(); + } + + function proofToBytes( + string memory proofPath + ) internal view returns (bytes memory) { + string memory proofFile = vm.readFile(proofPath); + string[] memory pi_a = abi.decode( + vm.parseJson(proofFile, ".pi_a"), + (string[]) + ); + uint256[2] memory pA = [vm.parseUint(pi_a[0]), vm.parseUint(pi_a[1])]; + string[][] memory pi_b = abi.decode( + vm.parseJson(proofFile, ".pi_b"), + (string[][]) + ); + uint256[2][2] memory pB = [ + [vm.parseUint(pi_b[0][1]), vm.parseUint(pi_b[0][0])], + [vm.parseUint(pi_b[1][1]), vm.parseUint(pi_b[1][0])] + ]; + string[] memory pi_c = abi.decode( + vm.parseJson(proofFile, ".pi_c"), + (string[]) + ); + uint256[2] memory pC = [vm.parseUint(pi_c[0]), vm.parseUint(pi_c[1])]; + bytes memory proof = abi.encode(pA, pB, pC); + return proof; + } +} diff --git a/packages/contracts/test/emails/300/accept.eml b/packages/contracts/test/emails/300/accept.eml index f7340ad..7e10ce7 100644 --- a/packages/contracts/test/emails/300/accept.eml +++ b/packages/contracts/test/emails/300/accept.eml @@ -1,90 +1,90 @@ Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1312972ecu; - Mon, 12 Aug 2024 07:26:02 -0700 (PDT) -X-Received: by 2002:a05:6214:4388:b0:6b0:90b4:1ca9 with SMTP id 6a1803df08f44-6bf4f66c992mr4233056d6.6.1723472762703; - Mon, 12 Aug 2024 07:26:02 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723472762; cv=none; +Received: by 2002:a05:6400:2670:b0:264:9270:cc66 with SMTP id jy48csp750570ecb; + Wed, 28 Aug 2024 00:53:22 -0700 (PDT) +X-Received: by 2002:a05:6214:5b0a:b0:6bf:8cb9:420 with SMTP id 6a1803df08f44-6c3362e69d4mr13631006d6.28.1724831602260; + Wed, 28 Aug 2024 00:53:22 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1724831602; cv=none; d=google.com; s=arc-20160816; - b=vcvdTjMIx6jVaoyYdgwc/lQQLkGzwzJkejj++NHvdRMrTAUrmBcq4P3uRlETlg4QI/ - YZ5UTmDkqn+nsu0P1zNU9zoe8CiQk6bJQnaKsEqN2o6GAVf28p1K2b5HGxYYjbwPPjns - pVrwGO4oV3m91G7tDoKAcHTJ02K1yz4Ge7uOQd2LF3c8a/6m4PIxCD30+5gg1/qWjAfk - Obt40LmhxX4/yfqcuWf0F3SdXl3krrABX343FDLAewOw07JQwQHIQlBY+Y+2qolt0Grc - xuLA3sOJVUC5uNOaDJzA1G4TisX9DIL/tfjweqF/d9Q5va13JvruTptBqRowwilXqX5P - CLZw== + b=XHYkOsPNkoh6Z/JlWBpmbftiVMlvTrQleXhtrViXaWIdnKIvwTAPXdaICvrHd/Gx6P + 3oVxnHb8Cuhi3cJ+ctMJ40RfT+f2+DRWXG2Csihny9ayIWeJ4mhPEy1Y6ZXkCEr3Gud8 + mVeHCXLthekdgQly8uhWxC6vn3wXtCEvx49iJM0gyfcyAI4Nt1eYDS0hr2gH6XNY4F+Q + mEiHfFbZj6s95egRsp2ZipfGz7yojKoKDTUWupDDPF4YpM9TxHrKyqVhk7mgT5PHaAWm + xkgUr8fWf+2/a+ini06UovznocNQCwGEHbRyPcIQ8SssjV21Xh0P3vwUSdKQKZYJJvTD + wUIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=dAcGAR4My5Lv5E1hBYZpLjIn3d3hkexlA4mfbt+aoNg=; + bh=wfoUswYdacWo98C2NPNyTM5htDNHLSMk6+9pc8+wtuY=; fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=id73VLGPEdCHON1/1BV42acaxe0SQj63bwZMLiqIPI/ull9ayrGcrO77bSO37r2v1t - XiP4Bnb+5+EmBOOno3mOJwwlE5F+MoD1OXJOtYnaRw/wsjz0x4O+OYyfFL9v7SPkfQDV - NhjnFbxOyrXs9rfsfi79misBR4LUmJQCdgiLs+9QWDUq0ckYtOrXJUs6fke3yijTZEkm - +oECBc4vh5apTkfJXlerRzjRD8UQUdPfHW5lO3/JHRJj4MIgumabeb97gcBoh++VcEZO - qTX8uOx0/j+0fl/Qz1WPnKEsHlN/OitzCbDxjZ4KiIYSGKM13Jm0rEwmQl3fkaP2zeZK - be9g==; + b=H8LtD87fAH1qc7wN2hssgsTYQ10genWfiNzNwL+379b1AP/AMubRu3Ekep9uRlkgle + K7AUiX3xkCtX0jmtFAm4EgRqByv9EgAaedHzXbrc/jOBWUq7g0zJM+uk6QffM7ETNNvt + aI263gbooi401SQK+epiPYQ+yF4nXX6cNidm/HyGR0LzxEKWio3NPblQUxihlUKbwN/T + 4MWYgM18G4/ebFrdkbe9707tKHDK6P/BuK9P4mWH6DJwHmGVK40Pyu7xKCtr0/L74/Zu + U04dV6Rho5On1vS0fiEjdhSJdQ5Co1UkyMhn2s8Oalxk9pm95yN6EIcMM+81l2l6dI4+ + GkbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=AbjyPZA+; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=kOFwnIGQ; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 6a1803df08f44-6bd82e7d133sor35657466d6.10.2024.08.12.07.26.02 + by mx.google.com with SMTPS id 6a1803df08f44-6c162e8aa5dsor71159546d6.9.2024.08.28.00.53.22 for (Google Transport Security); - Mon, 12 Aug 2024 07:26:02 -0700 (PDT) + Wed, 28 Aug 2024 00:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=AbjyPZA+; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=kOFwnIGQ; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723472762; x=1724077562; dara=google.com; + d=gmail.com; s=20230601; t=1724831601; x=1725436401; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; - bh=dAcGAR4My5Lv5E1hBYZpLjIn3d3hkexlA4mfbt+aoNg=; - b=AbjyPZA+Xu7/aQThoDilu0ukN07IBlywWk8F4S+yMXD6q+GOaXB90gTU2subhJts26 - H5SYRTNnvcXMqPOJtb88TzynpxUpej5DLR48ROGtpR7X3q1iQQyRRRZFEUOSS6Utxt7D - S1Jwx2kGOu/OSN3xamxMyuAWoi7ikWQJSjJ9g/b2IWmIly9v2FE+gl8doPPrZCumR3/F - 1WwDcqh6aL0MLgUPy5Uz+FVlU4aK3Md2SFKDRipW9whWoxun6dSjCHMLiZZSL0bV/ZHJ - loxolU3peA+0YhVd/Q7ZISaQ4DTg/qjNtVI6OmK09P475EhMNX39et6189GgbwVndGFq - hgCw== + bh=wfoUswYdacWo98C2NPNyTM5htDNHLSMk6+9pc8+wtuY=; + b=kOFwnIGQ8CiIR0+qd/kNcIr9AyL0k/UMnrM2nWMnTJPHgOVyYzJt1v9dGuP1MqNvrA + kHAigFUd6kPv6vYZna755EG9ciFpvWXvdb0IgigVfKH35jBxKA2kTdGfbgkfHlZA3KSj + fwsytkQrkSVFpp/5ZuOIZ7WWqRbLYjJ75ICYYjmzpCQwjAA6MDpMvSpYHOlxmXxBzE+c + 9VPDfEIhD8HsVMgTB3NSYRPkSX7M8Sl3aFOUWhNW6KU7W5yqgNXq28P2PiyiFGzsh2B3 + dTx6SR/HadkLihJGpkC5C8qNgeCoUf1crLTNjbGESClqzNHIyjJ5Q6wt3MuKlgu80olN + xJmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723472762; x=1724077562; + d=1e100.net; s=20230601; t=1724831601; x=1725436401; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=dAcGAR4My5Lv5E1hBYZpLjIn3d3hkexlA4mfbt+aoNg=; - b=Q8hiZxgOauaTndhqxya7bEZJoH/1U8K7nrW/yizA+fUpTGrejdh3/SfmTb/OJNHpZQ - fTsGJqEHEDIhJds1PdK6/qbMD/C1OY88BVScJ/UauzGid9Gis9AbpmwzOARnhV8+HgaL - kWQBl36PHOhbXtaX8UxEQrk7jE83lgXqvDVjdcE618P505L92eT+EzTCM+jWB3ShAK7i - 92e57Qr7M4JhLIj/W0BUoRjEDl7GEpjv4uLeHoIPONI9UOt7rYlKTEZtBJuCCt8I5tuO - zMY2T2QYcOASwc2TCWJ3rijf8WZaoxpSK4cJFtq7Drz8xSFHPfdcIc+onRVF5wQbVEbm - eZGg== -X-Gm-Message-State: AOJu0Yw7LeKO/8TWPHdDWwfvkXjVBzc7O37fDC2MDvtMq/djeJ1X+zXy - t90nn2xwzgEV3VUxU4CsA3Dfz4sJgUtgwkhOseIQ5pWRGWJc2DEOHZaqosy+EKtcd74uRf9Z4O/ - oBDfsRhNOdyvhHyJqjnkmedzxZN/y -X-Google-Smtp-Source: AGHT+IFMoDCfSFZzXjpvIXfeTd4IrAJgBhwtjJEGUhl8i59puhKhpNeQizDSDGG/AOZxbcx06wG5xnYU/yO39Qn8VJ0= -X-Received: by 2002:a05:6214:5f0b:b0:6b7:980b:e0ac with SMTP id - 6a1803df08f44-6bf4f7e2315mr3150516d6.32.1723472761940; Mon, 12 Aug 2024 - 07:26:01 -0700 (PDT) + bh=wfoUswYdacWo98C2NPNyTM5htDNHLSMk6+9pc8+wtuY=; + b=P8nKrBqskVA91k6q3XbmEdSc5BVCGGg2Utz+Ire/PS7MN3jnT1sQ5HxVqnWq/HiiDS + tVz4/wRFtUDmkkCNEzQ4DzLr2674IcS+vQ23hRaovrYEKos9yu2TKyV9xtNI/+zP3NNU + BmtuwCazEpMzK1BmOZ4NDX+Jd3DAha1uodiTxyfmKNxpoVg1QTluPlKtWALVc56Rk2tT + sGZXH6rpDalEF32vsi4hcGj7sA9n7pZIexLtjd1BZSILtJ0c0ImA2yyZIJwotFV/7Yn4 + DvC0VgQj5dtdrSI707fhUYXPZ+z1tEaVtINPNKz7X9Cy7TmTZ8dOdj05DaTA4eCixgFM + mgPQ== +X-Gm-Message-State: AOJu0YwrGQCEe9+PJ6Zepa+H3q3Cq2LyydJZATE3K+17Co3Iom94DUhW + vD7YwjhQbaLqC1niaQEOlycvMfVNNnTluvbVzbuYqqE/Kk5SBwcM7zJBcW5OBmSMV81PM0fPTWK + mLt1/FTNquOh5CWZ8GAsjw2p44F0k +X-Google-Smtp-Source: AGHT+IF9+HGRRMj6SjPxYPjB7WJiyoxKQSEitAal6QSa9IbQzWwfeh3hSAdLj9EMUwnFSJLGcixB1gy28cyAeKaW51A= +X-Received: by 2002:a05:6214:4306:b0:6bf:7474:348f with SMTP id + 6a1803df08f44-6c3362d2fa8mr9836466d6.21.1724831601609; Wed, 28 Aug 2024 + 00:53:21 -0700 (PDT) MIME-Version: 1.0 From: "emailwallet.relayer.2" -Date: Mon, 12 Aug 2024 23:25:51 +0900 -Message-ID: -Subject: Accept guardian request for 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 +Date: Wed, 28 Aug 2024 16:53:10 +0900 +Message-ID: +Subject: Accept guardian request for 0x7c5E4b26643682AF77A196781A851c9Fe769472d Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="000000000000c1738a061f7d45eb" +Content-Type: multipart/alternative; boundary="000000000000e9559a0620b9a62f" ---000000000000c1738a061f7d45eb +--000000000000e9559a0620b9a62f Content-Type: text/plain; charset="UTF-8" ---000000000000c1738a061f7d45eb +--000000000000e9559a0620b9a62f Content-Type: text/html; charset="UTF-8"

---000000000000c1738a061f7d45eb-- +--000000000000e9559a0620b9a62f-- diff --git a/packages/contracts/test/emails/300/recovery.eml b/packages/contracts/test/emails/300/recovery.eml index 59d1362..5b79541 100644 --- a/packages/contracts/test/emails/300/recovery.eml +++ b/packages/contracts/test/emails/300/recovery.eml @@ -1,90 +1,90 @@ Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1314270ecu; - Mon, 12 Aug 2024 07:28:30 -0700 (PDT) -X-Received: by 2002:a05:6902:2082:b0:e0e:cb25:c40f with SMTP id 3f1490d57ef6-e113d27bb49mr644234276.37.1723472910560; - Mon, 12 Aug 2024 07:28:30 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723472910; cv=none; +Received: by 2002:a05:6400:2670:b0:264:9270:cc66 with SMTP id jy48csp750751ecb; + Wed, 28 Aug 2024 00:54:02 -0700 (PDT) +X-Received: by 2002:a05:6102:26c9:b0:492:a9f8:4a71 with SMTP id ada2fe7eead31-49a4ed30da9mr1309811137.8.1724831642136; + Wed, 28 Aug 2024 00:54:02 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1724831642; cv=none; d=google.com; s=arc-20160816; - b=CatZtuL6lj1FU5iyQZyRHoqbpEJgvWil6eq/wWz0NfA0iY8NgqUqTOFdBHXF0phsI+ - a0uuFKHnOVJboPJbKEsQGFL1EIM2XNUP65EdUzHDqH4s/d4bl27bxRScMp1DExVM3SoG - tq+7XKb01CGjK4ydT90FhmIEWyHG7wEFDJaOqSUAjiG6V7wEkj5eXuiFPQqVWpQWrdlf - 0Pno03YAhrqPow5jhbTwG0hXl/F4OXtXU+jaO2QKIZJ2bB8eFFcHVsOHSsw5M7gjIZ13 - s2blLt12Fbzy8sX906g0Gr+zHMB67EwzM80GZoip05s8T5L1K+54e69iujlfjJGOcjVJ - P1nA== + b=cpTbX87GQyaBGaVXbNadJs8tRJ3H6JwDzUCyAR6zbLifi7OvRIHe/CqXAdOjD88MEN + S5Vri34IQ0pQX+/0KPKejM0sKlvuQXSca6+H87JzalG4kkXOChT58Wjm5zrWcY9Xslh5 + s275+Zh5T6gx7IBZZZtXLcOgtRgZgsHhpF2DkzgSiRh1FtJC35ewsspFC1VtqWZqUAZh + +41nK1p++/vFWBqpB3YZXSdWFDGsyJ7QtHFfi3vG/x8b/h6c4vHrvT0zx5lDwZB+YmV+ + xXROwXhRH2ND5375vtZz8OyfaQHhY43HVSP4dOfrHgeUbtVzcQiYW+SR3Q6FPHCUqStc + EycQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=KcwTRtPiKk2j+vxpSLodKakyPE1kwRe/deHc2g8j5Bo=; + bh=IehaSA/JR4L/KX7NlPKK5B7zTFO/0C8UNbHTPhhIN84=; fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=eRHm8dXx/CK2Dme025d2LDa51KZFZ5K5XhH/ffIUFez1PV5nYn/bNewv8L8ZiE5/xd - 7zh/wtjB95Wv4BXabZ+hFgMb9KDcBWoz5E17LN/FgvNuV+E7wHALYvCQm9lGYR5qfw/G - GU4QyoX5m/a7OVw2eiG+9+kF1x6mVGZsY208Yc272/RSQrfau0qQCQCACAM/EEMCwdvL - tXPSF80JlkyznrF7HDkl0zdy7D0+oYXYlluZIadDSd0S2GiqoYkD91be+xSh7GRl1c/9 - nbsJV8ifeOlXLIMuYg9rWO1Ii0fmfp6OGrLEPvkTyBIReWs552JuX1ALXXAG2qz8qVxG - kAGw==; + b=OUQ5TcZbiTNRl396nTBZH0uojnYZfc5tChwa5yntVLuQouy9qXfZXnKWHKNwRb/MiT + P2sVT7nG4DDbzSMdsOi7fG06vsBJfq4Oetaco5s1zyL7T7dCC0L4PnwJ2sRQbpSoh/Zb + YAknwfYkp1F0bjeYw2HBdfqlT93kzDLe7sI6zk2uADL1gp9oUMzKpotSMIrbzBIX6nGv + 26ASehd6ceNdxqCKCFCagi8WOuQQBNjN8E+G2m+7Zx1YjGif1LTgmzh6RxtpYT/M02gW + 4eidLLTEv6bQzFwKo9rwJq3iD1A9H9HESrEJGGWjAd5dTDxOLRQXge3igywzFjOnwPq0 + 9huw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kDV3WaYT; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=XTkwK+MJ; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 3f1490d57ef6-e0ec8ba44efsor3812256276.2.2024.08.12.07.28.30 + by mx.google.com with SMTPS id ada2fe7eead31-498e47e8b90sor1864165137.5.2024.08.28.00.54.02 for (Google Transport Security); - Mon, 12 Aug 2024 07:28:30 -0700 (PDT) + Wed, 28 Aug 2024 00:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kDV3WaYT; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=XTkwK+MJ; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723472910; x=1724077710; dara=google.com; + d=gmail.com; s=20230601; t=1724831641; x=1725436441; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; - bh=KcwTRtPiKk2j+vxpSLodKakyPE1kwRe/deHc2g8j5Bo=; - b=kDV3WaYTvmK4uve2kN1AAt12vmS7jERDYJMUCWnA0AUhwYCw3UZ1POGrTyH4w3kw8c - g9+zBmjo+5eAGncdODLkuU7yDtW6AbjHUa+vJUxYXiDyh0wYZMt908iS7WJ0lJ9PDwEN - 1aF6Uu+vdtbWRA/kVrU9hup/DP8Le1d6h0mKyge1pbPA6swJqUr0XRrJ5F5Hp0xf/y5M - PKXHCKDvvxf2tKKyD2TKmXm6R9yE4aWkGvMrNCumpUfk+w//uB3J+jtldBBH8fqhPl0Q - pmMePv4xfOgPyhV94TxmsMa2gyVLyKeN4QyKMcbDFFTT7IizvwHlNk3wTzWFFu1Gh0Iz - dWLA== + bh=IehaSA/JR4L/KX7NlPKK5B7zTFO/0C8UNbHTPhhIN84=; + b=XTkwK+MJbzJP7Sy/I5oNWMkuJ7jrQZc5ovy3+4meyBwreJFQ1+F5UZOtUKd1svPC+u + v3TNvLvzlUTeXHW7TujG7U2WOxNOqqyYF18mgBIRlw5FXtgjz9j+bbALp0fo61e7gKhS + PHiRPocLWJpLgsMFy5nHod39aqcLWv0uMkCzwveMnDzlZYQFVxEKotyumIHUKLPIj2DI + BhOM5LhSml1qRzpB3eKpXGzEaLnyesPrOQNPwKB4ZfiSaP3xPYNfeAZhwohVEBTigi0h + ZnrH0DwfaJ6P1UdTTfG1YPfY1qm8BpEi4qFrYUUeZL1fK341NNq0y08egz0R6Q/CPJKL + l0KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723472910; x=1724077710; + d=1e100.net; s=20230601; t=1724831641; x=1725436441; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=KcwTRtPiKk2j+vxpSLodKakyPE1kwRe/deHc2g8j5Bo=; - b=oOYZjv7O3cgWFRDTHsdDksv1YCNyim0fd1MAlCEfA3szcL/ZJ7mz0R/5Yn5nw1BaSw - 6Z3GArs0uRjMTaqt0e0N1ndFQszK9kyHMZcQl1yC87A0GLcNJsd3Qwdnj765sQ/eVZmZ - sYeKKN2gUXvUMNxi0nq+a46izWdgYuVGD1GsIrWG9Z4C7/5R9qitls5IdZISTqW5rgwS - 4uovtFP78jD5w48SO5pusBYRFdG1LDCXJCSChM+OVQQIlgAsBEFWHPMI6Qe2IDSWp4zo - r3Hz8qi7WKtqF7W+2u+HgMDncdTbebFChirFYY3mNz1GNJ1qf/ks1d6Mv9D0KX4AB0jG - XMeQ== -X-Gm-Message-State: AOJu0YzzxHkXhnzAC1IM5u8jXOGWk1Xzrjka0M17SqnYJOY/UBZyo1bS - PQeHJKUplBNXFONu83fwYnmugr6SmRpJATslK/OcLy/tpiTd7GleyRS4wD3i9aMIRWU4TkgIAbp - 2q75XCN63+yFL/igOfdzsk6oihLjG -X-Google-Smtp-Source: AGHT+IFAWN5D9YSAVPoZbZaChqpvELVXAJFi1kcX+rzDehga6v9dV16xiu4JOgws6BCv8zr0cZOa75ffs1puG6Llm3w= -X-Received: by 2002:a05:6902:188c:b0:e08:6ce9:6e8e with SMTP id - 3f1490d57ef6-e113cec32bcmr556650276.23.1723472909924; Mon, 12 Aug 2024 - 07:28:29 -0700 (PDT) + bh=IehaSA/JR4L/KX7NlPKK5B7zTFO/0C8UNbHTPhhIN84=; + b=tlCjTjy8XCtY9U/SDWIKjLwWqYynJdQR9tV9VMWBcf37cDm9UpUVw5Ey9aScTxPLq+ + gadkjTGfA6ljpL8UsTbM1A2/b296DjfVZ2bYiCzZ58z/Httf8lSd9nInC1Tmd0iRIm3O + 8L/X9hWHkcbPGm8EhXNRiUKNBAFxshxpr24+jE2gWoPa7FVUmD1uY/nlYKMRGvvARqkq + RGQ9qpCa8LnWEPyRsE8AaV/g16kksprSEOoZocT3bwL+r/4O+s45ZNEHn9X0jEFPmb4U + 18/92ludL29pZ/PYgmz39iKbTEucY/7lZz3oKq2iNmWZPVKSjEf5kfYKMzIycQauxeN8 + lBDw== +X-Gm-Message-State: AOJu0YwP8OnzV4z4jcMcybAydVxa6xFnitsmWGjgRtqw9ENgSBo5ki6u + RGO9v2uhgEZvUHgR0fuGEYNoi7DCCDKFWePFH0ZVWNRGylHSvGShhFUZfztJ/KnOeUFE3KO+JyG + 8/1vz6i+Tu9quIYwBMxTsxItL1LJD +X-Google-Smtp-Source: AGHT+IFGI8kUAMWkx4LUP4o9Lv0V2QzLQJZlC8zeOQeO/P2VdPkPSYJrFwDo+q0Ez3VMetqJIH7d4YaBQI3E5y+sAWA= +X-Received: by 2002:a05:6102:c0b:b0:498:e21c:cc66 with SMTP id + ada2fe7eead31-49a4ecd79bemr1392977137.6.1724831641483; Wed, 28 Aug 2024 + 00:54:01 -0700 (PDT) MIME-Version: 1.0 From: "emailwallet.relayer.2" -Date: Mon, 12 Aug 2024 23:28:18 +0900 -Message-ID: -Subject: Set the new signer of 0x05A78D3dB903a58B5FA373E07e5044B95B12aec4 to +Date: Wed, 28 Aug 2024 16:53:50 +0900 +Message-ID: +Subject: Set the new signer of 0x7c5E4b26643682AF77A196781A851c9Fe769472d to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="00000000000093925d061f7d4e6d" +Content-Type: multipart/alternative; boundary="00000000000049c5260620b9a9a6" ---00000000000093925d061f7d4e6d +--00000000000049c5260620b9a9a6 Content-Type: text/plain; charset="UTF-8" ---00000000000093925d061f7d4e6d +--00000000000049c5260620b9a9a6 Content-Type: text/html; charset="UTF-8"

---00000000000093925d061f7d4e6d-- +--00000000000049c5260620b9a9a6-- diff --git a/packages/contracts/test/emails/8453/accept.eml b/packages/contracts/test/emails/8453/accept.eml index b375f31..1cc21c9 100644 --- a/packages/contracts/test/emails/8453/accept.eml +++ b/packages/contracts/test/emails/8453/accept.eml @@ -1,90 +1,90 @@ Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1350796ecu; - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) -X-Received: by 2002:a05:6214:5701:b0:6bd:699c:59a with SMTP id 6a1803df08f44-6bf4f77408cmr8835936d6.19.1723476540630; - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723476540; cv=none; +Received: by 2002:a05:6400:28a:b0:271:da57:79 with SMTP id hs10csp865237ecb; + Sun, 8 Sep 2024 17:38:53 -0700 (PDT) +X-Received: by 2002:a05:6358:9143:b0:1b8:226a:2622 with SMTP id e5c5f4694b2df-1b84beaea04mr864194555d.21.1725842333641; + Sun, 08 Sep 2024 17:38:53 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725842333; cv=none; d=google.com; s=arc-20160816; - b=XdhAnSyVPNhLrcDkiFa14s5Ye+7nIVIoAZBrqep75GixiY6xhliTD29zzw41KvPHsQ - I9ZFk4IdAkNtD2PjJQ4urzKkvzU+S42rzKZCU8/91LvIoJbcUHMpQCuySQTGI+v8zDQc - DRsfTo1Gv2QmOkZhjb7kjgLh/ps7hn0BYXKru1JQToe55qfcFQ8HWWQo6CwLphwFhI+0 - 6c6aRCEcXDymNNYFMEOn8C/mKcvhs5gzSSwktfEZISHLYfAjz3mHP1h3sTnrN3TnfjGP - win5ATBLMi+5eVyKl6gN8ZYn0SwoIX86iK3GrfNcbJsO85rHD+MNzXjfvDzjI20Uq+F7 - aeEA== + b=Eo8FQDuq26qqB1YlOaTQ5KkpTWjMuduMUW/YTGvZXhX88eYKZsBZHO1Qgucz7eT4GP + lxiIeLbUjVkJU/kbWNOLusUabrsuMYm3UnOTVeiTZBX8LtHpy8/kWi72IiL0/wpszOB6 + M+CKFud0FgParMBL/FeowgITRN2lfSXXcrEFE7OJ46OUeZTkZH6o5klmAxRaP/WWnK7Q + Lv72Pleqdm7epcpoduR2K5V2t4WD/6hEhqFxkJQf3LfxOAIRYXX2brBpCKGNN7AmnMGJ + 1j4yTPYwX3FjSYBB0dFgRQpO7JqUQuoIWQWuE2IsFf8MowINFSOfzG2HGLCptV7GBdu8 + nR5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; + bh=u3BMBmOH3oo7W5+AST9Mudcc8sUjkyZ9Ee118Aw1hRA=; fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=mlpmuieLw84UB2iPZrDZeTHtIjSLX2bFQ7uVjcuSqdCeT0Ra8rKHub22VqEDagz6Hh - iQ0OTqs1Pytijcw0g1sHn0O3fw6sQZRTXDRkqtnct6HH5drcJGkd4jjpr9Pym1CQaxnC - SRL48K32C0g/zTL9uCXAWe+qBRlMYd02xg3JLsqBR3PvG2ADLFCnKLnTVudOTc8QUNAQ - hK8xa7nN47mIPV+2p2kv00aJmusOGc4UmDlfafYP5+t6KqJJ1abySEfEu6UQtsc+9boS - RAzuxHHgc4jiEpSakQciy4BKFA3DGJsua8fcIgEy1pnDCCfdqVfgeDpuoqsXE4YsRGcr - pO/A==; + b=S7CO2YA0iDfPdwyRITTdtNCwpPJQ8OA27yWCiXjsYME+l2C6U73hWlxoUbTO8XqTOL + sQEE4O8zwppLIWznAgRsdXQ5tvcJjn8J+hRO/sDeiGAfeMVyKOXBFWfGwUpbUHHBZ1wS + 6rS2zhzDcrjm6qmnqUY+AeptvSkeb46ECH+QIutZ3BU8iXIe6xYhf7XL/5AkoSrrrTf6 + 4gmti0p2vUJcV+Npyb7QHzcW+AjCFpLPtvkDXRJMHeFxKlMFiaiiugn7vOk1yjxCSaVn + ahfeCUgcBSwkAp03icM2nTpYCVr6Ou0/ZOS74+yal0VsHbQkKAk6Xr6qP4AwCowX0Sc/ + //0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kIs11UJs; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=RwyfZUyf; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 6a1803df08f44-6bd82e687b4sor32101386d6.6.2024.08.12.08.29.00 + by mx.google.com with SMTPS id af79cd13be357-7a9a7a73740sor176146885a.19.2024.09.08.17.38.53 for (Google Transport Security); - Mon, 12 Aug 2024 08:29:00 -0700 (PDT) + Sun, 08 Sep 2024 17:38:53 -0700 (PDT) Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=kIs11UJs; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=RwyfZUyf; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723476540; x=1724081340; dara=google.com; + d=gmail.com; s=20230601; t=1725842333; x=1726447133; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; - b=kIs11UJsGxLHYsxuMHUikbfKz4X+t4+pdLy8iy6luM0zplvFe24BecDYmohTiFPgLd - ydSOkbBiMJrfsCLqSQSL+La690rsmJz3hH2vWpXHCTxtq9IkOn539mD44EPyI0rpY2pX - +B8V5ppvlYb+PYVyEe1oKtdAw/9U3xgwF0FbBZOsXY9pcXlWe3LCkLHJHsnFThJqO4At - ZEmqakxkwBog3szCj+zStNc2TQKHfgTAIJ0IiC1Qcri8xHw9MZ9t7l8N7f2krGxg/i4q - mH+m5LgHwKiymhpRYpPh4pbXViyJt0ZPX+u8hVNYCu9fuTDw91FZ0h62kQCJU1Fo0gqn - CejQ== + bh=u3BMBmOH3oo7W5+AST9Mudcc8sUjkyZ9Ee118Aw1hRA=; + b=RwyfZUyfwOg5nNyFlHnCyClaJ27wgLGNekZls/hqRQSxYrc25H+aqdjBkpubBKuvpj + E0COKCv052KffeYVWD5/xcmIxNXpX7ZVv923i65P8ObFCVtt02qpyTarw2GYO9QXPtIa + roA2+VV0W7gEoQl1iSeQckJrRtt/9+nZwdZY/0/uAROHnOeKlvWjA4bikh74EZtjJg2E + jetr3A8eh2+yJ2EeXknJCZSX+QUpwJEjxnOju+tSiUH3ojAxjD9gnx86ZWVGSsaeUjP1 + +PlSjabZVDmkrOSq1HMj5fGpWCKDGQsvKa9MKLrwwzQBrEp0DE4TDhoR6TWN7znLdKgv + AXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723476540; x=1724081340; + d=1e100.net; s=20230601; t=1725842333; x=1726447133; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=Ha/3DDJ/u01tNH7woB7N10UkCTfbfA/y6SNGNbQZrno=; - b=dCAoi7QTorFaGLllgUbFtLy7SwjjfbmLv2b90AOFzOTDJwxKWuZcuRvIXtn+mNbkxr - R3DSQOVI4kyPn83avG5kJK9rQebgdluW8kRSqTTBGsewDkVoU++XlaH/5Fr4AycL+Jz2 - M4H29ErGv5YwfZVkVNchNrZ1wm9PzNmZDryNWfN8MVBSvCyz5rEzbSZYwfPKJ8jdNSpd - m5I4NQn0yaceCbnOvS+ymdLUfH/xsTUiDb12p5mFH1okiffoIH2kba51TERTFQ1cAXhT - 6x4oGqDLZ48Wa17J+Pebx22E4kc+qoT44rFbzLKx18UK7QvcDVY84a2rvDK/aHdl89nA - MFcA== -X-Gm-Message-State: AOJu0YxdgZ1gX+YYHJudxoob+1wT6ocah5PIbcqwrkCPA/V6E4p26Ebe - G3qU3UnP4g7Rw60WEroicxfHPklu7dQf0EY42VdDJY7ovlqVUmkTCk8otd8Qag0iY+gMCiaP/ab - 5oga2YGGxnm+5Z/FtzkFsnJunAyXQ -X-Google-Smtp-Source: AGHT+IGkhUwt1MpumPRZRv36hsu/nmBtHu3hbsTgn0LxixNgewuPT/XesalvK0ODiL5JhlA73CIktfloJw2rJAZnXDI= -X-Received: by 2002:a05:6214:4906:b0:6b0:6ad8:ebd8 with SMTP id - 6a1803df08f44-6bf4f644182mr6446666d6.7.1723476539846; Mon, 12 Aug 2024 - 08:28:59 -0700 (PDT) + bh=u3BMBmOH3oo7W5+AST9Mudcc8sUjkyZ9Ee118Aw1hRA=; + b=OEx1J3HwB0T1PRnrPhqrVXxq2fd4HehGlOGD8qyfS8tuRl6sdyKsrF+wgTVNyWcwCM + uY9ZRVCFTb5/2/Z9n6O8dRV9JWsnK7hb7NYSmD/s2zaPFtfTIYBafm5TW+3uaPjQ25Gf + /5sGy64lE5uOegFmf12PkWKIQwgs1ytMLQ/PN24tjIS142p6Fj2Ns1f1CvV6ySttUO7i + btVq9zrBUNrsB88II+0srbEnYVrMIspUp4bMXgLiRuRjU53tiIXoZe9QqZrY3ZT1SXvq + cURQ3X5zoMg2FIJT7qLyRG9xa8bbq+uaszbjE6n/AmxowT6VzPJebE12Z7wvvGKs0+qs + RfZw== +X-Gm-Message-State: AOJu0Yyf0PsSEn60KLTqdIQcs8o4LO7Pa3spSzQjW1mUOwM8e/WTWsW0 + Zqu6dlktj82yEUBmOe30+KU4qyJ/WS4/FFRyayQDHrEK7IZEZIsaGDdPQpcmIOx+d+ZhxJLePKe + xsurjVlEiLeE9Va+J0s6JwZm7dG3X +X-Google-Smtp-Source: AGHT+IElTLWDEBfxtyVnOba2cERBK6YgvSGie3f/wnb+tcjM9hAUxYGKZci+WQB/O7imoT0PysrYKS2H8UaDLXML0Ew= +X-Received: by 2002:a05:620a:1910:b0:79f:12fb:ed1 with SMTP id + af79cd13be357-7a9a38a8187mr646569985a.16.1725842332968; Sun, 08 Sep 2024 + 17:38:52 -0700 (PDT) MIME-Version: 1.0 From: "emailwallet.relayer.2" -Date: Tue, 13 Aug 2024 00:28:48 +0900 -Message-ID: -Subject: Accept guardian request for 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A +Date: Mon, 9 Sep 2024 09:38:42 +0900 +Message-ID: +Subject: Accept guardian request for 0xeb8E21A363Dce22ff6057dEEF7c074062037F571 Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="000000000000efbca3061f7e2677" +Content-Type: multipart/alternative; boundary="00000000000031f01c0621a4fbb6" ---000000000000efbca3061f7e2677 +--00000000000031f01c0621a4fbb6 Content-Type: text/plain; charset="UTF-8" ---000000000000efbca3061f7e2677 +--00000000000031f01c0621a4fbb6 Content-Type: text/html; charset="UTF-8"

---000000000000efbca3061f7e2677-- +--00000000000031f01c0621a4fbb6-- diff --git a/packages/contracts/test/emails/8453/recovery.eml b/packages/contracts/test/emails/8453/recovery.eml index 863f6dc..0be721c 100644 --- a/packages/contracts/test/emails/8453/recovery.eml +++ b/packages/contracts/test/emails/8453/recovery.eml @@ -1,90 +1,89 @@ Delivered-To: rrelayerbob@gmail.com -Received: by 2002:a50:45c6:0:b0:264:9270:cc66 with SMTP id c6csp1352251ecu; - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) -X-Received: by 2002:a05:6830:4408:b0:70c:92ee:5662 with SMTP id 46e09a7af769-70c9387b99amr648568a34.8.1723476687515; - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1723476687; cv=none; +Received: by 2002:a05:6400:28a:b0:271:da57:79 with SMTP id hs10csp865517ecb; + Sun, 8 Sep 2024 17:39:56 -0700 (PDT) +X-Received: by 2002:a05:6102:e0f:b0:49c:1bc:1eff with SMTP id ada2fe7eead31-49c01bc22femr2263104137.28.1725842396118; + Sun, 08 Sep 2024 17:39:56 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1725842396; cv=none; d=google.com; s=arc-20160816; - b=xyFntJJHcC6779isyMw1J3xYUdUTrZj6/MD+AekQSj09itt/i+0IEe/XFInOCFPtfC - igMeUXTqS8Thl3QFJzG7sxCMmxZy2/0WHllfJIEXBH+sX9lt/yh9eYc8Feqa+7c2fZB7 - qM5Rks4YQgxQY0clMnABdbLtR/tZt491WjLlUCKXn5tzdJjxmUUm/ttQIc6bJ/YwRRH3 - aBSRPeOMk4vbZ2sNpMbqYBWnVWx4t3xV2CREHYYxR69lWgOvGnYu77K55b0UEwxbJfaI - QN1Q1A3ianXG3ueN59RblMwEZ4ZwMtuKcJGXSEEqi1jaFU5DAD2EJ96jO3/XAeH900SA - 8A/w== + b=D41hDnFU3G2f/9wRCrVHNx7sasI4u/B06uRAaZgq+tOf6E/zpCTbGcMG2Qk83mFEIM + L00rZK/B4/akwHdjQW8Iel1GwfkdJNHEM+XGiEW6641RId75OwQC2kMG/m+fHakpBsLU + Xpcq4RjCaKJ1WqwkhYjrHxpH/ScVA1vp5sLVbHaymmFVYtC3ztYrVhyYnuKrUjgnAqdR + +PelC5UCIbuORBiLbdTc+cCzQIJV4OlI+u641PQJwrs67H2UrgZnyl6cXMcPNJrzXZiw + oKoD/mTHXGmPY+k6vO23OFy6fU63scpYc6i29ZIuseE2X6+CBodBAtPiYFmeK+hUxTDP + R1SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; + bh=mvDapCNNa9oKBO12XFAqF92pzaTTjGLTiE2clMtdRzM=; fh=OYPr0JdXtRRlM3Htj/E6+khbD9huvtdqkRTmPoW0wko=; - b=vR60Lc7tUDCe6GlR1SaaaWoAOGTdwNgkMnWjgKAGE9WpB74aE3EQtjogiEZ+tRxYub - 9RyptryjBvulXUfCmr6+YyBKUkQl9mGBNSGIP+JsmTeIC9UA/KN3kcrxG6zSHvbCjb5y - 7hXv0VM+ZQStzE8OBcliGaEqZ7NMDVSCBi/WuJ1cHkrGkQ+EcNA4RyzG1mx3iXmTyiro - WKp6c7Wt+t3tSxHM+INFVtu66IZw+Sygh3RE4nxMZlJDufoskGODe3Q2eb2jDEHjXs0k - TOJnmu6jun3rwnSN4BT8s12h/2s8Q+NUQRsWd+jbDxzSPtbrV8ovR2tC/QhcgwfKlPC0 - LfFA==; + b=a9iG6t8RdHTSDJrDnbsG10Kdnq2Es9QDHumVktkIoOi0UF2vf5YprDs0nj7OFSPoCc + nAZAZvIwB8fL4f+cqM+ZIWzFjplOY1tfspreWsfZkxDUrhKNUhhiuyVI3JkdY/BMeCJ2 + mim96jnyH3ckvBPgeJdiCkZWknstuQrce1CQyfp64rUB0WQ4MgdgyPYBLSrbc2ZfQo3r + jahYqae1lJTY37m29wLIMh/vix2SJutq47+/St2rIk59SpgTz3xIJSPKI76ovOBR3sbU + /PjYxt8wFw2eP0g/etqbGS1sxVdu4UMWDqXpCrEQ63bTlfgTpwrYMh9ugZNfG4kHxD96 + 3uAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=gKy07eeB; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=RfgErx0i; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) - by mx.google.com with SMTPS id 46e09a7af769-70c7b81de58sor2626987a34.8.2024.08.12.08.31.27 + by mx.google.com with SMTPS id af79cd13be357-7a9a7a296c5sor198986385a.15.2024.09.08.17.39.55 for (Google Transport Security); - Mon, 12 Aug 2024 08:31:27 -0700 (PDT) + Sun, 08 Sep 2024 17:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; - dkim=pass header.i=@gmail.com header.s=20230601 header.b=gKy07eeB; + dkim=pass header.i=@gmail.com header.s=20230601 header.b=RfgErx0i; spf=pass (google.com: domain of emailwalletrelayer987@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=emailwalletrelayer987@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1723476687; x=1724081487; dara=google.com; + d=gmail.com; s=20230601; t=1725842395; x=1726447195; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; - b=gKy07eeB8zGt9GomoXrr52dA1L7KPoEumb8M29aBNkLnOzQUlc0rcNrUvpIn8DJIFu - 1Yu+MHQ5+zvkXRoQ/Ll/oxWJmNWUWraM4dxGzuSN6Bxm34dto33ud2LlrdGYHpbLIofW - WVrs8/FHVxuXPXn3c8MNmNrP92pPLZY/Snt0ZJN7wbEo5dWn/dGcSTwoyRiD35OiGs0+ - HmJvfuXKfTMrU3R+Xkr5HJ/GBWRB/jZ6e9bcxgydHpS86O/NEY5hu8XQqMBrYZ5uldrg - tO1yLvvScJz7mX/90BpgLa1oqxjeKe4x64QHoSi3J8oPO6vs2XLa1ISBJiyaGsrnN+2o - hd+A== + bh=mvDapCNNa9oKBO12XFAqF92pzaTTjGLTiE2clMtdRzM=; + b=RfgErx0ifG4YFDsIv9nxEu9TStTl0mBznYQZMMwT6Dpn3diDq+uhHBN2bRDMAT0dYv + 5w88/E+d8oLyhT6/TBlkps9ahwTKkfOZUCi4UUmBx2n/p+5uYTAVLP9Fv29PtgQFHnDe + qySfOEb7NKj8LR22QXYRUxRLN/jhmskaIpg9fs+HmC7jU4+fpoFmpoIgWb8rGI/uzip8 + pZYYEvVICaXHH3E4aRMps28DY2VYHBycwlC+a4+O0Ui7Ctpay0eALDUq20YrqimKBa+K + 72gp//f9/UMHuG581IRQDiqE3pPz+Cx8KYc0z7DYbEF1YknhJG7gwdOwPJzGjv2LVeps + o3xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1723476687; x=1724081487; + d=1e100.net; s=20230601; t=1725842395; x=1726447195; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; - bh=8AoOgkh5aveFE/RKYa/E9QhApLnE3oSdwb+kORlfNsE=; - b=XpgaLQCJ0Q/aSykYyZ3fQKX3arVzLTzTId0UVYrhOxFAomoOZEPlLh+jPONYVoIj5a - PZGZX1KUgKOn/kqLoQ4quqioSTyc2skjXlWr3cXxhF8KBBfAY1Vbc2cU97yvEBQu3YI2 - uZywVvv0hVxoJ5qOG3xaKrR+oR944lJ32LTH+Tw2KrfeKeOJLydGqHboyOeGrk+DXLB8 - Q69OiawyqGPOxw0cMfijOujWODZjCZTV/+RXiWE6vCOaaA2AZ5qMff1NAJqKKNJoBjhS - ggz1gozz7ZlA5xZtlIojvVmua+ewqkU8li8p0gf0nEBI+Z1qMwGN1zKWYsj4v9/kRLS/ - mJ9w== -X-Gm-Message-State: AOJu0YxJZZYzpg/M0lvPwHgVJLl9H9fOiX7CMDHOh7dNC1G9yefXKIIe - MVIVdB1WUtmnClgXm3c6X9F/HVDiTnNzfpCn2onA1oJTyB39TiB850yprfG7nJ8R2F5yC6wETMC - qzZnn0A8tHDNqNDUZQsFSpVd34YhG -X-Google-Smtp-Source: AGHT+IFwR7MEX2BF64JNUYLXAMt0FJw2nC6yUoxcjpx+oLfHvzJ7PGy7PJjinstDbKPuBkbLsnnR0tY91gm8tWzmnLU= -X-Received: by 2002:a05:6830:270b:b0:70b:4408:d3b8 with SMTP id - 46e09a7af769-70c9399c346mr498498a34.33.1723476686792; Mon, 12 Aug 2024 - 08:31:26 -0700 (PDT) + bh=mvDapCNNa9oKBO12XFAqF92pzaTTjGLTiE2clMtdRzM=; + b=GWRnggEPlVvXAqrwoXCKq4ZOgguVgZiZb4jQpoFHV+/oc9UYFBSsN9b5B+OUaj2F0N + G6nv2u7c346WsoIfb3kCvyqwQbZBP1Kzcb/n3DUW7CjlE2VSz6BOOrPQxLl5nshDU1Du + QGGoGjE4+dzEZBdYjJVFSq2L1DJilntkNAFS1ff9DaGqOCEEftx0Y/MfFumclnwZ5VYR + C2+o9qH45iwtw88mBsfJ7Yl7OoI9w10NuuraYQcoeu72zwmb30E2uHfUe5osGldslgXJ + RcGV8JsFGwAJJUbmr/4HZFQDt3EMeydn7KkieTgi41fExIj5ZC3VhEt1rw4PTdqcTbSG + mEdQ== +X-Gm-Message-State: AOJu0YzZrLLg8bVVKkxvRm1k5x4qHXit4w1BuMonhJq6LxOP+DHivono + +8JABSGbjSpXofT9yUe7vRgJ5G3KTm5sIL9UP2ZOxlI4c3j37jmENGKx2sb/T9IdgYq1A3890fY + 2SoTWndVkyH23ZCxWm/36uVvQOyum +X-Google-Smtp-Source: AGHT+IGhU+pRzJcpq3/XnnchlgpJSMnc3PvuTm0gfTpuyITwadr4gnoO1o/F4dGPxxKl9Epjas8+m4UXLqVKM8yWsCo= +X-Received: by 2002:a05:620a:2901:b0:7a2:1bc:fc1e with SMTP id + af79cd13be357-7a99739b7bbmr1356449485a.61.1725842395467; Sun, 08 Sep 2024 + 17:39:55 -0700 (PDT) MIME-Version: 1.0 From: "emailwallet.relayer.2" -Date: Tue, 13 Aug 2024 00:31:15 +0900 -Message-ID: -Subject: Set the new signer of 0x18ABd76E471dB6a75A307bf4dD53ceA89A975B1A to - 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 Code 1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54 +Date: Mon, 9 Sep 2024 09:39:44 +0900 +Message-ID: +Subject: Set the new signer of 0xeb8E21A363Dce22ff6057dEEF7c074062037F571 to 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 To: rrelayerbob@gmail.com -Content-Type: multipart/alternative; boundary="000000000000b1f747061f7e2f2e" +Content-Type: multipart/alternative; boundary="000000000000eb98600621a4fedf" ---000000000000b1f747061f7e2f2e +--000000000000eb98600621a4fedf Content-Type: text/plain; charset="UTF-8" ---000000000000b1f747061f7e2f2e +--000000000000eb98600621a4fedf Content-Type: text/html; charset="UTF-8"

---000000000000b1f747061f7e2f2e-- +--000000000000eb98600621a4fedf-- diff --git a/packages/contracts/test/helpers/DeploymentHelper.sol b/packages/contracts/test/helpers/DeploymentHelper.sol index 3acad10..dc34550 100644 --- a/packages/contracts/test/helpers/DeploymentHelper.sol +++ b/packages/contracts/test/helpers/DeploymentHelper.sol @@ -5,16 +5,21 @@ import "forge-std/Test.sol"; import "forge-std/console.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import "../../src/EmailAuth.sol"; -import "../../src/utils/Verifier.sol"; -import "../../src/utils/ECDSAOwnedDKIMRegistry.sol"; -// import "../../src/utils/ForwardDKIMRegistry.sol"; +import {EmailAuth, EmailAuthMsg} from "../../src/EmailAuth.sol"; +import {Verifier, EmailProof} from "../../src/utils/Verifier.sol"; +import {ECDSAOwnedDKIMRegistry} from "../../src/utils/ECDSAOwnedDKIMRegistry.sol"; import {UserOverrideableDKIMRegistry} from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; -import "./SimpleWallet.sol"; -import "./RecoveryController.sol"; +import {SimpleWallet} from "./SimpleWallet.sol"; +import {RecoveryController, EmailAccountRecovery} from "./RecoveryController.sol"; import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +// // FOR_ZKSYNC:START +// import {ZKSyncCreate2Factory} from "../../src/utils/ZKSyncCreate2Factory.sol"; +// import "../../src/utils/ForwardDKIMRegistry.sol"; +// import {RecoveryControllerZKSync, EmailAccountRecoveryZKSync} from "./RecoveryControllerZKSync.sol"; +// // FOR_ZKSYNC:END + contract DeploymentHelper is Test { using ECDSA for *; @@ -26,6 +31,10 @@ contract DeploymentHelper is Test { SimpleWallet simpleWalletImpl; SimpleWallet simpleWallet; + // // FOR_ZKSYNC:START + // RecoveryControllerZKSync recoveryControllerZKSync; + // // FOR_ZKSYNC:END + address deployer = vm.addr(1); address receiver = vm.addr(2); address guardian; @@ -127,13 +136,42 @@ contract DeploymentHelper is Test { payable(address(recoveryControllerProxy)) ); + // Create SimpleWallet simpleWalletImpl = new SimpleWallet(); + address recoveryControllerAddress = address(recoveryController); + + // // FOR_ZKSYNC:START + // // Create zkSync Factory implementation + // if (isZkSync()) { + // ZKSyncCreate2Factory factoryImpl = new ZKSyncCreate2Factory(); + // // Create RecoveryControllerZKSync as EmailAccountRecovery implementation + // RecoveryControllerZKSync recoveryControllerZKSyncImpl = new RecoveryControllerZKSync(); + // ERC1967Proxy recoveryControllerZKSyncProxy = new ERC1967Proxy( + // address(recoveryControllerZKSyncImpl), + // abi.encodeCall( + // recoveryControllerZKSyncImpl.initialize, + // ( + // signer, + // address(verifier), + // address(dkim), + // address(emailAuthImpl), + // address(factoryImpl) + // ) + // ) + // ); + // recoveryControllerZKSync = RecoveryControllerZKSync( + // payable(address(recoveryControllerZKSyncProxy)) + // ); + // recoveryControllerAddress = address(recoveryControllerZKSync); + // } + // // FOR_ZKSYNC:END + ERC1967Proxy simpleWalletProxy = new ERC1967Proxy( address(simpleWalletImpl), abi.encodeCall( simpleWalletImpl.initialize, - (signer, address(recoveryController)) + (signer, recoveryControllerAddress) ) ); simpleWallet = SimpleWallet(payable(address(simpleWalletProxy))); @@ -142,6 +180,33 @@ contract DeploymentHelper is Test { // Set guardian address guardian = EmailAccountRecovery(address(recoveryController)) .computeEmailAuthAddress(address(simpleWallet), accountSalt); + // // FOR_ZKSYNC:START + // if (isZkSync()) { + // guardian = EmailAccountRecoveryZKSync(address(recoveryControllerZKSync)) + // .computeEmailAuthAddress(address(simpleWallet), accountSalt); + // } + // // FOR_ZKSYNC:END + vm.stopPrank(); } + + function isZkSync() public view returns (bool) { + return block.chainid == 324 || block.chainid == 300; + } + + function skipIfZkSync() public { + if (isZkSync()) { + vm.skip(true); + } else { + vm.skip(false); + } + } + + function skipIfNotZkSync() public { + if (!isZkSync()) { + vm.skip(true); + } else { + vm.skip(false); + } + } } diff --git a/packages/contracts/test/helpers/RecoveryControllerZKSync.sol b/packages/contracts/test/helpers/RecoveryControllerZKSync.sol new file mode 100644 index 0000000..f9a7a67 --- /dev/null +++ b/packages/contracts/test/helpers/RecoveryControllerZKSync.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.12; + +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {EmailAccountRecoveryZKSync} from "../../src/EmailAccountRecoveryZKSync.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {SimpleWallet} from "./SimpleWallet.sol"; + +contract RecoveryControllerZKSync is OwnableUpgradeable, EmailAccountRecoveryZKSync { + enum GuardianStatus { + NONE, + REQUESTED, + ACCEPTED + } + uint public constant DEFAULT_TIMELOCK_PERIOD = 3 days; + + mapping(address => bool) public isActivatedOfAccount; + mapping(address => bool) public isRecovering; + mapping(address => address) public newSignerCandidateOfAccount; + mapping(address => GuardianStatus) public guardians; + mapping(address => uint) public timelockPeriodOfAccount; + mapping(address => uint) public currentTimelockOfAccount; + + // modifier onlyNotRecoveringOwner() { + // require(msg.sender == owner(), "only owner"); + // require(!isRecovering, "recovery in progress"); + // _; + // } + + constructor() {} + + function initialize( + address _initialOwner, + address _verifier, + address _dkim, + address _emailAuthImplementation, + address _factory + ) public initializer { + __Ownable_init(_initialOwner); + verifierAddr = _verifier; + dkimAddr = _dkim; + emailAuthImplementationAddr = _emailAuthImplementation; + factoryAddr = _factory; + } + + function isActivated( + address recoveredAccount + ) public view override returns (bool) { + return isActivatedOfAccount[recoveredAccount]; + } + + function acceptanceSubjectTemplates() + public + pure + override + returns (string[][] memory) + { + string[][] memory templates = new string[][](1); + templates[0] = new string[](5); + templates[0][0] = "Accept"; + templates[0][1] = "guardian"; + templates[0][2] = "request"; + templates[0][3] = "for"; + templates[0][4] = "{ethAddr}"; + return templates; + } + + function recoverySubjectTemplates() + public + pure + override + returns (string[][] memory) + { + string[][] memory templates = new string[][](1); + templates[0] = new string[](8); + templates[0][0] = "Set"; + templates[0][1] = "the"; + templates[0][2] = "new"; + templates[0][3] = "signer"; + templates[0][4] = "of"; + templates[0][5] = "{ethAddr}"; + templates[0][6] = "to"; + templates[0][7] = "{ethAddr}"; + return templates; + } + + function extractRecoveredAccountFromAcceptanceSubject( + bytes[] memory subjectParams, + uint templateIdx + ) public pure override returns (address) { + require(templateIdx == 0, "invalid template index"); + require(subjectParams.length == 1, "invalid subject params"); + return abi.decode(subjectParams[0], (address)); + } + + function extractRecoveredAccountFromRecoverySubject( + bytes[] memory subjectParams, + uint templateIdx + ) public pure override returns (address) { + require(templateIdx == 0, "invalid template index"); + require(subjectParams.length == 2, "invalid subject params"); + return abi.decode(subjectParams[0], (address)); + } + + function requestGuardian(address guardian) public { + address account = msg.sender; + require(!isRecovering[account], "recovery in progress"); + require(guardian != address(0), "invalid guardian"); + require( + guardians[guardian] == GuardianStatus.NONE, + "guardian status must be NONE" + ); + if (!isActivatedOfAccount[account]) { + isActivatedOfAccount[account] = true; + } + guardians[guardian] = GuardianStatus.REQUESTED; + } + + function configureTimelockPeriod(uint period) public { + timelockPeriodOfAccount[msg.sender] = period; + } + + function acceptGuardian( + address guardian, + uint templateIdx, + bytes[] memory subjectParams, + bytes32 + ) internal override { + address account = abi.decode(subjectParams[0], (address)); + require(!isRecovering[account], "recovery in progress"); + require(guardian != address(0), "invalid guardian"); + + require( + guardians[guardian] == GuardianStatus.REQUESTED, + "guardian status must be REQUESTED" + ); + require(templateIdx == 0, "invalid template index"); + require(subjectParams.length == 1, "invalid subject params"); + guardians[guardian] = GuardianStatus.ACCEPTED; + } + + function processRecovery( + address guardian, + uint templateIdx, + bytes[] memory subjectParams, + bytes32 + ) internal override { + address account = abi.decode(subjectParams[0], (address)); + require(!isRecovering[account], "recovery in progress"); + require(guardian != address(0), "invalid guardian"); + require( + guardians[guardian] == GuardianStatus.ACCEPTED, + "guardian status must be ACCEPTED" + ); + require(templateIdx == 0, "invalid template index"); + require(subjectParams.length == 2, "invalid subject params"); + address newSignerInEmail = abi.decode(subjectParams[1], (address)); + require(newSignerInEmail != address(0), "invalid new signer"); + isRecovering[account] = true; + newSignerCandidateOfAccount[account] = newSignerInEmail; + currentTimelockOfAccount[account] = + block.timestamp + + timelockPeriodOfAccount[account]; + } + + function rejectRecovery() public { + address account = msg.sender; + require(isRecovering[account], "recovery not in progress"); + require( + currentTimelockOfAccount[account] > block.timestamp, + "timelock expired" + ); + isRecovering[account] = false; + newSignerCandidateOfAccount[account] = address(0); + currentTimelockOfAccount[account] = 0; + } + + function completeRecovery(address account, bytes memory) public override { + require(account != address(0), "invalid account"); + require(isRecovering[account], "recovery not in progress"); + require( + currentTimelockOfAccount[account] <= block.timestamp, + "timelock not expired" + ); + address newSigner = newSignerCandidateOfAccount[account]; + isRecovering[account] = false; + currentTimelockOfAccount[account] = 0; + newSignerCandidateOfAccount[account] = address(0); + SimpleWallet(payable(account)).changeOwner(newSigner); + } +} diff --git a/packages/contracts/test/script/ChangeOwners.t.sol b/packages/contracts/test/script/ChangeOwners.t.sol index f9c7b68..dcbe183 100644 --- a/packages/contracts/test/script/ChangeOwners.t.sol +++ b/packages/contracts/test/script/ChangeOwners.t.sol @@ -8,9 +8,10 @@ import {Deploy} from "../../script/DeployCommons.s.sol"; import {Deploy as Deploy2} from "../../script/DeployForwardDKIMRegistry.s.sol"; import {ChangeOwners} from "../../script/ChangeOwners.s.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract ChangeOwnersTest is Test { - function setUp() public { +contract ChangeOwnersTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -20,6 +21,8 @@ contract ChangeOwnersTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); vm.setEnv("SOURCE_DKIM", vm.toString(vm.envAddress("ECDSA_DKIM"))); diff --git a/packages/contracts/test/script/ChangeSignerInECDSAOwnedDKIMRegistry.t.sol b/packages/contracts/test/script/ChangeSignerInECDSAOwnedDKIMRegistry.t.sol index 9020849..26bc879 100644 --- a/packages/contracts/test/script/ChangeSignerInECDSAOwnedDKIMRegistry.t.sol +++ b/packages/contracts/test/script/ChangeSignerInECDSAOwnedDKIMRegistry.t.sol @@ -7,9 +7,10 @@ import "forge-std/console.sol"; import {Deploy} from "../../script/DeployCommons.s.sol"; import {ChangeSigner} from "../../script/ChangeSignerInECDSAOwnedDKIMRegistry.s.sol"; import {ECDSAOwnedDKIMRegistry} from "../../src/utils/ECDSAOwnedDKIMRegistry.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract ChangeSignerInECDSAOwnedDKIMRegistryTest is Test { - function setUp() public { +contract ChangeSignerInECDSAOwnedDKIMRegistryTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -19,6 +20,8 @@ contract ChangeSignerInECDSAOwnedDKIMRegistryTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); ChangeSigner changeSigner = new ChangeSigner(); diff --git a/packages/contracts/test/script/ChangeSourceInForwardDKIMRegistry.t.sol b/packages/contracts/test/script/ChangeSourceInForwardDKIMRegistry.t.sol index 96b72f0..0c90097 100644 --- a/packages/contracts/test/script/ChangeSourceInForwardDKIMRegistry.t.sol +++ b/packages/contracts/test/script/ChangeSourceInForwardDKIMRegistry.t.sol @@ -8,9 +8,10 @@ import {Deploy} from "../../script/DeployCommons.s.sol"; import {Deploy as Deploy2} from "../../script/DeployForwardDKIMRegistry.s.sol"; import {ChangeSource} from "../../script/ChangeSourceInForwardDKIMRegistry.s.sol"; import {ForwardDKIMRegistry} from "../../src/utils/ForwardDKIMRegistry.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract ChangeSourceInForwardDKIMRegistryTest is Test { - function setUp() public { +contract ChangeSourceInForwardDKIMRegistryTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -20,6 +21,8 @@ contract ChangeSourceInForwardDKIMRegistryTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); vm.setEnv("SOURCE_DKIM", vm.toString(vm.envAddress("ECDSA_DKIM"))); diff --git a/packages/contracts/test/script/DeployCommons.t.sol b/packages/contracts/test/script/DeployCommons.t.sol index c158388..a9ff89b 100644 --- a/packages/contracts/test/script/DeployCommons.t.sol +++ b/packages/contracts/test/script/DeployCommons.t.sol @@ -5,9 +5,10 @@ import "forge-std/Test.sol"; import "forge-std/console.sol"; import { Deploy } from "../../script/DeployCommons.s.sol"; +import { StructHelper } from "../helpers/StructHelper.sol"; -contract DeployCommonsTest is Test { - function setUp() public { +contract DeployCommonsTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -19,6 +20,8 @@ contract DeployCommonsTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); } diff --git a/packages/contracts/test/script/DeployRecoveryController.t.sol b/packages/contracts/test/script/DeployRecoveryController.t.sol index 770f563..6a66b7f 100644 --- a/packages/contracts/test/script/DeployRecoveryController.t.sol +++ b/packages/contracts/test/script/DeployRecoveryController.t.sol @@ -5,10 +5,10 @@ import "forge-std/Test.sol"; import "forge-std/console.sol"; import {Deploy} from "../../script/DeployRecoveryController.s.sol"; -import "../helpers/StructHelper.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract DeployRecoveryControllerTest is Test { - function setUp() public { +contract DeployRecoveryControllerTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -17,6 +17,8 @@ contract DeployRecoveryControllerTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); require( diff --git a/packages/contracts/test/script/DeploySimpleWallet.t.sol b/packages/contracts/test/script/DeploySimpleWallet.t.sol index 6bf3b05..a0bbf16 100644 --- a/packages/contracts/test/script/DeploySimpleWallet.t.sol +++ b/packages/contracts/test/script/DeploySimpleWallet.t.sol @@ -5,7 +5,7 @@ import "forge-std/Test.sol"; import "forge-std/console.sol"; import { Deploy } from "../../script/DeployCommons.s.sol"; -import "../helpers/StructHelper.sol"; +import { StructHelper } from "../helpers/StructHelper.sol"; contract DeploySimpleWalletTest is StructHelper { function setUp() public override { @@ -38,29 +38,39 @@ contract DeploySimpleWalletTest is StructHelper { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); } function test_run_no_dkim() public { + skipIfZkSync(); + vm.setEnv("DKIM", vm.toString(address(0))); Deploy deploy = new Deploy(); deploy.run(); } function test_run_no_verifier() public { + skipIfZkSync(); + vm.setEnv("VERIFIER", vm.toString(address(0))); Deploy deploy = new Deploy(); deploy.run(); } function test_run_no_email_auth() public { + skipIfZkSync(); + vm.setEnv("EMAIL_AUTH_IMPL", vm.toString(address(0))); Deploy deploy = new Deploy(); deploy.run(); } function test_run_no_simple_wallet() public { + skipIfZkSync(); + vm.setEnv("SIMPLE_WALLET_IMPL", vm.toString(address(0))); Deploy deploy = new Deploy(); deploy.run(); diff --git a/packages/contracts/test/script/RenounceOwners.t.sol b/packages/contracts/test/script/RenounceOwners.t.sol index 732169b..cafb661 100644 --- a/packages/contracts/test/script/RenounceOwners.t.sol +++ b/packages/contracts/test/script/RenounceOwners.t.sol @@ -8,9 +8,10 @@ import {Deploy} from "../../script/DeployCommons.s.sol"; import {Deploy as Deploy2} from "../../script/DeployForwardDKIMRegistry.s.sol"; import {RenounceOwners} from "../../script/RenounceOwners.s.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract RenounceOwnersTest is Test { - function setUp() public { +contract RenounceOwnersTest is StructHelper { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -19,6 +20,8 @@ contract RenounceOwnersTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); vm.setEnv("SOURCE_DKIM", vm.toString(vm.envAddress("ECDSA_DKIM"))); diff --git a/packages/contracts/test/script/Upgrades.t.sol b/packages/contracts/test/script/Upgrades.t.sol index fe74bfb..862eba3 100644 --- a/packages/contracts/test/script/Upgrades.t.sol +++ b/packages/contracts/test/script/Upgrades.t.sol @@ -9,12 +9,13 @@ import {Deploy as Deploy2} from "../../script/DeployForwardDKIMRegistry.s.sol"; import {Upgrades} from "../../script/Upgrades.s.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import {StructHelper} from "../helpers/StructHelper.sol"; -contract UpgradesTest is Test { +contract UpgradesTest is StructHelper { uint256 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - function setUp() public { + function setUp() public override { vm.setEnv( "PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" @@ -23,6 +24,8 @@ contract UpgradesTest is Test { } function test_run() public { + skipIfZkSync(); + Deploy deploy = new Deploy(); deploy.run(); vm.setEnv("SOURCE_DKIM", vm.toString(vm.envAddress("ECDSA_DKIM"))); diff --git a/packages/prover/Dockerfile b/packages/prover/Dockerfile index f0430c2..256a6db 100644 --- a/packages/prover/Dockerfile +++ b/packages/prover/Dockerfile @@ -24,7 +24,7 @@ RUN ls /root # RUN cp /email-wallet/packages/prover/params/email_sender.wasm /root/params RUN mkdir params WORKDIR /root/params -RUN gdown "https://drive.google.com/uc?id=1TChinAnHr9eV8H_OV9SVReF8Rvu6h1XH" +RUN gdown "https://drive.google.com/uc?id=1Ybtxe1TCVUtHzCPUs9cuZAGbM-MVwigE" RUN unzip params.zip RUN mv params/* /root/params WORKDIR /root diff --git a/packages/prover/local_setup.sh b/packages/prover/local_setup.sh index 58f35ea..b8266f1 100755 --- a/packages/prover/local_setup.sh +++ b/packages/prover/local_setup.sh @@ -6,7 +6,7 @@ mkdir -p build npm install -g snarkjs@latest pip install -r requirements.txt mkdir build && cd build -gdown "https://drive.google.com/uc?id=1TChinAnHr9eV8H_OV9SVReF8Rvu6h1XH" +gdown "https://drive.google.com/uc?id=1Ybtxe1TCVUtHzCPUs9cuZAGbM-MVwigE" unzip params.zip # curl https://email-wallet-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/emailwallet-account-creation/contributions/emailwallet-account-creation_00019.zkey --output /root/params/account_creation.zkey # curl https://email-wallet-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/emailwallet-account-init/contributions/emailwallet-account-init_00007.zkey --output /root/params/account_init.zkey diff --git a/packages/prover/modal_server.py b/packages/prover/modal_server.py index e7466f9..54b93b3 100644 --- a/packages/prover/modal_server.py +++ b/packages/prover/modal_server.py @@ -5,7 +5,7 @@ from google.cloud.logging_v2.handlers import setup_logging from google.oauth2 import service_account -app = modal.App("email-auth-prover-v1.0.4") +app = modal.App("email-auth-prover-v1.1.0") image = modal.Image.from_dockerfile("Dockerfile") diff --git a/packages/relayer/src/abis/email_account_recovery.rs b/packages/relayer/src/abis/email_account_recovery.rs index dcdb3ae..56e0a90 100644 --- a/packages/relayer/src/abis/email_account_recovery.rs +++ b/packages/relayer/src/abis/email_account_recovery.rs @@ -403,6 +403,50 @@ pub mod email_account_recovery { state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, },], ), + ( + ::std::borrow::ToOwned::to_owned("isActivated"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("isActivated"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), + ( + ::std::borrow::ToOwned::to_owned("isActivated"), + ::std::vec![::ethers::core::abi::ethabi::Function { + name: ::std::borrow::ToOwned::to_owned("isActivated"), + inputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::borrow::ToOwned::to_owned("recoveredAccount"), + kind: ::ethers::core::abi::ethabi::ParamType::Address, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("address"), + ), + },], + outputs: ::std::vec![::ethers::core::abi::ethabi::Param { + name: ::std::string::String::new(), + kind: ::ethers::core::abi::ethabi::ParamType::Bool, + internal_type: ::core::option::Option::Some( + ::std::borrow::ToOwned::to_owned("bool"), + ), + },], + constant: ::core::option::Option::None, + state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, + },], + ), ( ::std::borrow::ToOwned::to_owned("recoverySubjectTemplates"), ::std::vec![::ethers::core::abi::ethabi::Function { diff --git a/yarn.lock b/yarn.lock index bbe4d5e..5f8ca2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,38 +18,38 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.2", "@babel/compat-data@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.22.5", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6", "@babel/generator@^7.7.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.25.6" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -69,42 +69,40 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.24.7", "@babel/helper-compilation-targets@^7.24.8", "@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - browserslist "^4.22.2" + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz#2eaed36b3a1c11c53bdf80d53838b293c52f5b3b" - integrity sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg== +"@babel/helper-create-class-features-plugin@^7.24.7", "@babel/helper-create-class-features-plugin@^7.25.0", "@babel/helper-create-class-features-plugin@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz#57eaf1af38be4224a9d9dd01ddde05b741f50e14" + integrity sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.8" "@babel/helper-optimise-call-expression" "^7.24.7" - "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-replace-supers" "^7.25.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/traverse" "^7.25.4" semver "^6.3.1" -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz#be4f435a80dc2b053c76eeb4b7d16dd22cfc89da" - integrity sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA== +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.7", "@babel/helper-create-regexp-features-plugin@^7.25.0", "@babel/helper-create-regexp-features-plugin@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz#24c75974ed74183797ffd5f134169316cd1808d9" + integrity sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" regexpu-core "^5.3.1" semver "^6.3.1" -"@babel/helper-define-polyfill-provider@^0.6.1", "@babel/helper-define-polyfill-provider@^0.6.2": +"@babel/helper-define-polyfill-provider@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== @@ -115,35 +113,13 @@ lodash.debounce "^4.0.8" resolve "^1.14.2" -"@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== +"@babel/helper-member-expression-to-functions@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz#6155e079c913357d24a4c20480db7c712a5c3fb6" + integrity sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA== dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-member-expression-to-functions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz#67613d068615a70e4ed5101099affc7a41c5225f" - integrity sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.8" "@babel/helper-module-imports@^7.24.7": version "7.24.7" @@ -153,16 +129,15 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== +"@babel/helper-module-transforms@^7.24.7", "@babel/helper-module-transforms@^7.24.8", "@babel/helper-module-transforms@^7.25.0", "@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" "@babel/helper-optimise-call-expression@^7.24.7": version "7.24.7" @@ -171,28 +146,28 @@ dependencies: "@babel/types" "^7.24.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" - integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== -"@babel/helper-remap-async-to-generator@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz#b3f0f203628522713849d49403f1a414468be4c7" - integrity sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA== +"@babel/helper-remap-async-to-generator@^7.24.7", "@babel/helper-remap-async-to-generator@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz#d2f0fbba059a42d68e5e378feaf181ef6055365e" + integrity sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-wrap-function" "^7.24.7" + "@babel/helper-wrap-function" "^7.25.0" + "@babel/traverse" "^7.25.0" -"@babel/helper-replace-supers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" - integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== +"@babel/helper-replace-supers@^7.24.7", "@babel/helper-replace-supers@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz#ff44deac1c9f619523fe2ca1fd650773792000a9" + integrity sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.8" "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/traverse" "^7.25.0" "@babel/helper-simple-access@^7.24.7": version "7.24.7" @@ -210,45 +185,37 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== +"@babel/helper-validator-option@^7.24.7", "@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== -"@babel/helper-wrap-function@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz#52d893af7e42edca7c6d2c6764549826336aae1f" - integrity sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw== +"@babel/helper-wrap-function@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz#dab12f0f593d6ca48c0062c28bcfb14ebe812f81" + integrity sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ== dependencies: - "@babel/helper-function-name" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.0" + "@babel/types" "^7.25.0" -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== +"@babel/helpers@^7.25.0": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.24.7": version "7.24.7" @@ -260,25 +227,34 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz#fd059fd27b184ea2b4c7e646868a9a381bbc3055" - integrity sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ== +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz#dca427b45a6c0f5c095a1c639dfe2476a3daba7f" + integrity sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.3" -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz#468096ca44bbcbe8fcc570574e12eb1950e18107" - integrity sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg== +"@babel/plugin-bugfix-safari-class-field-initializer-scope@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.0.tgz#cd0c583e01369ef51676bdb3d7b603e17d2b3f73" + integrity sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz#749bde80356b295390954643de7635e0dffabe73" + integrity sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.24.7": version "7.24.7" @@ -289,13 +265,13 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-transform-optional-chaining" "^7.24.7" -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz#71b21bb0286d5810e63a1538aa901c58e87375ec" - integrity sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.0.tgz#3a82a70e7cb7294ad2559465ebcb871dfbf078fb" + integrity sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.0" "@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": version "7.21.0-placeholder-for-preset-env.2" @@ -316,7 +292,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -345,20 +321,20 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-import-assertions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz#2a0b406b5871a20a841240586b1300ce2088a778" - integrity sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.6.tgz#bb918905c58711b86f9710d74a3744b6c56573b5" + integrity sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" - integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz#6d4c78f042db0e82fd6436cd65fec5dc78ad2bde" + integrity sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -379,7 +355,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -393,7 +369,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -428,7 +404,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== @@ -436,11 +412,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.24.7", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" - integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz#04db9ce5a9043d9c635e75ae7969a2cd50ca97ff" + integrity sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" @@ -457,15 +433,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-async-generator-functions@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz#7330a5c50e05181ca52351b8fd01642000c96cfd" - integrity sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g== +"@babel/plugin-transform-async-generator-functions@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz#2afd4e639e2d055776c9f091b6c0c180ed8cf083" + integrity sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg== dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-remap-async-to-generator" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-remap-async-to-generator" "^7.25.0" "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/traverse" "^7.25.4" "@babel/plugin-transform-async-to-generator@^7.24.7": version "7.24.7" @@ -483,20 +459,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-block-scoping@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz#42063e4deb850c7bd7c55e626bf4e7ab48e6ce02" - integrity sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ== +"@babel/plugin-transform-block-scoping@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz#23a6ed92e6b006d26b1869b1c91d1b917c2ea2ac" + integrity sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-class-properties@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz#256879467b57b0b68c7ddfc5b76584f398cd6834" - integrity sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w== +"@babel/plugin-transform-class-properties@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz#bae7dbfcdcc2e8667355cd1fb5eda298f05189fd" + integrity sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-class-static-block@^7.24.7": version "7.24.7" @@ -507,18 +483,16 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz#4ae6ef43a12492134138c1e45913f7c46c41b4bf" - integrity sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw== +"@babel/plugin-transform-classes@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz#d29dbb6a72d79f359952ad0b66d88518d65ef89a" + integrity sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-replace-supers" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-replace-supers" "^7.25.0" + "@babel/traverse" "^7.25.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.24.7": @@ -529,12 +503,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/template" "^7.24.7" -"@babel/plugin-transform-destructuring@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz#a097f25292defb6e6cc16d6333a4cfc1e3c72d9e" - integrity sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw== +"@babel/plugin-transform-destructuring@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz#c828e814dbe42a2718a838c2a2e16a408e055550" + integrity sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-dotall-regex@^7.24.7": version "7.24.7" @@ -551,6 +525,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.0.tgz#809af7e3339466b49c034c683964ee8afb3e2604" + integrity sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/plugin-transform-dynamic-import@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz#4d8b95e3bae2b037673091aa09cd33fecd6419f4" @@ -583,14 +565,14 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" -"@babel/plugin-transform-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz#6d8601fbffe665c894440ab4470bc721dd9131d6" - integrity sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w== +"@babel/plugin-transform-function-name@^7.25.1": + version "7.25.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.1.tgz#b85e773097526c1a4fc4ba27322748643f26fc37" + integrity sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA== dependencies: - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/traverse" "^7.25.1" "@babel/plugin-transform-json-strings@^7.24.7": version "7.24.7" @@ -600,12 +582,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-transform-literals@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz#36b505c1e655151a9d7607799a9988fc5467d06c" - integrity sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ== +"@babel/plugin-transform-literals@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz#deb1ad14fc5490b9a65ed830e025bca849d8b5f3" + integrity sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-logical-assignment-operators@^7.24.7": version "7.24.7" @@ -630,24 +612,24 @@ "@babel/helper-module-transforms" "^7.24.7" "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz#9fd5f7fdadee9085886b183f1ad13d1ab260f4ab" - integrity sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ== +"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.24.7", "@babel/plugin-transform-modules-commonjs@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz#ab6421e564b717cb475d6fff70ae7f103536ea3c" + integrity sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA== dependencies: - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-simple-access" "^7.24.7" -"@babel/plugin-transform-modules-systemjs@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz#f8012316c5098f6e8dee6ecd58e2bc6f003d0ce7" - integrity sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw== +"@babel/plugin-transform-modules-systemjs@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz#8f46cdc5f9e5af74f3bd019485a6cbe59685ea33" + integrity sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw== dependencies: - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-module-transforms" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.0" "@babel/plugin-transform-modules-umd@^7.24.7": version "7.24.7" @@ -714,12 +696,12 @@ "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz#b8f6848a80cf2da98a8a204429bec04756c6d454" - integrity sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ== +"@babel/plugin-transform-optional-chaining@^7.24.7", "@babel/plugin-transform-optional-chaining@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz#bb02a67b60ff0406085c13d104c99a835cdf365d" + integrity sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-optional-chaining" "^7.8.3" @@ -730,13 +712,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-private-methods@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" - integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== +"@babel/plugin-transform-private-methods@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz#9bbefbe3649f470d681997e0b64a4b254d877242" + integrity sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.4" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-private-property-in-object@^7.24.7": version "7.24.7" @@ -770,15 +752,15 @@ "@babel/plugin-transform-react-jsx" "^7.24.7" "@babel/plugin-transform-react-jsx@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.24.7.tgz#17cd06b75a9f0e2bd076503400e7c4b99beedac4" - integrity sha512-+Dj06GDZEFRYvclU6k4bme55GKBEWUmByM/eoKuqg4zTNQHiApWRhQph5fxQB2wAEFvRzL1tOEj1RJ19wJrhoA== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.2.tgz#e37e8ebfa77e9f0b16ba07fadcb6adb47412227a" + integrity sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-jsx" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.25.2" "@babel/plugin-transform-react-pure-annotations@^7.24.7": version "7.24.7" @@ -832,21 +814,22 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-typeof-symbol@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz#f074be466580d47d6e6b27473a840c9f9ca08fb0" - integrity sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg== +"@babel/plugin-transform-typeof-symbol@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz#383dab37fb073f5bfe6e60c654caac309f92ba1c" + integrity sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-transform-typescript@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz#b006b3e0094bf0813d505e0c5485679eeaf4a881" - integrity sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw== + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz#237c5d10de6d493be31637c6b9fa30b6c5461add" + integrity sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A== dependencies: "@babel/helper-annotate-as-pure" "^7.24.7" - "@babel/helper-create-class-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.25.0" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-typescript" "^7.24.7" "@babel/plugin-transform-unicode-escapes@^7.24.7": @@ -872,27 +855,28 @@ "@babel/helper-create-regexp-features-plugin" "^7.24.7" "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-unicode-sets-regex@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz#d40705d67523803a576e29c63cef6e516b858ed9" - integrity sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg== +"@babel/plugin-transform-unicode-sets-regex@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz#be664c2a0697ffacd3423595d5edef6049e8946c" + integrity sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-create-regexp-features-plugin" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/preset-env@^7.22.2", "@babel/preset-env@^7.22.20": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.7.tgz#ff067b4e30ba4a72f225f12f123173e77b987f37" - integrity sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ== - dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.24.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.24.7" + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.25.4.tgz#be23043d43a34a2721cd0f676c7ba6f1481f6af6" + integrity sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw== + dependencies: + "@babel/compat-data" "^7.25.4" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.25.3" + "@babel/plugin-bugfix-safari-class-field-initializer-scope" "^7.25.0" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.25.0" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.24.7" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.24.7" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.25.0" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -913,29 +897,30 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.24.7" - "@babel/plugin-transform-async-generator-functions" "^7.24.7" + "@babel/plugin-transform-async-generator-functions" "^7.25.4" "@babel/plugin-transform-async-to-generator" "^7.24.7" "@babel/plugin-transform-block-scoped-functions" "^7.24.7" - "@babel/plugin-transform-block-scoping" "^7.24.7" - "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-block-scoping" "^7.25.0" + "@babel/plugin-transform-class-properties" "^7.25.4" "@babel/plugin-transform-class-static-block" "^7.24.7" - "@babel/plugin-transform-classes" "^7.24.7" + "@babel/plugin-transform-classes" "^7.25.4" "@babel/plugin-transform-computed-properties" "^7.24.7" - "@babel/plugin-transform-destructuring" "^7.24.7" + "@babel/plugin-transform-destructuring" "^7.24.8" "@babel/plugin-transform-dotall-regex" "^7.24.7" "@babel/plugin-transform-duplicate-keys" "^7.24.7" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex" "^7.25.0" "@babel/plugin-transform-dynamic-import" "^7.24.7" "@babel/plugin-transform-exponentiation-operator" "^7.24.7" "@babel/plugin-transform-export-namespace-from" "^7.24.7" "@babel/plugin-transform-for-of" "^7.24.7" - "@babel/plugin-transform-function-name" "^7.24.7" + "@babel/plugin-transform-function-name" "^7.25.1" "@babel/plugin-transform-json-strings" "^7.24.7" - "@babel/plugin-transform-literals" "^7.24.7" + "@babel/plugin-transform-literals" "^7.25.2" "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" "@babel/plugin-transform-member-expression-literals" "^7.24.7" "@babel/plugin-transform-modules-amd" "^7.24.7" - "@babel/plugin-transform-modules-commonjs" "^7.24.7" - "@babel/plugin-transform-modules-systemjs" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.8" + "@babel/plugin-transform-modules-systemjs" "^7.25.0" "@babel/plugin-transform-modules-umd" "^7.24.7" "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" "@babel/plugin-transform-new-target" "^7.24.7" @@ -944,9 +929,9 @@ "@babel/plugin-transform-object-rest-spread" "^7.24.7" "@babel/plugin-transform-object-super" "^7.24.7" "@babel/plugin-transform-optional-catch-binding" "^7.24.7" - "@babel/plugin-transform-optional-chaining" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.8" "@babel/plugin-transform-parameters" "^7.24.7" - "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.25.4" "@babel/plugin-transform-private-property-in-object" "^7.24.7" "@babel/plugin-transform-property-literals" "^7.24.7" "@babel/plugin-transform-regenerator" "^7.24.7" @@ -955,16 +940,16 @@ "@babel/plugin-transform-spread" "^7.24.7" "@babel/plugin-transform-sticky-regex" "^7.24.7" "@babel/plugin-transform-template-literals" "^7.24.7" - "@babel/plugin-transform-typeof-symbol" "^7.24.7" + "@babel/plugin-transform-typeof-symbol" "^7.24.8" "@babel/plugin-transform-unicode-escapes" "^7.24.7" "@babel/plugin-transform-unicode-property-regex" "^7.24.7" "@babel/plugin-transform-unicode-regex" "^7.24.7" - "@babel/plugin-transform-unicode-sets-regex" "^7.24.7" + "@babel/plugin-transform-unicode-sets-regex" "^7.25.4" "@babel/preset-modules" "0.1.6-no-external-plugins" babel-plugin-polyfill-corejs2 "^0.4.10" - babel-plugin-polyfill-corejs3 "^0.10.4" + babel-plugin-polyfill-corejs3 "^0.10.6" babel-plugin-polyfill-regenerator "^0.6.1" - core-js-compat "^3.31.0" + core-js-compat "^3.37.1" semver "^6.3.1" "@babel/preset-modules@0.1.6-no-external-plugins": @@ -1005,43 +990,40 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime@^7.8.4": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" - integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.24.7", "@babel/template@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== +"@babel/template@^7.24.7", "@babel/template@^7.25.0", "@babel/template@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== dependencies: - "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" @@ -1641,9 +1623,9 @@ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" @@ -1724,10 +1706,10 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.17.0": - version "0.17.0" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" - integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== +"@solidity-parser/parser@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" + integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== "@types/babel__core@^7.1.14": version "7.20.5" @@ -1797,11 +1779,11 @@ pretty-format "^29.0.0" "@types/node@*": - version "20.14.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.6.tgz#f3c19ffc98c2220e18de259bb172dd4d892a6075" - integrity sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw== + version "22.5.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" + integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/stack-utils@^2.0.0": version "2.0.3" @@ -1814,29 +1796,29 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.32" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" - integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== dependencies: "@types/yargs-parser" "*" -"@zk-email/circuits@^6.1.1": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.1.2.tgz#bde32294e11723bf5880219c274fb720c95aeb3f" - integrity sha512-pmZsGo2Kz/CC5T4/VUA/ngJpzP2g05WvXj4X4j4/y30mjdz9oocGYLqsMZEl2Fx3rmH4mZXkGhm0sA0C7hAReg== +"@zk-email/circuits@=6.1.5": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.1.5.tgz#53462456638edf97bbc206ead01c302ba11e7850" + integrity sha512-Hx+R7ARIZ1JLJ6Ba3qqkWdGweOS63P2VyldVgZ5z0KZ5PvgAsM1ka8AUWzq1RFZCmgbluY8yiHLzWREbQm9bOQ== dependencies: "@zk-email/zk-regex-circom" "^2.1.0" circomlib "^2.0.5" -"@zk-email/contracts@^6.1.2": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@zk-email/contracts/-/contracts-6.1.2.tgz#ce5b21c62103da72cad404724f2eb9649c773d86" - integrity sha512-cakbMmr+ox6nyhNXiJI8ZM0ZuKn3A60KIeiZsr3a1dYn4Rk03PL2MfHMv9ec8ivNnJNy+jDbOAkcTV5PYHoTIQ== +"@zk-email/contracts@^6.1.5": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@zk-email/contracts/-/contracts-6.1.5.tgz#979c2aaa30cdcdb7433ff37d74c396df0cb60107" + integrity sha512-1RW3dpYGBQXjmIlcTGMtYsux7FQoR1MezA0D0pssrNEaCO2CuQd6oAxJLpbCxFQWPbujLKn8PiEVcjP+eiGvVw== dependencies: "@openzeppelin/contracts" "^5.0.0" dotenv "^16.3.1" -"@zk-email/relayer-utils@^0.2.4": +"@zk-email/relayer-utils@=0.2.4": version "0.2.4" resolved "https://registry.yarnpkg.com/@zk-email/relayer-utils/-/relayer-utils-0.2.4.tgz#5f452bb2867e1efe8700a19351dbb7796f9a081f" integrity sha512-T1N4hBL2NI7omerONdgS2HIYydNP0cRSKpyKEMRzWxelgam7HP3TgG7jYbehQn9BlCyL7o4ifNnyH9sQPaC0zA== @@ -1847,17 +1829,17 @@ node-pre-gyp-github "https://github.com/ultamatt/node-pre-gyp-github.git" "@zk-email/relayer-utils@github:zkemail/relayer-utils": - version "0.2.4" - resolved "https://codeload.github.com/zkemail/relayer-utils/tar.gz/58e72b7d100eb8243a10df72bfe242f13ddcfdb8" + version "0.3.2" + resolved "https://codeload.github.com/zkemail/relayer-utils/tar.gz/aefb00fdcfbfde7fced50e5a0b086e5cc2ff64cd" dependencies: "@mapbox/node-pre-gyp" "^1.0" cargo-cp-artifact "^0.1" node-pre-gyp-github "https://github.com/ultamatt/node-pre-gyp-github.git" -"@zk-email/zk-regex-circom@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.1.0.tgz#cc2f1d93fb130a9f8ac88114d3559a296df97538" - integrity sha512-Ayq0Hk4m7w1UHPPx2c5bUWLdKUPnuK62AZFOyiIvA7x4NgRyvjxe+S4D5KFH5FIz4PgEnXVxgscSSbe5p/GCvQ== +"@zk-email/zk-regex-circom@=2.1.1", "@zk-email/zk-regex-circom@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.1.1.tgz#e4f41fd873905d27dd05a9f07613717be4b2e5d1" + integrity sha512-tuU2Kb08fwYkAPDemL8RRvLTEKNGyUt2odYr5awkVKGCZGCV1hxIy/wke6+2fIOR8Lu82MnXVtdBk+G3gRZLbg== dependencies: commander "^11.0.0" snarkjs "^0.7.0" @@ -1897,19 +1879,19 @@ ajv@^6.12.6: uri-js "^4.2.2" ajv@^8.0.1: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" - integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" -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@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.2.1: version "4.3.2" @@ -1943,9 +1925,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== antlr4@^4.11.0: - version "4.13.1" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d" - integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA== + version "4.13.2" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.2.tgz#0d084ad0e32620482a9c3a0e2470c02e72e4006d" + integrity sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg== antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" @@ -2001,9 +1983,9 @@ astral-regex@^2.0.0: integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async@^3.2.3: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== available-typed-arrays@^1.0.7: version "1.0.7" @@ -2060,13 +2042,13 @@ babel-plugin-polyfill-corejs2@^0.4.10: "@babel/helper-define-polyfill-provider" "^0.6.2" semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz#789ac82405ad664c20476d0233b485281deb9c77" - integrity sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg== +babel-plugin-polyfill-corejs3@^0.10.6: + version "0.10.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz#2deda57caef50f59c525aeb4964d3b2f867710c7" + integrity sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA== dependencies: - "@babel/helper-define-polyfill-provider" "^0.6.1" - core-js-compat "^3.36.1" + "@babel/helper-define-polyfill-provider" "^0.6.2" + core-js-compat "^3.38.0" babel-plugin-polyfill-regenerator@^0.6.1: version "0.6.2" @@ -2076,22 +2058,25 @@ babel-plugin-polyfill-regenerator@^0.6.1: "@babel/helper-define-polyfill-provider" "^0.6.2" babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" + integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" babel-preset-jest@^29.5.0, babel-preset-jest@^29.6.3: version "29.6.3" @@ -2199,22 +2184,22 @@ brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.22.2, browserslist@^4.23.0: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== +browserslist@^4.23.1, browserslist@^4.23.3: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" - node-releases "^2.0.14" - update-browserslist-db "^1.0.16" + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" -bs-logger@0.x: +bs-logger@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== @@ -2264,10 +2249,10 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001629: - version "1.0.30001636" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz#b15f52d2bdb95fad32c2f53c0b68032b85188a78" - integrity sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg== +caniuse-lite@^1.0.30001646: + version "1.0.30001655" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" + integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== cargo-cp-artifact@^0.1: version "0.1.9" @@ -2275,9 +2260,9 @@ cargo-cp-artifact@^0.1: integrity sha512-6F+UYzTaGB+awsTXg0uSJA1/b/B3DDJzpKVRu0UmyI7DmNeaAl2RFHuTGIN6fEgpadRxoXGb7gbC1xo4C3IdyA== chai@^4.3.6, chai@^4.3.7: - version "4.4.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" - integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== + version "4.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" check-error "^1.0.3" @@ -2285,7 +2270,7 @@ chai@^4.3.6, chai@^4.3.7: get-func-name "^2.0.2" loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.8" + type-detect "^4.1.0" chalk@^2.4.2: version "2.4.2" @@ -2326,10 +2311,10 @@ child_process@^1.0.2: resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" integrity sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g== -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -2395,9 +2380,9 @@ circomlibjs@^0.1.2: ffjavascript "^0.2.45" cjs-module-lexer@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" - integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== + version "1.4.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" + integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== cliui@^7.0.2: version "7.0.4" @@ -2486,12 +2471,12 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -core-js-compat@^3.31.0, core-js-compat@^3.36.1: - version "3.37.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.37.1.tgz#c844310c7852f4bdf49b8d339730b97e17ff09ee" - integrity sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg== +core-js-compat@^3.37.1, core-js-compat@^3.38.0: + version "3.38.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09" + integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw== dependencies: - browserslist "^4.23.0" + browserslist "^4.23.3" cosmiconfig@^8.0.0: version "8.3.6" @@ -2543,17 +2528,10 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" - -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -2620,10 +2598,10 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -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@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== dotenv@^16.3.1: version "16.4.5" @@ -2634,17 +2612,17 @@ dotenv@^16.3.1: version "1.0.0" resolved "https://github.com/dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0" -ejs@^3.1.6: +ejs@^3.1.10, ejs@^3.1.6: version "3.1.10" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.796: - version "1.4.807" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz#4d6c5ea1516f0164ac5bfd487ccd4ee9507c8f01" - integrity sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A== +electron-to-chromium@^1.5.4: + version "1.5.14" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.14.tgz#8de5fd941f4deede999f90503c4b5923fbe1962b" + integrity sha512-bEfPECb3fJ15eaDnu9LEJ2vPGD6W1vt7vZleSVyFhYuMIKm3vz/g9lt7IvEzgdwj58RjbPKUF2rXTCN/UW47tQ== elliptic@6.5.4: version "6.5.4" @@ -2708,14 +2686,9 @@ es6-promisify@^5.0.0: es6-promise "^4.0.3" escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -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== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -2727,6 +2700,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +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.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -2859,6 +2837,11 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + fastfile@0.0.20: version "0.0.20" resolved "https://registry.yarnpkg.com/fastfile/-/fastfile-0.0.20.tgz#794a143d58cfda2e24c298e5ef619c748c8a1879" @@ -2912,14 +2895,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -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@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2928,6 +2903,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.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" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -2946,8 +2929,8 @@ for-each@^0.3.3: is-callable "^1.1.3" "forge-std@https://github.com/foundry-rs/forge-std": - version "1.8.2" - resolved "https://github.com/foundry-rs/forge-std#19891e6a0b5474b9ea6827ddb90bb9388f7acfc0" + version "1.9.2" + resolved "https://github.com/foundry-rs/forge-std#1ce7535a517406b9aec7ea1ea27c1b41376f712c" fs-minipass@^2.0.0: version "2.1.0" @@ -3036,17 +3019,6 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@8.1.0, glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -3059,6 +3031,17 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.3, glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3123,14 +3106,14 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" -he@1.2.0: +he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -3184,9 +3167,9 @@ human-signals@^2.1.0: integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.3.0: version "3.3.0" @@ -3197,9 +3180,9 @@ import-fresh@^3.3.0: resolve-from "^4.0.0" import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -3248,11 +3231,11 @@ is-callable@^1.1.3: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-extglob@^2.1.1: version "2.1.1" @@ -3337,9 +3320,9 @@ istanbul-lib-instrument@^5.0.4: semver "^6.3.0" istanbul-lib-instrument@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" - integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" "@babel/parser" "^7.23.9" @@ -3374,9 +3357,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jake@^10.8.5: - version "10.9.1" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.1.tgz#8dc96b7fcc41cb19aa502af506da4e1d56f5e62b" - integrity sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w== + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== dependencies: async "^3.2.3" chalk "^4.0.2" @@ -3751,13 +3734,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -3766,6 +3742,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3847,7 +3830,7 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.memoize@4.x: +lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== @@ -3862,7 +3845,7 @@ lodash@^4.17.21, lodash@^4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -3908,7 +3891,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x: +make-error@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -3926,9 +3909,9 @@ merge-stream@^2.0.0: integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== micromatch@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -3960,13 +3943,6 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3974,7 +3950,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -4007,30 +3983,30 @@ mkdirp@^1.0.3: integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== mocha@^10.2.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" - integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" ms@2.0.0: version "2.0.0" @@ -4042,7 +4018,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@^2.1.1, 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== @@ -4075,9 +4051,9 @@ node-fetch@^2.1.1, node-fetch@^2.6.7: whatwg-url "^5.0.0" node-gyp-build@^4.2.2: - version "4.8.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" - integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== + version "4.8.2" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.2.tgz#4f802b71c1ab2ca16af830e6c1ea7dd1ad9496fa" + integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== node-int64@^0.4.0: version "0.4.0" @@ -4092,10 +4068,10 @@ node-int64@^0.4.0: commander "^2.17.0" mime-types "^2.1.19" -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== nopt@^5.0.0: version "5.0.0" @@ -4263,9 +4239,9 @@ pathval@^1.1.1: integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -4300,13 +4276,12 @@ prelude-ls@~1.1.2: integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prettier-plugin-solidity@^1.1.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" - integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== + version "1.4.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz#8060baf18853a9e34d2e09e47e87b4f19e15afe9" + integrity sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg== dependencies: - "@solidity-parser/parser" "^0.17.0" + "@solidity-parser/parser" "^0.18.0" semver "^7.5.4" - solidity-comments-extractor "^0.0.8" prettier@^2.8.3: version "2.8.8" @@ -4314,9 +4289,9 @@ prettier@^2.8.3: integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== prettier@^3.0.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" - integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -4512,15 +4487,15 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.3.5, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -4605,7 +4580,7 @@ snarkjs@0.5.0: logplease "^1.2.15" r1csfile "0.0.41" -snarkjs@^0.7.0: +snarkjs@^0.7.0, snarkjs@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/snarkjs/-/snarkjs-0.7.4.tgz#b9ad5813f055ab84d33f1831a6f1f34a71b6cd46" integrity sha512-x4cOCR4YXSyBlLtfnUUwfbZrw8wFd/Y0lk83eexJzKwZB8ELdpH+10ts8YtDsm2/a3WK7c7p514bbE8NpqxW8w== @@ -4651,11 +4626,6 @@ solhint@^3.6.1: optionalDependencies: prettier "^2.8.3" -solidity-comments-extractor@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" - integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== - source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -4734,18 +4704,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@3.1.1, strip-json-comments@^3.1.1: +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== -supports-color@8.1.1, supports-color@^8.0.0: - 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@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -4760,6 +4723,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.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-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -4842,18 +4812,19 @@ tryer@^1.0.1: integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== ts-jest@^29.1.1: - version "29.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.5.tgz#d6c0471cc78bffa2cb4664a0a6741ef36cfe8f69" - integrity sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg== + version "29.2.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.5.tgz#591a3c108e1f5ebd013d3152142cb5472b399d63" + integrity sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA== dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" + bs-logger "^0.2.6" + ejs "^3.1.10" + fast-json-stable-stringify "^2.1.0" jest-util "^29.0.0" json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "^7.5.3" - yargs-parser "^21.0.1" + lodash.memoize "^4.1.2" + make-error "^1.3.6" + semver "^7.6.3" + yargs-parser "^21.1.1" type-check@~0.3.2: version "0.3.2" @@ -4862,11 +4833,16 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.8: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -4882,10 +4858,10 @@ underscore@1.12.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" @@ -4917,15 +4893,15 @@ universal-user-agent@^2.0.0: dependencies: os-name "^3.0.0" -update-browserslist-db@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== dependencies: escalade "^3.1.2" picocolors "^1.0.1" -uri-js@^4.2.2, uri-js@^4.4.1: +uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== @@ -4954,9 +4930,9 @@ util@^0.12.4: which-typed-array "^1.1.2" v8-to-istanbul@^9.0.1: - version "9.2.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -5055,10 +5031,10 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^7.0.0: version "7.0.0" @@ -5102,22 +5078,17 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -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@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^21.0.1, yargs-parser@^21.1.1: +yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-unparser@2.0.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== @@ -5127,7 +5098,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: +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==