From 6826f4c2ff47529d95818886051f7865657a6080 Mon Sep 17 00:00:00 2001
From: aalimsahin
Date: Thu, 1 Aug 2024 05:18:48 +0300
Subject: [PATCH 01/53] feat: updated forge build scripts for zksync
---
packages/contracts/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 624fd075..b995b92f 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"build": "forge build",
- "zkbuild": "forge build --zksync",
+ "zkbuild": "forge build -- --zksync",
"test": "forge test --no-match-test \"testIntegration\"",
"zktest": "forge test --no-match-test \"testIntegration\" --zksync --chain 300",
"lint": "solhint 'src/**/*.sol'"
From 2ad174804414e62f0d18ea716b4bfad880d8214b Mon Sep 17 00:00:00 2001
From: aalimsahin
Date: Thu, 1 Aug 2024 05:21:33 +0300
Subject: [PATCH 02/53] chore: Updated README to replace wallet_eth_addr with
account_eth_addr
---
packages/relayer/README.md | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/packages/relayer/README.md b/packages/relayer/README.md
index 5d859785..f0ca6436 100644
--- a/packages/relayer/README.md
+++ b/packages/relayer/README.md
@@ -9,12 +9,12 @@ You can run the relayer either on your local environments or cloud instances (we
3. If you have not deployed common contracts, build contract artifacts and deploy required contracts.
1. `cd packages/contracts` and run `forge build`.
2. Set the env file in `packages/contracts/.env`, an example env file is as follows,
-
+
```jsx
LOCALHOST_RPC_URL=http://127.0.0.1:8545
SEPOLIA_RPC_URL=https://sepolia.base.org
MAINNET_RPC_URL=https://mainnet.base.org
-
+
PRIVATE_KEY=""
CHAIN_ID=84532
RPC_URL="https://sepolia.base.org"
@@ -38,7 +38,7 @@ You can run the relayer either on your local environments or cloud instances (we
CHAIN_RPC_PROVIDER=https://sepolia.base.org
CHAIN_RPC_EXPLORER=https://sepolia.basescan.org
CHAIN_ID=84532 # Chain ID of the testnet.
-
+
# IMAP + SMTP (Settings will be provided by your email provider)
IMAP_DOMAIN_NAME=imap.gmail.com
IMAP_PORT=993
@@ -46,18 +46,18 @@ You can run the relayer either on your local environments or cloud instances (we
SMTP_DOMAIN_NAME=smtp.gmail.com
LOGIN_ID= # IMAP login id - usually your email address.
LOGIN_PASSWORD="" # IMAP password - usually your email password.
-
+
PROVER_ADDRESS="http://localhost:8080" # Address of the prover.
-
+
DATABASE_URL= "postgres://new_user:my_secure_password@localhost/my_new_database"
WEB_SERVER_ADDRESS="127.0.0.1:4500"
CIRCUITS_DIR_PATH= # Absolute path to packages/circuits
EMAIL_TEMPLATES_PATH= # Absolute path to packages/relayer/eml_templates
-
+
CANISTER_ID="q7eci-dyaaa-aaaak-qdbia-cai"
PEM_PATH="./.ic.pem"
IC_REPLICA_URL="https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=q7eci-dyaaa-aaaak-qdbia-cai"
-
+
JSON_LOGGER=false
```
7. You should have your entire setup up and running!
@@ -76,11 +76,11 @@ Note that from June 2024, IMAP will be enabled by default.
##### Enable two-factor authentication for your Google account:
-Refer to the following help link.
+Refer to the following help link.
[Google 2FA Setup](https://support.google.com/accounts/answer/185839?hl=en&co=GENIE.Platform%3DDesktop)
-##### Create an app password:
+##### Create an app password:
Refer to the following help link. If you do not see the 'App passwords' option, try searching for 'app pass' in the search box to select it.
@@ -97,7 +97,7 @@ Refer to the following help link. If you do not see the 'App passwords' option,
4. (Optional) Delete `db.yml` , `ingress.yml` and `relayer.yml` if applied already
5. (Optional) Build the Relayer’s Docker image and publish it.
6. Set the config in the respective manifests (Here, you can set the image of the relayer in `relayer.yml` , latest image already present in the config.)
-7. Apply `db.yml`
+7. Apply `db.yml`
8. Apply `relayer.yml` , ssh into the pod and run `nohup cargo run &` , this step should be done under a min to pass the liveness check.
9. Apply `ingress.yml`
@@ -143,9 +143,9 @@ It exposes the following REST APIs.
5. If the contract of `account_eth_addr` is not deployed, return a 400 response.
4. If a record with `account_code` exists in the `credentials` table, return a 400 response.
6. Randomly generate a `request_id`. If a record with `request_id` exists in the `requests` table, regenerate a new `request_id`.
- 7. If a record with `account_eth_addr`, `guardian_email_addr` and `is_set=true` exists in the `credentials` table,
+ 7. If a record with `account_eth_addr`, `guardian_email_addr` and `is_set=true` exists in the `credentials` table,
1. Insert `(request_id, account_eth_addr, controller_eth_addr, guardian_email_addr, false, template_idx, false)` into the `requests` table.
- 2. Send `guardian_email_addr` an error email to say that `account_eth_addr` tries to set you to a guardian, which is rejected since you are already its guardian.
+ 2. Send `guardian_email_addr` an error email to say that `account_eth_addr` tries to set you to a guardian, which is rejected since you are already its guardian.
3. Return a 200 response along with `request_id` and `subject_params` **to prevent a malicious client user from learning if the pair of the `account_eth_addr` and the `guardian_email_addr` is already set or not.**
8. Insert `(account_code, account_eth_addr, controller_eth_addr, guardian_email_addr, false)` into the `credentials` table.
9. Insert `(request_id, account_eth_addr, controller_eth_addr, guardian_email_addr, false, template_idx)` into the `requests` table.
@@ -158,12 +158,12 @@ It exposes the following REST APIs.
- `POST recoveryRequest`
1. Receive `controller_eth_addr`, `guardian_email_addr`, `template_idx`, and `subject`.
- 2. Let `subject_template` be the `template_idx`-th template in `recoverySubjectTemplates()` of `wallet_eth_addr`.
+ 2. Let `subject_template` be the `template_idx`-th template in `recoverySubjectTemplates()` of `account_eth_addr`.
3. If the `subject` does not match with `subject_template` return a 400 response. Let `subject_params` be the parsed values.
4. Extract `account_eth_addr` from the given `subject` by following `subject_template`.
5. If the contract of `account_eth_addr` is not deployed, return a 400 response.
6. Randomly generate a `request_id`. If a record with `request_id` exists in the `requests` table, regenerate a new `request_id`.
- 7. If a record with `account_eth_addr`, `guardian_email_addr`, and `is_set=true` exists in the `credentials` table,
+ 7. If a record with `account_eth_addr`, `guardian_email_addr`, and `is_set=true` exists in the `credentials` table,
1. Insert `(request_id, account_eth_addr, controller_eth_addr, guardian_email_addr, true, template_idx, false)` into the `requests` table.
2. Send an email as follows.
- To: `guardian_email_addr`
@@ -171,14 +171,14 @@ It exposes the following REST APIs.
- Reply-to: `relayer_email_addr_before_domain ~~+ "+code" + hex(account_code)~~ + "@" + relayer_email_addr_domain`.
- Body: Any message, but it MUST contain `"#" + digit(request_id)`.
3. Return a 200 response along with `request_id` and `subject_params`.
- 7. If a record with `account_eth_addr`, `guardian_email_addr`, and `is_set=false` exists in the `credentials` table,
- 1. Insert `(request_id, wallet_eth_addr, guardian_email_addr, true, template_idx, false)` into the `requests` table.
+ 7. If a record with `account_eth_addr`, `guardian_email_addr`, and `is_set=false` exists in the `credentials` table,
+ 1. Insert `(request_id, account_eth_addr, guardian_email_addr, true, template_idx, false)` into the `requests` table.
2. Send an email as follows.
- To: `guardian_email_addr`
- Subject: A message to say that `account_eth_addr` requests your account recovery, but you have not approved being its guardian.
3. Return a 200 response along with `request_id` and `subject_params`.
- 8. If a record with `wallet_eth_addr`, `guardian_email_addr` does not exist in the `credentials` table,
- 1. Insert `(request_id, wallet_eth_addr, guardian_email_addr, true, template_idx, false)` into the `requests` table.
+ 8. If a record with `account_eth_addr`, `guardian_email_addr` does not exist in the `credentials` table,
+ 1. Insert `(request_id, account_eth_addr, guardian_email_addr, true, template_idx, false)` into the `requests` table.
2. Send an email as follows.
- To: `guardian_email_addr`
- Subject: if the domain of `guardian_email_addr` signs the To field, `subject`. Otherwise, `subject + " Code "`.
From 58f92d1c07ecec2fdd2c029e6483850dbef85af4 Mon Sep 17 00:00:00 2001
From: aalimsahin
Date: Thu, 1 Aug 2024 05:41:37 +0300
Subject: [PATCH 03/53] feat: added step for creating the ic.pem file to the
readme
---
packages/relayer/README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/packages/relayer/README.md b/packages/relayer/README.md
index f0ca6436..d4f8a333 100644
--- a/packages/relayer/README.md
+++ b/packages/relayer/README.md
@@ -60,6 +60,15 @@ You can run the relayer either on your local environments or cloud instances (we
JSON_LOGGER=false
```
+ 3. Generate the `.ic.pem` file and password.
+ - Create the `.ic.pem` file using OpenSSL:
+ ```sh
+ openssl genpkey -algorithm RSA -out .ic.pem -aes-256-cbc -pass pass:your_password
+ ```
+ - If you need a password, you can generate a random password using:
+ ```sh
+ openssl rand -base64 32
+ ```
7. You should have your entire setup up and running!
NOTE: You need to turn on IMAP on the email id you’d be using for the relayer.
From b2db761ed2a66806afc191be2b07f4bde400f8ea Mon Sep 17 00:00:00 2001
From: Dimitri
Date: Fri, 23 Aug 2024 14:08:18 +0100
Subject: [PATCH 04/53] Add Re: to subject in email replies
---
packages/relayer/src/modules/mail.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/relayer/src/modules/mail.rs b/packages/relayer/src/modules/mail.rs
index de7b27ce..d9c114d5 100644
--- a/packages/relayer/src/modules/mail.rs
+++ b/packages/relayer/src/modules/mail.rs
@@ -332,7 +332,7 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<()> {
);
let render_data = serde_json::json!({"userEmailAddr": email_addr, "request": subject});
let body_html = render_html("acknowledgement.html", render_data).await?;
- let subject = format!("Email Wallet Notification. Acknowledgement.");
+ let subject = format!("Re: {}", subject);
let email = EmailMessage {
to: email_addr,
subject,
From bb662050d6bc37e6bd90fdd6376017d01734c398 Mon Sep 17 00:00:00 2001
From: Shubham Gupta
Date: Mon, 2 Sep 2024 20:08:23 +0530
Subject: [PATCH 05/53] Add note to acceptance_request.html reminding users to
retain the email
---
packages/relayer/eml_templates/acceptance_request.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/relayer/eml_templates/acceptance_request.html b/packages/relayer/eml_templates/acceptance_request.html
index f350817a..6c20379e 100644
--- a/packages/relayer/eml_templates/acceptance_request.html
+++ b/packages/relayer/eml_templates/acceptance_request.html
@@ -172,6 +172,8 @@
Your request ID is #{{requestId}}.
If you did not initiate this request, please contact us immediately.
+
+ Note: Do not delete this email after replying. The code in the title can be used to recover your account in absence of an available relayer
From 0d2ddf1a7b8b9971bffa17d16f65d432ad5796c8 Mon Sep 17 00:00:00 2001
From: Aditya Bisht <44467788+Bisht13@users.noreply.github.com>
Date: Wed, 11 Sep 2024 16:42:37 +0530
Subject: [PATCH 06/53] Update package.json
---
packages/contracts/package.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 0bbbf0c5..44bae057 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -3,10 +3,10 @@
"version": "1.0.0",
"license": "MIT",
"scripts": {
- "build": "forge build",
- "zkbuild": "forge build -- --zksync",
- "test": "forge test --no-match-test \"testIntegration\"",
- "zktest": "forge test --no-match-test \"testIntegration\" --zksync --chain 300",
+ "build": "forge build --skip '*ZKSync*'",
+ "zkbuild": "forge build --zksync",
+ "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",
"build": "forge build --skip '*ZKSync*'",
"zkbuild": "forge build --zksync",
"test": "forge test --no-match-test \"testIntegration\" --skip '*ZKSync*'",
@@ -25,4 +25,4 @@
"forge-std": "https://github.com/foundry-rs/forge-std",
"solhint": "^3.6.1"
}
-}
\ No newline at end of file
+}
From ce2fc6d0d278ed6cbf511daf606b97162b8a1ee8 Mon Sep 17 00:00:00 2001
From: SoraSuegami
Date: Tue, 24 Sep 2024 08:55:40 +0900
Subject: [PATCH 07/53] Fix typo and remove unnecessary file
---
packages/circuits/input.json | 2136 -------------------------------
packages/contracts/package.json | 2 +-
2 files changed, 1 insertion(+), 2137 deletions(-)
delete mode 100644 packages/circuits/input.json
diff --git a/packages/circuits/input.json b/packages/circuits/input.json
deleted file mode 100644
index 7aec4db2..00000000
--- a/packages/circuits/input.json
+++ /dev/null
@@ -1,2136 +0,0 @@
-{
- "padded_header": [
- 115,
- 117,
- 98,
- 106,
- 101,
- 99,
- 116,
- 58,
- 69,
- 109,
- 97,
- 105,
- 108,
- 32,
- 65,
- 99,
- 99,
- 111,
- 117,
- 110,
- 116,
- 32,
- 82,
- 101,
- 99,
- 111,
- 118,
- 101,
- 114,
- 121,
- 32,
- 84,
- 101,
- 115,
- 116,
- 49,
- 13,
- 10,
- 116,
- 111,
- 58,
- 115,
- 117,
- 101,
- 103,
- 97,
- 109,
- 105,
- 115,
- 111,
- 114,
- 97,
- 64,
- 103,
- 109,
- 97,
- 105,
- 108,
- 46,
- 99,
- 111,
- 109,
- 13,
- 10,
- 102,
- 114,
- 111,
- 109,
- 58,
- 101,
- 109,
- 97,
- 105,
- 119,
- 97,
- 108,
- 108,
- 101,
- 116,
- 46,
- 97,
- 108,
- 105,
- 99,
- 101,
- 64,
- 103,
- 109,
- 97,
- 105,
- 108,
- 46,
- 99,
- 111,
- 109,
- 13,
- 10,
- 109,
- 105,
- 109,
- 101,
- 45,
- 118,
- 101,
- 114,
- 115,
- 105,
- 111,
- 110,
- 58,
- 49,
- 46,
- 48,
- 13,
- 10,
- 100,
- 97,
- 116,
- 101,
- 58,
- 70,
- 114,
- 105,
- 44,
- 32,
- 48,
- 54,
- 32,
- 83,
- 101,
- 112,
- 32,
- 50,
- 48,
- 50,
- 52,
- 32,
- 48,
- 53,
- 58,
- 53,
- 55,
- 58,
- 52,
- 52,
- 32,
- 45,
- 48,
- 55,
- 48,
- 48,
- 32,
- 40,
- 80,
- 68,
- 84,
- 41,
- 13,
- 10,
- 109,
- 101,
- 115,
- 115,
- 97,
- 103,
- 101,
- 45,
- 105,
- 100,
- 58,
- 60,
- 54,
- 54,
- 100,
- 97,
- 102,
- 99,
- 52,
- 56,
- 46,
- 49,
- 55,
- 48,
- 97,
- 48,
- 50,
- 50,
- 48,
- 46,
- 51,
- 51,
- 99,
- 51,
- 100,
- 48,
- 46,
- 102,
- 99,
- 98,
- 48,
- 64,
- 109,
- 120,
- 46,
- 103,
- 111,
- 111,
- 103,
- 108,
- 101,
- 46,
- 99,
- 111,
- 109,
- 62,
- 13,
- 10,
- 100,
- 107,
- 105,
- 109,
- 45,
- 115,
- 105,
- 103,
- 110,
- 97,
- 116,
- 117,
- 114,
- 101,
- 58,
- 118,
- 61,
- 49,
- 59,
- 32,
- 97,
- 61,
- 114,
- 115,
- 97,
- 45,
- 115,
- 104,
- 97,
- 50,
- 53,
- 54,
- 59,
- 32,
- 99,
- 61,
- 114,
- 101,
- 108,
- 97,
- 120,
- 101,
- 100,
- 47,
- 114,
- 101,
- 108,
- 97,
- 120,
- 101,
- 100,
- 59,
- 32,
- 100,
- 61,
- 103,
- 109,
- 97,
- 105,
- 108,
- 46,
- 99,
- 111,
- 109,
- 59,
- 32,
- 115,
- 61,
- 50,
- 48,
- 50,
- 51,
- 48,
- 54,
- 48,
- 49,
- 59,
- 32,
- 116,
- 61,
- 49,
- 55,
- 50,
- 53,
- 54,
- 50,
- 55,
- 52,
- 54,
- 53,
- 59,
- 32,
- 120,
- 61,
- 49,
- 55,
- 50,
- 54,
- 50,
- 51,
- 50,
- 50,
- 54,
- 53,
- 59,
- 32,
- 100,
- 97,
- 114,
- 97,
- 61,
- 103,
- 111,
- 111,
- 103,
- 108,
- 101,
- 46,
- 99,
- 111,
- 109,
- 59,
- 32,
- 104,
- 61,
- 115,
- 117,
- 98,
- 106,
- 101,
- 99,
- 116,
- 58,
- 116,
- 111,
- 58,
- 102,
- 114,
- 111,
- 109,
- 58,
- 109,
- 105,
- 109,
- 101,
- 45,
- 118,
- 101,
- 114,
- 115,
- 105,
- 111,
- 110,
- 58,
- 100,
- 97,
- 116,
- 101,
- 58,
- 109,
- 101,
- 115,
- 115,
- 97,
- 103,
- 101,
- 45,
- 105,
- 100,
- 58,
- 102,
- 114,
- 111,
- 109,
- 58,
- 116,
- 111,
- 58,
- 99,
- 99,
- 58,
- 115,
- 117,
- 98,
- 106,
- 101,
- 99,
- 116,
- 32,
- 58,
- 100,
- 97,
- 116,
- 101,
- 58,
- 109,
- 101,
- 115,
- 115,
- 97,
- 103,
- 101,
- 45,
- 105,
- 100,
- 58,
- 114,
- 101,
- 112,
- 108,
- 121,
- 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61,
- 54,
- 48,
- 53,
- 48,
- 48,
- 49,
- 54,
- 56,
- 53,
- 53,
- 54,
- 56,
- 48,
- 56,
- 51,
- 55,
- 50,
- 54,
- 57,
- 61,
- 61,
- 13,
- 10,
- 67,
- 111,
- 110,
- 116,
- 101,
- 110,
- 116,
- 45,
- 84,
- 121,
- 112,
- 101,
- 58,
- 32,
- 116,
- 101,
- 120,
- 116,
- 47,
- 104,
- 116,
- 109,
- 108,
- 59,
- 32,
- 99,
- 104,
- 97,
- 114,
- 115,
- 101,
- 116,
- 61,
- 34,
- 117,
- 116,
- 102,
- 45,
- 56,
- 34,
- 13,
- 10,
- 77,
- 73,
- 77,
- 69,
- 45,
- 86,
- 101,
- 114,
- 115,
- 105,
- 111,
- 110,
- 58,
- 32,
- 49,
- 46,
- 48,
- 13,
- 10,
- 67,
- 111,
- 110,
- 116,
- 101,
- 110,
- 116,
- 45,
- 84,
- 114,
- 97,
- 110,
- 115,
- 102,
- 101,
- 114,
- 45,
- 69,
- 110,
- 99,
- 111,
- 100,
- 105,
- 110,
- 103,
- 58,
- 32,
- 113,
- 117,
- 111,
- 116,
- 101,
- 100,
- 45,
- 112,
- 114,
- 105,
- 110,
- 116,
- 97,
- 98,
- 108,
- 101,
- 13,
- 10,
- 67,
- 111,
- 110,
- 116,
- 101,
- 110,
- 116,
- 45,
- 84,
- 121,
- 112,
- 101,
- 58,
- 32,
- 116,
- 101,
- 120,
- 116,
- 47,
- 104,
- 116,
- 109,
- 108,
- 59,
- 32,
- 99,
- 104,
- 97,
- 114,
- 115,
- 101,
- 116,
- 61,
- 117,
- 116,
- 102,
- 45,
- 56,
- 13,
- 10,
- 13,
- 10,
- 13,
- 10,
- 32,
- 60,
- 104,
- 116,
- 109,
- 108,
- 62,
- 13,
- 10,
- 32,
- 60,
- 98,
- 111,
- 100,
- 121,
- 62,
- 13,
- 10,
- 32,
- 60,
- 104,
- 49,
- 62,
- 72,
- 101,
- 108,
- 108,
- 111,
- 33,
- 60,
- 47,
- 104,
- 49,
- 62,
- 13,
- 10,
- 32,
- 60,
- 112,
- 62,
- 84,
- 104,
- 105,
- 115,
- 32,
- 105,
- 115,
- 32,
- 97,
- 32,
- 116,
- 101,
- 115,
- 116,
- 32,
- 101,
- 109,
- 97,
- 105,
- 108,
- 32,
- 119,
- 105,
- 116,
- 104,
- 32,
- 97,
- 32,
- 98,
- 97,
- 115,
- 105,
- 99,
- 32,
- 72,
- 84,
- 77,
- 76,
- 32,
- 98,
- 111,
- 100,
- 121,
- 46,
- 60,
- 47,
- 112,
- 62,
- 13,
- 10,
- 32,
- 60,
- 100,
- 105,
- 118,
- 32,
- 105,
- 100,
- 61,
- 51,
- 68,
- 34,
- 122,
- 107,
- 101,
- 109,
- 97,
- 105,
- 108,
- 34,
- 62,
- 65,
- 99,
- 99,
- 101,
- 112,
- 116,
- 32,
- 103,
- 117,
- 97,
- 114,
- 100,
- 105,
- 97,
- 110,
- 32,
- 114,
- 101,
- 113,
- 117,
- 101,
- 115,
- 116,
- 32,
- 102,
- 111,
- 114,
- 32,
- 48,
- 120,
- 48,
- 67,
- 48,
- 54,
- 54,
- 56,
- 56,
- 101,
- 54,
- 49,
- 67,
- 48,
- 54,
- 52,
- 54,
- 54,
- 69,
- 61,
- 13,
- 10,
- 50,
- 97,
- 53,
- 67,
- 54,
- 102,
- 69,
- 52,
- 69,
- 49,
- 53,
- 99,
- 51,
- 53,
- 57,
- 50,
- 54,
- 48,
- 97,
- 51,
- 51,
- 102,
- 51,
- 32,
- 67,
- 111,
- 100,
- 101,
- 32,
- 49,
- 49,
- 54,
- 50,
- 101,
- 98,
- 102,
- 102,
- 52,
- 48,
- 57,
- 49,
- 56,
- 97,
- 102,
- 101,
- 53,
- 51,
- 48,
- 53,
- 101,
- 54,
- 56,
- 51,
- 57,
- 54,
- 102,
- 48,
- 50,
- 56,
- 51,
- 101,
- 98,
- 54,
- 55,
- 53,
- 57,
- 48,
- 49,
- 100,
- 48,
- 51,
- 56,
- 55,
- 102,
- 57,
- 61,
- 13,
- 10,
- 55,
- 100,
- 50,
- 49,
- 57,
- 50,
- 56,
- 100,
- 52,
- 50,
- 51,
- 97,
- 97,
- 97,
- 48,
- 98,
- 53,
- 52,
- 60,
- 47,
- 100,
- 105,
- 118,
- 62,
- 61,
- 50,
- 48,
- 13,
- 10,
- 32,
- 60,
- 47,
- 98,
- 111,
- 100,
- 121,
- 62,
- 13,
- 10,
- 32,
- 60,
- 47,
- 104,
- 116,
- 109,
- 108,
- 62,
- 13,
- 10,
- 32,
- 61,
- 50,
- 48,
- 13,
- 10,
- 45,
- 45,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 61,
- 54,
- 48,
- 53,
- 48,
- 48,
- 49,
- 54,
- 56,
- 53,
- 53,
- 54,
- 56,
- 48,
- 56,
- 51,
- 55,
- 50,
- 54,
- 57,
- 61,
- 61,
- 45,
- 45,
- 13,
- 10,
- 128,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 16,
- 112,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,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,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- ],
- "body_hash_idx": 436,
- "public_key": [
- "2107195391459410975264579855291297887",
- "2562632063603354817278035230349645235",
- "1868388447387859563289339873373526818",
- "2159353473203648408714805618210333973",
- "351789365378952303483249084740952389",
- "659717315519250910761248850885776286",
- "1321773785542335225811636767147612036",
- "258646249156909342262859240016844424",
- "644872192691135519287736182201377504",
- "174898460680981733302111356557122107",
- "1068744134187917319695255728151595132",
- "1870792114609696396265442109963534232",
- "8288818605536063568933922407756344",
- "1446710439657393605686016190803199177",
- "2256068140678002554491951090436701670",
- "518946826903468667178458656376730744",
- "3222036726675473160989497427257757"
- ],
- "signature": [
- "170161271844255892981997056109468295",
- "2042410320678089637820651285407478756",
- "2235307951907446725362990721960277744",
- "2558650872283482274023232178928077002",
- "1125115414447411231828809260942904609",
- "2396701783176084287341878147443533109",
- "2128856280301536390906877240389145121",
- "2428098792522595894701475799989919597",
- "1647552530172515032677576620955308208",
- "2527537180972491287857094609185809092",
- "2132950398601810533565118801188358141",
- "160538878880934704009688085302112521",
- "898519688023416454463467167922781011",
- "258221678414411925992593903157944861",
- "1423180960707426692015227448675294049",
- "1156922850624474726553341869246641892",
- "1773570027362757618569452574560009"
- ],
- "padded_header_len": 512,
- "padded_body_len": 576,
- "precomputed_sha": [
- 106,
- 9,
- 230,
- 103,
- 187,
- 103,
- 174,
- 133,
- 60,
- 110,
- 243,
- 114,
- 165,
- 79,
- 245,
- 58,
- 81,
- 14,
- 82,
- 127,
- 155,
- 5,
- 104,
- 140,
- 31,
- 131,
- 217,
- 171,
- 91,
- 224,
- 205,
- 25
- ],
- "account_code": "0x1162ebff40918afe5305e68396f0283eb675901d0387f97d21928d423aaa0b54",
- "from_addr_idx": 69,
- "domain_idx": 17,
- "timestamp_idx": 297,
- "code_idx": 380,
- "command_idx": 0,
- "padded_cleaned_body": null
-}
\ No newline at end of file
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 49b972d8..3fc1d004 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -6,7 +6,7 @@
"build": "forge build --skip '*ZKSync*'",
"zkbuild": "forge build --zksync",
"test": "forge test --no-match-test \"testIntegration\" --no-match-contract \".*Script.*\" --skip '*ZKSync*'",
- "zktest": "forge test --no-match-test \"testIntegration\" --no-match-contract \".*Script.*\" --system-mode=true --zksync --gas-limit 1000000000 --chain 300",,
+ "zktest": "forge test --no-match-test \"testIntegration\" --no-match-contract \".*Script.*\" --system-mode=true --zksync --gas-limit 1000000000 --chain 300",
"lint": "solhint 'src/**/*.sol'"
},
"dependencies": {
From 0f961e653b69a451da7f607cbca8cd0b1ddcc98b Mon Sep 17 00:00:00 2001
From: Aditya Bisht
Date: Sun, 8 Sep 2024 20:03:56 +0530
Subject: [PATCH 08/53] chore: refactor
---
.../eml_templates/credential_not_present.html | 3 ++-
packages/relayer/src/core.rs | 8 +++----
packages/relayer/src/modules/mail.rs | 21 +++++++++++--------
.../src/modules/web_server/rest_api.rs | 6 ++----
...ject_templates.rs => command_templates.rs} | 3 +--
packages/relayer/src/utils/mod.rs | 4 ++--
packages/relayer/src/utils/utils.rs | 4 ----
7 files changed, 23 insertions(+), 26 deletions(-)
rename packages/relayer/src/utils/{subject_templates.rs => command_templates.rs} (99%)
diff --git a/packages/relayer/eml_templates/credential_not_present.html b/packages/relayer/eml_templates/credential_not_present.html
index d823a014..b13ee178 100644
--- a/packages/relayer/eml_templates/credential_not_present.html
+++ b/packages/relayer/eml_templates/credential_not_present.html
@@ -167,7 +167,7 @@
"
>
You have received an guardian request from the wallet address {{walletAddress}}.
- Add the guardian's account code in the subject and reply to this email.
+ Reply to this email.
Your request ID is #{{requestId}}.
@@ -414,5 +414,6 @@
|
+