From 42c58a6c5404f3043b3db4e5c9b221b986a26265 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Fri, 22 Nov 2024 18:11:18 +0100 Subject: [PATCH 01/13] fix: resolve unused field warnings in config structs - Suppressed warnings for fields used exclusively for serialization/deserialization. --- src/config.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/config.rs b/src/config.rs index a62316c..f81f383 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,10 +43,12 @@ pub_struct!(Clone, Deserialize; StarknetIdContracts { identity_contract: FieldElement, }); -pub_struct!(Clone, Deserialize; NamingContract { address: String }); +pub_struct!(Clone, Deserialize; NamingContract { + _address: String +}); pub_struct!(Clone, Deserialize; StarknetId { - account_id: String, + _account_id: String, }); pub_struct!(Clone, Deserialize; Nostra { @@ -141,17 +143,17 @@ impl<'de> Deserialize<'de> for QuizQuestionType { pub_struct!(Clone, Deserialize,Debug; QuizQuestion { kind: QuizQuestionType, - layout: String, - question: String, - options: Vec, + _layout: String, + _question: String, + _options: Vec, correct_answers: Option>, - correct_order: Option>, - image_for_layout: Option, + _correct_order: Option>, + _image_for_layout: Option, }); pub_struct!(Clone, Deserialize,Debug; Quiz { - name: String, - desc: String, + _name: String, + _desc: String, questions: Vec, }); From d0d31cc50c1b8298fa0090a8fc2146f425c9c182 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Fri, 22 Nov 2024 18:26:23 +0100 Subject: [PATCH 02/13] fix: resolve unused field warnings - Removed unused fields from structs where they were unnecessary. - Suppressed warnings for fields used exclusively for serialization/deserialization. --- .../verify_has_root_or_braavos_domain.rs | 1 + src/endpoints/defi/rewards.rs | 4 +- src/main.rs | 4 +- src/models.rs | 38 +++++++++---------- src/utils.rs | 3 ++ 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/common/verify_has_root_or_braavos_domain.rs b/src/common/verify_has_root_or_braavos_domain.rs index c84c7e5..9e9597a 100644 --- a/src/common/verify_has_root_or_braavos_domain.rs +++ b/src/common/verify_has_root_or_braavos_domain.rs @@ -16,6 +16,7 @@ use starknet::{ }; use starknet_id::decode; +#[allow(dead_code)] pub async fn verify_has_root_or_braavos_domain( state: Arc, addr: &FieldElement, diff --git a/src/endpoints/defi/rewards.rs b/src/endpoints/defi/rewards.rs index d147f96..0c82e7a 100644 --- a/src/endpoints/defi/rewards.rs +++ b/src/endpoints/defi/rewards.rs @@ -16,7 +16,7 @@ use futures::stream::{FuturesOrdered, StreamExt}; use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, USER_AGENT}; use reqwest_middleware::{ClientBuilder, ClientWithMiddleware, Error}; use reqwest_retry::{policies::ExponentialBackoff, RetryTransientMiddleware}; -use reqwest_tracing::TracingMiddleware; +// use reqwest_tracing::TracingMiddleware; use serde::{Deserialize, Serialize}; use serde_json::json; use starknet::{core::types::FieldElement, macros::selector}; @@ -37,7 +37,7 @@ pub async fn get_defi_rewards( // Retry up to 3 times with increasing intervals between attempts. let retry_policy = ExponentialBackoff::builder().build_with_max_retries(3); let client = ClientBuilder::new(reqwest::Client::new()) - .with(TracingMiddleware::default()) + // .with(TracingMiddleware::new()) .with(RetryTransientMiddleware::new_with_policy(retry_policy)) .build(); diff --git a/src/main.rs b/src/main.rs index b543ae8..c06e9d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,13 +26,15 @@ lazy_static::lazy_static! { } #[derive(Serialize)] +#[allow(dead_code)] struct LogData<'a> { token: &'a str, log: LogPayload<'a>, } #[derive(Serialize)] -struct LogPayload<'a> { +#[allow(dead_code)] +struct LogPayload<'a> { app_id: &'a str, r#type: &'a str, message: Cow<'a, str>, diff --git a/src/models.rs b/src/models.rs index ad07e81..98861c3 100644 --- a/src/models.rs +++ b/src/models.rs @@ -98,9 +98,9 @@ pub_struct!(Serialize, Deserialize; NFTUri { }); pub_struct!(Deserialize; CompletedTasks { - address: String, - task_id: u32, - timestamp: i64, + _address: String, + _task_id: u32, + _timestamp: i64, }); #[derive(Debug, Serialize, Deserialize)] @@ -174,8 +174,8 @@ pub_struct!(Deserialize; VerifyNewQuery { }); pub_struct!(Deserialize; EmailQuery { - addr: FieldElement, - email: String, + _addr: FieldElement, + _email: String, }); pub_struct!(Deserialize; VerifyQuizQuery { @@ -185,14 +185,14 @@ pub_struct!(Deserialize; VerifyQuizQuery { }); pub_struct!(Deserialize; VerifyBalanceQuery { - addr: FieldElement, - task_id: u32, + _addr: FieldElement, + _task_id: u32, }); pub_struct!(Deserialize; UniquePageVisit { - viewer_ip: String, - viewed_page_id: String, - timestamp: i64, + _viewer_ip: String, + _viewed_page_id: String, + _timestamp: i64, }); pub_struct!(Deserialize; AchievementQuery { @@ -328,7 +328,7 @@ pub_struct!(Debug, Deserialize, Serialize; BuildingDocument { }); pub_struct!(Deserialize, Debug; DeployedTime { - addr: String, + _addr: String, timestamp: u32, }); @@ -366,14 +366,14 @@ pub_struct!(Debug, Serialize, Deserialize; LoginDetails { }); pub_struct!(Deserialize; CreateBoostQuery { - quest_id: i32, - amount: i32, - token: String, - num_of_winners: i32, - token_decimals: i32, - name: String, - img_url: String, - expiry: i64, + _quest_id: i32, + _amount: i32, + _token: String, + _num_of_winners: i32, + _token_decimals: i32, + _name: String, + _img_url: String, + _expiry: i64, }); #[derive(Serialize, Deserialize, Debug)] diff --git a/src/utils.rs b/src/utils.rs index 2c297a1..3d70f0e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -308,6 +308,7 @@ pub trait AchievementsTrait { achievement_id: u32, ) -> Result; + #[allow(dead_code)] async fn get_achievement( &self, achievement_id: u32, @@ -794,6 +795,8 @@ pub async fn verify_quest_auth( None => false, } } + +#[allow(dead_code)] pub async fn make_api_request(endpoint: &str, addr: &str, api_key: Option<&str>) -> bool { let client = reqwest::Client::new(); let request_builder = client.post(endpoint).json(&json!({ From 94b5d953061854c48883d8c559c51cdd706d2910 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sat, 23 Nov 2024 22:31:51 +0100 Subject: [PATCH 03/13] chore: uncomment .with(TracingMiddleware::default()) --- src/endpoints/defi/rewards.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/defi/rewards.rs b/src/endpoints/defi/rewards.rs index 0c82e7a..d147f96 100644 --- a/src/endpoints/defi/rewards.rs +++ b/src/endpoints/defi/rewards.rs @@ -16,7 +16,7 @@ use futures::stream::{FuturesOrdered, StreamExt}; use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, USER_AGENT}; use reqwest_middleware::{ClientBuilder, ClientWithMiddleware, Error}; use reqwest_retry::{policies::ExponentialBackoff, RetryTransientMiddleware}; -// use reqwest_tracing::TracingMiddleware; +use reqwest_tracing::TracingMiddleware; use serde::{Deserialize, Serialize}; use serde_json::json; use starknet::{core::types::FieldElement, macros::selector}; @@ -37,7 +37,7 @@ pub async fn get_defi_rewards( // Retry up to 3 times with increasing intervals between attempts. let retry_policy = ExponentialBackoff::builder().build_with_max_retries(3); let client = ClientBuilder::new(reqwest::Client::new()) - // .with(TracingMiddleware::new()) + .with(TracingMiddleware::default()) .with(RetryTransientMiddleware::new_with_policy(retry_policy)) .build(); From 9621b29a5e9cc10566193b3ae19003c8dff7f2e3 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sat, 23 Nov 2024 22:41:41 +0100 Subject: [PATCH 04/13] chore: removal of macro --- src/common/verify_has_root_or_braavos_domain.rs | 1 - src/utils.rs | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/common/verify_has_root_or_braavos_domain.rs b/src/common/verify_has_root_or_braavos_domain.rs index 9e9597a..c84c7e5 100644 --- a/src/common/verify_has_root_or_braavos_domain.rs +++ b/src/common/verify_has_root_or_braavos_domain.rs @@ -16,7 +16,6 @@ use starknet::{ }; use starknet_id::decode; -#[allow(dead_code)] pub async fn verify_has_root_or_braavos_domain( state: Arc, addr: &FieldElement, diff --git a/src/utils.rs b/src/utils.rs index 3d70f0e..2c3de72 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -308,7 +308,6 @@ pub trait AchievementsTrait { achievement_id: u32, ) -> Result; - #[allow(dead_code)] async fn get_achievement( &self, achievement_id: u32, @@ -796,7 +795,6 @@ pub async fn verify_quest_auth( } } -#[allow(dead_code)] pub async fn make_api_request(endpoint: &str, addr: &str, api_key: Option<&str>) -> bool { let client = reqwest::Client::new(); let request_builder = client.post(endpoint).json(&json!({ From 32e5cf91a77aad32ec1fb7ae6e69fab90fdd6d14 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sun, 24 Nov 2024 14:01:42 +0100 Subject: [PATCH 05/13] chore: removal of suppressor, unimportant warnings. --- src/models.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/models.rs b/src/models.rs index 98861c3..463f4f8 100644 --- a/src/models.rs +++ b/src/models.rs @@ -98,9 +98,9 @@ pub_struct!(Serialize, Deserialize; NFTUri { }); pub_struct!(Deserialize; CompletedTasks { - _address: String, - _task_id: u32, - _timestamp: i64, + address: String, + task_id: u32, + timestamp: i64, }); #[derive(Debug, Serialize, Deserialize)] @@ -175,7 +175,7 @@ pub_struct!(Deserialize; VerifyNewQuery { pub_struct!(Deserialize; EmailQuery { _addr: FieldElement, - _email: String, + email: String, }); pub_struct!(Deserialize; VerifyQuizQuery { @@ -185,14 +185,14 @@ pub_struct!(Deserialize; VerifyQuizQuery { }); pub_struct!(Deserialize; VerifyBalanceQuery { - _addr: FieldElement, - _task_id: u32, + addr: FieldElement, + task_id: u32, }); pub_struct!(Deserialize; UniquePageVisit { - _viewer_ip: String, - _viewed_page_id: String, - _timestamp: i64, + viewer_ip: String, + viewed_page_id: String, + timestamp: i64, }); pub_struct!(Deserialize; AchievementQuery { @@ -328,7 +328,7 @@ pub_struct!(Debug, Deserialize, Serialize; BuildingDocument { }); pub_struct!(Deserialize, Debug; DeployedTime { - _addr: String, + addr: String, timestamp: u32, }); @@ -366,14 +366,14 @@ pub_struct!(Debug, Serialize, Deserialize; LoginDetails { }); pub_struct!(Deserialize; CreateBoostQuery { - _quest_id: i32, - _amount: i32, - _token: String, - _num_of_winners: i32, - _token_decimals: i32, - _name: String, - _img_url: String, - _expiry: i64, + quest_id: i32, + amount: i32, + token: String, + num_of_winners: i32, + token_decimals: i32, + name: String, + img_url: String, + expiry: i64, }); #[derive(Serialize, Deserialize, Debug)] From 5895ff12188cc38c4c4ee4c01fbe11855a14de10 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sun, 24 Nov 2024 14:02:13 +0100 Subject: [PATCH 06/13] chore: removal of dead code --- src/main.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main.rs b/src/main.rs index c06e9d8..a483bb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,22 +25,6 @@ lazy_static::lazy_static! { pub static ref ROUTE_REGISTRY: Mutex>> = Mutex::new(Vec::new()); } -#[derive(Serialize)] -#[allow(dead_code)] -struct LogData<'a> { - token: &'a str, - log: LogPayload<'a>, -} - -#[derive(Serialize)] -#[allow(dead_code)] -struct LogPayload<'a> { - app_id: &'a str, - r#type: &'a str, - message: Cow<'a, str>, - timestamp: i64, -} - #[tokio::main] async fn main() { let conf = config::load(); From abcea210180b54f06f520dd42aab2779242df66a Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sun, 24 Nov 2024 14:04:12 +0100 Subject: [PATCH 07/13] chore: removal of dead functions or code --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a483bb1..cece234 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,11 +12,10 @@ use axum::{http::StatusCode, Router}; use axum_auto_routes::route; use mongodb::{bson::doc, options::ClientOptions, Client}; use reqwest::Url; -use serde_derive::Serialize; use starknet::providers::{jsonrpc::HttpTransport, JsonRpcClient}; use std::net::SocketAddr; use std::sync::Mutex; -use std::{borrow::Cow, sync::Arc}; +use std::sync::Arc; use tokio::sync; use tower_http::cors::{Any, CorsLayer}; use utils::WithState; From 2cdf0c5d3161aac1e3e994d5c961aced5512e028 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Sun, 24 Nov 2024 14:10:58 +0100 Subject: [PATCH 08/13] chore: removal of functions --- .../verify_has_root_or_braavos_domain.rs | 105 +++--------------- src/utils.rs | 30 +---- 2 files changed, 17 insertions(+), 118 deletions(-) diff --git a/src/common/verify_has_root_or_braavos_domain.rs b/src/common/verify_has_root_or_braavos_domain.rs index c84c7e5..b3e12a6 100644 --- a/src/common/verify_has_root_or_braavos_domain.rs +++ b/src/common/verify_has_root_or_braavos_domain.rs @@ -1,90 +1,17 @@ -use std::{ - sync::Arc, - time::{SystemTime, UNIX_EPOCH}, -}; +// use std::{ +// sync::Arc, +// time::{SystemTime, UNIX_EPOCH}, +// }; -use crate::{ - models::AppState, - utils::{get_error, CompletedTasksTrait}, -}; -use axum::{http::StatusCode, response::IntoResponse, Json}; -use serde_json::json; -use starknet::{ - core::types::{BlockId, BlockTag, FieldElement, FunctionCall}, - macros::selector, - providers::Provider, -}; -use starknet_id::decode; - -pub async fn verify_has_root_or_braavos_domain( - state: Arc, - addr: &FieldElement, - task_id: u32, -) -> impl IntoResponse { - // get starkname from address - let call_result = state - .provider - .call( - FunctionCall { - contract_address: state.conf.starknetid_contracts.naming_contract, - entry_point_selector: selector!("address_to_domain"), - calldata: vec![*addr, FieldElement::ZERO], - }, - BlockId::Tag(BlockTag::Latest), - ) - .await; - - match call_result { - Ok(result) => { - let domain_len = i64::from_str_radix(&FieldElement::to_string(&result[0]), 16).unwrap(); - - if domain_len == 1 { - // get expiry - let Ok(expiry_result) = state - .provider - .call( - FunctionCall { - contract_address: state.conf.starknetid_contracts.naming_contract, - entry_point_selector: selector!("domain_to_expiry"), - calldata: vec![FieldElement::ONE, result[1]], - }, - BlockId::Tag(BlockTag::Latest), - ) - .await - else { - return get_error("error querying expiry".to_string()); - }; - let Ok(expiry): Result = expiry_result[0].try_into() else { - return get_error("error reading expiry".to_string()); - }; - let now = match SystemTime::now().duration_since(UNIX_EPOCH) { - Ok(n) => n.as_secs(), - Err(_) => return get_error("system time before UNIX EPOCH".to_string()), - }; - if expiry < now { - return get_error("expired domain".to_string()); - } - - match state.upsert_completed_task(*addr, task_id).await { - Ok(_) => (StatusCode::OK, Json(json!({"res": true}))).into_response(), - Err(e) => get_error(format!("{}", e)), - } - } else if domain_len == 2 { - if decode(result[2]) == "braavos" { - match state.upsert_completed_task(*addr, task_id).await { - Ok(_) => (StatusCode::OK, Json(json!({"res": true}))).into_response(), - Err(e) => get_error(format!("{}", e)), - } - } else { - get_error("Invalid subdomain: only Braavos subdomains are eligible".to_string()) - } - } else { - get_error( - "Invalid domain: only root domains & Braavos subdomains are eligible" - .to_string(), - ) - } - } - Err(e) => get_error(format!("{}", e)), - } -} +// use crate::{ +// models::AppState, +// utils::{get_error, CompletedTasksTrait}, +// }; +// use axum::{http::StatusCode, response::IntoResponse, Json}; +// use serde_json::json; +// use starknet::{ +// core::types::{BlockId, BlockTag, FieldElement, FunctionCall}, +// macros::selector, +// providers::Provider, +// }; +// use starknet_id::decode; diff --git a/src/utils.rs b/src/utils.rs index 2c3de72..8da6ba2 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -18,7 +18,7 @@ use mongodb::{ IndexModel, }; use rand::distributions::{Distribution, Uniform}; -use serde_json::json; +// use serde_json::json; use starknet::signers::Signer; use starknet::{ core::{ @@ -795,34 +795,6 @@ pub async fn verify_quest_auth( } } -pub async fn make_api_request(endpoint: &str, addr: &str, api_key: Option<&str>) -> bool { - let client = reqwest::Client::new(); - let request_builder = client.post(endpoint).json(&json!({ - "address": addr, - })); - let key = api_key.unwrap_or(""); - let request_builder = match key.is_empty() { - true => request_builder, - false => request_builder.header("apiKey", key), - }; - match request_builder.send().await { - Ok(response) => match response.json::().await { - Ok(json) => { - //check value of result in json - if let Some(data) = json.get("data") { - if let Some(res) = data.get("result") { - return res.as_bool().unwrap(); - } - } - false - } - Err(_) => false, - }, - Err(_) => false, - }; - false -} - // required for axum_auto_routes pub trait WithState: Send { fn to_router(self: Box, shared_state: Arc) -> Router; From ad64f8c6f7b25fc63460cedf4c90150aed9b5c2a Mon Sep 17 00:00:00 2001 From: DioChuks Date: Mon, 25 Nov 2024 13:46:38 +0100 Subject: [PATCH 09/13] chore: removal of unused code/file --- src/common/verify_has_root_or_braavos_domain.rs | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 src/common/verify_has_root_or_braavos_domain.rs diff --git a/src/common/verify_has_root_or_braavos_domain.rs b/src/common/verify_has_root_or_braavos_domain.rs deleted file mode 100644 index b3e12a6..0000000 --- a/src/common/verify_has_root_or_braavos_domain.rs +++ /dev/null @@ -1,17 +0,0 @@ -// use std::{ -// sync::Arc, -// time::{SystemTime, UNIX_EPOCH}, -// }; - -// use crate::{ -// models::AppState, -// utils::{get_error, CompletedTasksTrait}, -// }; -// use axum::{http::StatusCode, response::IntoResponse, Json}; -// use serde_json::json; -// use starknet::{ -// core::types::{BlockId, BlockTag, FieldElement, FunctionCall}, -// macros::selector, -// providers::Provider, -// }; -// use starknet_id::decode; From b937e03116f10b880785516ea755db32a9e6423b Mon Sep 17 00:00:00 2001 From: DioChuks Date: Mon, 25 Nov 2024 13:48:40 +0100 Subject: [PATCH 10/13] chore: removal of variable suppressor --- src/config.rs | 18 +++++++++--------- src/models.rs | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index f81f383..8910a67 100644 --- a/src/config.rs +++ b/src/config.rs @@ -44,11 +44,11 @@ pub_struct!(Clone, Deserialize; StarknetIdContracts { }); pub_struct!(Clone, Deserialize; NamingContract { - _address: String + address: String }); pub_struct!(Clone, Deserialize; StarknetId { - _account_id: String, + account_id: String, }); pub_struct!(Clone, Deserialize; Nostra { @@ -143,17 +143,17 @@ impl<'de> Deserialize<'de> for QuizQuestionType { pub_struct!(Clone, Deserialize,Debug; QuizQuestion { kind: QuizQuestionType, - _layout: String, - _question: String, - _options: Vec, + layout: String, + question: String, + options: Vec, correct_answers: Option>, - _correct_order: Option>, - _image_for_layout: Option, + correct_order: Option>, + image_for_layout: Option, }); pub_struct!(Clone, Deserialize,Debug; Quiz { - _name: String, - _desc: String, + name: String, + desc: String, questions: Vec, }); diff --git a/src/models.rs b/src/models.rs index 463f4f8..ad07e81 100644 --- a/src/models.rs +++ b/src/models.rs @@ -174,7 +174,7 @@ pub_struct!(Deserialize; VerifyNewQuery { }); pub_struct!(Deserialize; EmailQuery { - _addr: FieldElement, + addr: FieldElement, email: String, }); From bde294942cebaa942b323c8ab2b8ceaf5fc04ca7 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Mon, 25 Nov 2024 13:49:51 +0100 Subject: [PATCH 11/13] chore: removal of comment on unused import --- src/utils.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 8da6ba2..43714c2 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -18,7 +18,6 @@ use mongodb::{ IndexModel, }; use rand::distributions::{Distribution, Uniform}; -// use serde_json::json; use starknet::signers::Signer; use starknet::{ core::{ From 3aa7fca0f1512ab3b93f1e34e7e4655d9d8a42c8 Mon Sep 17 00:00:00 2001 From: DioChuks Date: Mon, 25 Nov 2024 13:51:46 +0100 Subject: [PATCH 12/13] fix: error[E0583]: file not found for module `verify_has_root_or_braavos_domain` --> src\common\mod.rs:5:1 | 5 | pub mod verify_has_root_or_braavos_domain; --- src/common/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/mod.rs b/src/common/mod.rs index e6ce6f5..d4537c8 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -2,5 +2,4 @@ pub mod get_achievement; pub mod has_deployed_time; pub mod verify_has_nft; pub mod verify_has_root_domain; -pub mod verify_has_root_or_braavos_domain; pub mod verify_quiz; From 01b65a54a6ea23753cfab419afb3df6d19d0fd3d Mon Sep 17 00:00:00 2001 From: Nico <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:14:44 +0100 Subject: [PATCH 13/13] removing unused code --- src/config.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index 8910a67..b2cae9e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,14 +43,6 @@ pub_struct!(Clone, Deserialize; StarknetIdContracts { identity_contract: FieldElement, }); -pub_struct!(Clone, Deserialize; NamingContract { - address: String -}); - -pub_struct!(Clone, Deserialize; StarknetId { - account_id: String, -}); - pub_struct!(Clone, Deserialize; Nostra { utils_contract: FieldElement, pairs : Vec,