diff --git a/src/api/mod.rs b/src/api/mod.rs index 898570e..46c3bd9 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -44,7 +44,7 @@ impl AppState { } } -pub fn router_with_defaults(config: &Config) -> Router { +pub fn router_with_defaults(_config: &Config) -> Router { Router::new() .route("/health", get(routes::health)) .route("/list-all", get(routes::list_all)) diff --git a/src/api/routes.rs b/src/api/routes.rs index 03ee499..4faef2a 100644 --- a/src/api/routes.rs +++ b/src/api/routes.rs @@ -1,10 +1,7 @@ -use std::path::Display; - use axum::extract::{Path, Query, State}; use axum::http::StatusCode; use axum::Json; use const_hex::ToHexExt; -use itertools::Itertools; use libp2p::autonat::NatStatus; use serde::Serialize; use sqlx::{Executor, Row}; diff --git a/src/chain_list.rs b/src/chain_list.rs index 563a494..8fe5eed 100644 --- a/src/chain_list.rs +++ b/src/chain_list.rs @@ -1,4 +1,3 @@ -use alloy::network::Network; use alloy::providers::{ProviderBuilder, RootProvider}; use alloy::pubsub::PubSubFrontend; use alloy::rpc::client::WsConnect; diff --git a/src/main.rs b/src/main.rs index 51fbfb0..c0d7163 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,6 @@ use mintpool::rules::RulesEngine; use mintpool::run::{start_p2p_services, start_watch_chain}; use mintpool::stdin::watch_stdin; use tokio::signal::unix::{signal, SignalKind}; -use tracing_subscriber::EnvFilter; #[tokio::main] async fn main() -> eyre::Result<()> { diff --git a/src/p2p.rs b/src/p2p.rs index 7391a5b..056ba65 100644 --- a/src/p2p.rs +++ b/src/p2p.rs @@ -1,6 +1,4 @@ use std::borrow::Cow; -use std::collections::HashMap; -use std::hash::Hasher; use std::time::Duration; use eyre::WrapErr; @@ -34,8 +32,8 @@ use crate::multi_ticker::MultiTicker; use crate::multiaddr_ext::MultiaddrExt; use crate::storage::QueryOptions; use crate::types::{ - claims_topic_hashes, InclusionClaim, MintpoolNodeInfo, PeerInclusionClaim, Premint, - PremintName, PremintTypes, + claims_topic_hashes, InclusionClaim, MintpoolNodeInfo, PeerInclusionClaim, PremintName, + PremintTypes, }; #[derive(NetworkBehaviour)] @@ -853,6 +851,7 @@ impl SwarmController { Ok(()) } + #[allow(dead_code)] fn gossip_unsubscribe(&mut self, topic: &IdentTopic) -> eyre::Result<()> { let b = self.swarm.behaviour_mut(); diff --git a/src/premints/metadata.rs b/src/premints/metadata.rs deleted file mode 100644 index 184f8a1..0000000 --- a/src/premints/metadata.rs +++ /dev/null @@ -1,23 +0,0 @@ -use serde::{Deserialize, Serialize}; -use serde_json::{Map, Value}; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -pub struct ERC721Metadata { - pub name: String, - pub description: String, - pub image: String, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -pub struct ERC1155Metadata { - pub name: String, - pub description: String, - pub image: String, - pub decimals: u64, - pub properties: Map, -} - -enum TokenMetadata { - ERC721(ERC721Metadata), - ERC1155(ERC1155Metadata), -} diff --git a/src/premints/mod.rs b/src/premints/mod.rs index 4ee9891..d93e6dc 100644 --- a/src/premints/mod.rs +++ b/src/premints/mod.rs @@ -1,2 +1 @@ -pub mod metadata; pub mod zora_premint; diff --git a/src/premints/zora_premint/erc20v1.rs b/src/premints/zora_premint/erc20v1.rs index 8e032f9..5d2c591 100644 --- a/src/premints/zora_premint/erc20v1.rs +++ b/src/premints/zora_premint/erc20v1.rs @@ -2,7 +2,6 @@ use crate::{implement_zora_premint_traits, typed_rule}; use alloy::primitives::Address; use crate::premints::zora_premint::contract::IZoraPremintERC20V1; -use crate::premints::zora_premint::contract::IZoraPremintV2::IZoraPremintV2Errors; use crate::rules::Rule; use crate::storage::Reader; diff --git a/src/premints/zora_premint/rules.rs b/src/premints/zora_premint/rules.rs index b68e197..e3ec2df 100644 --- a/src/premints/zora_premint/rules.rs +++ b/src/premints/zora_premint/rules.rs @@ -1,8 +1,3 @@ -use crate::premints::zora_premint::v2::V2; -use crate::rules::Rule; -use crate::storage::Reader; -use crate::typed_rule; -use crate::types::PremintTypes; #[macro_export] macro_rules! zora_premint_rules { ($namespace:tt, $typ:ty, $version:literal) => { diff --git a/src/rules.rs b/src/rules.rs index 26731f6..91f49ef 100644 --- a/src/rules.rs +++ b/src/rules.rs @@ -9,7 +9,7 @@ use serde::{Serialize, Serializer}; use crate::chain_list::{ChainListProvider, CHAINS}; use crate::config::Config; -use crate::storage::{PremintStorage, Reader}; +use crate::storage::Reader; use crate::types::PremintTypes; #[derive(Debug, PartialEq, Eq, Clone)] diff --git a/src/run.rs b/src/run.rs index 2f13939..468083e 100644 --- a/src/run.rs +++ b/src/run.rs @@ -1,5 +1,4 @@ use alloy::hex; -use libp2p::identity; use libp2p::identity::Keypair; use std::time::Duration; use tracing::{info_span, Instrument}; @@ -10,7 +9,7 @@ use crate::config::{BootNodes, ChainInclusionMode, Config}; use crate::controller::{Controller, ControllerCommands, ControllerInterface}; use crate::p2p::SwarmController; use crate::rules::RulesEngine; -use crate::storage::{PremintStorage, Reader}; +use crate::storage::PremintStorage; use crate::types::Premint; /// Starts the libp2p swarm, the controller, and the checkers if applicable, then wires them all up. diff --git a/src/storage.rs b/src/storage.rs index 3c60516..ce5b8cf 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -9,7 +9,7 @@ use sqlx::Row; use sqlx::{QueryBuilder, Sqlite, SqlitePool}; use crate::config::Config; -use crate::types::{InclusionClaim, Premint, PremintName, PremintTypes}; +use crate::types::{InclusionClaim, PremintName, PremintTypes}; async fn init_db(config: &Config) -> SqlitePool { let expect_msg =