Skip to content

Commit

Permalink
Rename zora_premint_v2 -> zora_premint
Browse files Browse the repository at this point in the history
  • Loading branch information
ligustah committed Apr 23, 2024
1 parent 5157fa9 commit 5828068
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures_util::StreamExt;

use crate::chain_list::{ChainListProvider, CHAINS};
use crate::controller::{ControllerCommands, ControllerInterface};
use crate::premints::zora_premint_v2::types::PREMINT_FACTORY_ADDR;
use crate::premints::zora_premint::types::PREMINT_FACTORY_ADDR;
use crate::types::{InclusionClaim, Premint, PremintTypes};

pub async fn contract_call<T>(call: T, provider: &Arc<ChainListProvider>) -> eyre::Result<T::Return>
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::Parser;
use mintpool::api;
use mintpool::premints::zora_premint_v2::types::ZoraPremintV2;
use mintpool::premints::zora_premint::types::ZoraPremintV2;
use mintpool::rules::RulesEngine;
use mintpool::run::{start_p2p_services, start_watch_chain};
use mintpool::stdin::watch_stdin;
Expand Down
2 changes: 1 addition & 1 deletion src/premints/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod metadata;
pub mod zora_premint_v2;
pub mod zora_premint;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloy_primitives::Signature;
use alloy_sol_types::SolStruct;

use crate::chain::contract_call;
use crate::premints::zora_premint_v2::types::{IZoraPremintV2, ZoraPremintV2};
use crate::premints::zora_premint::types::{IZoraPremintV2, ZoraPremintV2};
use crate::rules::Evaluation::Accept;
use crate::rules::{Evaluation, Rule, RuleContext};
use crate::storage::Reader;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::borrow::Cow;

use crate::premints::zora_premint_v2::types::IZoraPremintV2::PremintedV2;
use crate::premints::zora_premint::types::IZoraPremintV2::PremintedV2;
use crate::types::{InclusionClaim, Premint, PremintMetadata, PremintName};
use alloy::rpc::types::eth::{Filter, Log, TransactionReceipt};
use alloy::sol_types::private::U256;
Expand All @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize};
sol! {
#[derive(Debug, Serialize, Deserialize, PartialEq)]
IZoraPremintV2,
"src/premints/zora_premint_v2/zora1155PremintExecutor.json"
"src/premints/zora_premint/zora1155PremintExecutor.json"
}

// aliasing the types here for readability. the original name need to stay
Expand Down
4 changes: 2 additions & 2 deletions src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ pub fn all_rules<T: Reader>() -> Vec<Box<dyn Rule<T>>> {
let mut rules: Vec<Box<dyn Rule<T>>> = Vec::new();

rules.append(&mut general::all_rules());
rules.append(&mut crate::premints::zora_premint_v2::rules::all_rules());
rules.append(&mut crate::premints::zora_premint::rules::all_rules());

rules
}
Expand Down Expand Up @@ -455,7 +455,7 @@ mod general {

#[cfg(test)]
mod test {
use crate::premints::zora_premint_v2::types::ZoraPremintV2;
use crate::premints::zora_premint::types::ZoraPremintV2;
use crate::rules::general::existing_token_uri;
use crate::rules::Evaluation::{Accept, Reject};
use crate::storage::{PremintStorage, Writer};
Expand Down
2 changes: 1 addition & 1 deletion src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ mod test {
use sqlx::Row;

use crate::config::Config;
use crate::premints::zora_premint_v2::types::ZoraPremintV2;
use crate::premints::zora_premint::types::ZoraPremintV2;
use crate::storage;
use crate::storage::{
list_all, list_all_with_options, PremintStorage, QueryOptions, Reader, Writer,
Expand Down
6 changes: 3 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::premints::zora_premint_v2::types::ZoraPremintV2;
use crate::premints::zora_premint::types::ZoraPremintV2;
use alloy::rpc::types::eth::{Filter, Log, TransactionReceipt};
use alloy_primitives::{Address, B256, U256};
use async_trait::async_trait;
Expand Down Expand Up @@ -178,10 +178,10 @@ pub struct PeerInclusionClaim {
#[cfg(test)]
mod test {
use super::*;
use crate::premints::zora_premint_v2::types::IZoraPremintV2::{
use crate::premints::zora_premint::types::IZoraPremintV2::{
ContractCreationConfig, CreatorAttribution, TokenCreationConfig,
};
use crate::premints::zora_premint_v2::types::{IZoraPremintV2, PREMINT_FACTORY_ADDR};
use crate::premints::zora_premint::types::{IZoraPremintV2, PREMINT_FACTORY_ADDR};
use alloy::rpc::types::eth::ReceiptEnvelope;
use alloy_primitives::{Bytes, LogData};
use alloy_sol_types::SolEvent;
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use alloy_transport::TransportErrorKind;
use mintpool::api::admin::node_info;
use mintpool::config::{ChainInclusionMode, Config};
use mintpool::controller::{ControllerCommands, DBQuery};
use mintpool::premints::zora_premint_v2::types::IZoraPremintV2::MintArguments;
use mintpool::premints::zora_premint_v2::types::{
use mintpool::premints::zora_premint::types::IZoraPremintV2::MintArguments;
use mintpool::premints::zora_premint::types::{
IZoraPremintV2, ZoraPremintV2, PREMINT_FACTORY_ADDR,
};
use mintpool::rules::RulesEngine;
Expand Down

0 comments on commit 5828068

Please sign in to comment.