Skip to content

Commit

Permalink
add neccessary traits
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Jan 11, 2024
1 parent cda6467 commit 1c489a3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/entities/base_currency.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub struct CurrencyLike<M: Clone> {
pub chain_id: u32,
pub decimals: u8,
Expand Down
2 changes: 1 addition & 1 deletion src/entities/currency.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub enum Currency {
NativeCurrency(Ether),
Token(Token),
Expand Down
2 changes: 1 addition & 1 deletion src/entities/fractions/currency_amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::prelude::*;
pub type CurrencyAmount<T> = FractionLike<CurrencyMeta<T>>;

// Struct representing metadata about a currency
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub struct CurrencyMeta<T: CurrencyTrait> {
pub currency: T,
pub decimal_scale: BigUint,
Expand Down
2 changes: 1 addition & 1 deletion src/entities/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::prelude::*;
/// Represents an ERC20 token with a unique address and some metadata.
pub type Token = CurrencyLike<TokenMeta>;

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub struct TokenMeta {
pub address: Address,
pub buy_fee_bps: Option<BigUint>,
Expand Down
2 changes: 2 additions & 0 deletions src/entities/weth9.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::{prelude::*, token};

/// `WETH9` represents the WETH9 contract and provides information about WETH tokens on different Ethereum chains.
#[derive(Clone, PartialEq, Debug)]
pub struct WETH9 {
/// A mapping of chain IDs to corresponding WETH tokens.
tokens: HashMap<u32, Token>,
Expand Down

0 comments on commit 1c489a3

Please sign in to comment.