Skip to content

Commit

Permalink
removed commented imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Sniezka1927 committed Dec 4, 2023
1 parent 6ee5921 commit 7e09d9b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/contracts/storage/pool.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use super::{FeeTier, Oracle, Tick}; // Tickmap
// use crate::contracts::
use super::{FeeTier, Oracle, Tick};
use crate::{
contracts::PoolKey,
math::{
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/storage/position.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{Pool, PoolKey, Tick}; // Tickmap
use super::{Pool, PoolKey, Tick};
use crate::{
math::{
clamm::*,
Expand Down
7 changes: 2 additions & 5 deletions src/contracts/storage/tick.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use super::Pool;
use crate::math::types::{
fee_growth::FeeGrowth, liquidity::Liquidity, ratio::sqrt_price::calculate_sqrt_price,
ratio::sqrt_price::SqrtPrice,
};

use traceable_result::*;

use decimal::*;

use super::Pool;
use traceable_result::*;

#[derive(Debug, Copy, Clone, scale::Decode, scale::Encode, PartialEq)]
#[cfg_attr(
Expand Down
1 change: 1 addition & 0 deletions src/contracts/storage/tickmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::math::{
MAX_TICK,
};
use ink::storage::Mapping;

pub const TICK_SEARCH_RANGE: i32 = 256;
pub const CHUNK_SIZE: i32 = 64;

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum InvariantError {
#[ink::contract]
pub mod contract {
use crate::InvariantError;
// use math::fee_growth::FeeGrowth;

use crate::contracts::state::State;
use crate::contracts::Invariant;
use crate::contracts::Pool;
Expand All @@ -48,7 +48,7 @@ pub mod contract {
use crate::math::ratio::sqrt_price::SqrtPrice;
use crate::math::token_amount::TokenAmount;
use crate::math::types::liquidity::Liquidity; //
// use crate

use crate::math::{compute_swap_step, MAX_SQRT_PRICE, MIN_SQRT_PRICE};
use decimal::*;
use ink::contract_ref;
Expand Down Expand Up @@ -188,7 +188,7 @@ pub mod contract {
sqrt_price_limit: SqrtPrice,
) -> Result<CalculateSwapResult, InvariantError> {
let current_timestamp = self.env().block_timestamp();
// let caller = self.env().caller();

if amount.is_zero() {
return Err(InvariantError::AmountIsZero);
}
Expand Down
2 changes: 0 additions & 2 deletions src/math/types/fee_growth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ pub fn calculate_fee_growth_inside(
mod tests {
use super::*;
use crate::math::consts::MAX_TICK;
// use crate::math::calculate_sqrt_price;
use crate::math::types::ratio::sqrt_price::SqrtPrice;
// use decimal::{BetweenDecimals, Decimal, Factories};

#[test]
fn test_unchecked_add() {
Expand Down

0 comments on commit 7e09d9b

Please sign in to comment.