diff --git a/packages/solana-contracts/programs/two-pool/src/instructions/add.rs b/packages/solana-contracts/programs/two-pool/src/instructions/add.rs index aa5dd7d1f..e02aaa550 100644 --- a/packages/solana-contracts/programs/two-pool/src/instructions/add.rs +++ b/packages/solana-contracts/programs/two-pool/src/instructions/add.rs @@ -1,5 +1,5 @@ use { - crate::{common, decimal::U128, error::*, gen_pool_signer_seeds, invariant::Invariant, TwoPool, TOKEN_COUNT}, + crate::{common, error::*, gen_pool_signer_seeds, invariant::Invariant, TwoPool, TOKEN_COUNT}, anchor_lang::prelude::*, anchor_spl::{ associated_token::get_associated_token_address, diff --git a/packages/solana-contracts/programs/two-pool/src/instructions/governance/mpl.rs b/packages/solana-contracts/programs/two-pool/src/instructions/governance/mpl.rs index fbca2aa41..3da90dd1c 100644 --- a/packages/solana-contracts/programs/two-pool/src/instructions/governance/mpl.rs +++ b/packages/solana-contracts/programs/two-pool/src/instructions/governance/mpl.rs @@ -5,7 +5,7 @@ use { // copied from https://github.com/CalebEverett/nftfactory/blob/master/programs/nftfactory/src/lib.rs -#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Debug, Clone)] +#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Debug, Clone)] pub struct AnchorDataV2 { /// The name of the asset pub name: String, @@ -58,7 +58,7 @@ pub enum AnchorUseMethod { Single, } -#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Debug, Clone, Copy)] +#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Debug, Clone, Copy)] pub struct AnchorUses { pub use_method: AnchorUseMethod, pub remaining: u64, diff --git a/packages/solana-contracts/programs/two-pool/src/invariant.rs b/packages/solana-contracts/programs/two-pool/src/invariant.rs index 4c7c391bc..12c3e01e3 100644 --- a/packages/solana-contracts/programs/two-pool/src/invariant.rs +++ b/packages/solana-contracts/programs/two-pool/src/invariant.rs @@ -972,8 +972,8 @@ mod tests { amp_factor, lp_fee, governance_fee, - lp_total_supply.into(), - lp_total_supply.into(), + lp_total_supply, + lp_total_supply, ) .unwrap(); println!( diff --git a/packages/solana-contracts/programs/two-pool/src/pool_fee.rs b/packages/solana-contracts/programs/two-pool/src/pool_fee.rs index c93794ac1..e8524c773 100644 --- a/packages/solana-contracts/programs/two-pool/src/pool_fee.rs +++ b/packages/solana-contracts/programs/two-pool/src/pool_fee.rs @@ -76,7 +76,7 @@ mod tests { fn new_pool_fee2() { let swimlake_fee_value = new_u64(0, 0); let floored_fee = swimlake_fee_value.floor(DECIMALS); - let swimlake_u32 = (floored_fee.get_raw() * 10u64.pow((DECIMALS - floored_fee.get_decimals()) as u32)) as u32; + let _swimlake_u32 = (floored_fee.get_raw() * 10u64.pow((DECIMALS - floored_fee.get_decimals()) as u32)) as u32; // println!("swimlake_u32: {}", swimlake_u32); let swimlake_fee = PoolFee::new(swimlake_fee_value).unwrap(); assert_eq!(swimlake_fee_value, swimlake_fee_value.floor(DECIMALS)); @@ -85,8 +85,8 @@ mod tests { let metapool_fee_value = new_u64(300, 6); let metapool_fee_value2 = new_u64(3, 4); - let metapool_u32 = get_fee_u32(metapool_fee_value); - let metapool2_u32 = get_fee_u32(metapool_fee_value2); + let _metapool_u32 = get_fee_u32(metapool_fee_value); + let _metapool2_u32 = get_fee_u32(metapool_fee_value2); // println!("metapool_u32: {}", metapool_u32); // println!("metapool2_u32: {}", metapool2_u32);