Skip to content

Commit

Permalink
Move util files from ether-email-auth to utils repo
Browse files Browse the repository at this point in the history
  • Loading branch information
DimiDumo committed Sep 16, 2024
1 parent 3506483 commit 856015a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 347 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ serde_json = "1.0.68"
tiny_http = "0.12.0"
lettre = { version = "0.10.4", features = ["tokio1", "tokio1-native-tls"] }
ethers = { version = "2.0.10", features = ["abigen"] }
relayer-utils = { version = "0.3.7", git = "https://github.com/zkemail/relayer-utils.git" }
# relayer-utils = { version = "0.3.7", git = "https://github.com/zkemail/relayer-utils.git" }
relayer-utils = { path = "../../../relayer-utils" }
futures = "0.3.28"
sqlx = { version = "=0.7.3", features = ["postgres", "runtime-tokio"] }
regex = "1.10.2"
Expand Down
1 change: 1 addition & 0 deletions packages/relayer/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use ethers::middleware::Middleware;
use ethers::prelude::*;
use ethers::signers::Signer;
use relayer_utils::converters::u64_to_u8_array_32;
use relayer_utils::TemplateValue;

const CONFIRMATIONS: usize = 1;

Expand Down
5 changes: 4 additions & 1 deletion packages/relayer/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ use ethers::{
abi::{encode, Token},
utils::keccak256,
};
use relayer_utils::{extract_substr_idxes, generate_email_circuit_input, EmailCircuitParams, LOG};
use relayer_utils::{
extract_substr_idxes, extract_template_vals_from_command, generate_email_circuit_input,
generate_proof, EmailCircuitParams, LOG,
};

const DOMAIN_FIELDS: usize = 9;
const COMMAND_FIELDS: usize = 20;
Expand Down
4 changes: 2 additions & 2 deletions packages/relayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod config;
pub mod core;
pub mod database;
pub mod modules;
pub mod utils;
pub mod strings;

pub use abis::*;
pub use chain::*;
Expand All @@ -17,7 +17,7 @@ pub use core::*;
pub use database::*;
pub use modules::*;
use relayer_utils::LOG;
pub use utils::*;
pub use strings::*;

use tokio::sync::Mutex;

Expand Down
2 changes: 1 addition & 1 deletion packages/relayer/src/modules/web_server/rest_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::Result;
use axum::Json;
use hex::decode;
use rand::Rng;
use relayer_utils::LOG;
use relayer_utils::{calculate_account_salt, extract_template_vals, TemplateValue, LOG};
use serde::{Deserialize, Serialize};
use std::str;

Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions packages/relayer/src/utils/mod.rs

This file was deleted.

236 changes: 0 additions & 236 deletions packages/relayer/src/utils/subject_templates.rs

This file was deleted.

Loading

0 comments on commit 856015a

Please sign in to comment.