Skip to content

Commit

Permalink
refactor: remove unnecessary derive
Browse files Browse the repository at this point in the history
  • Loading branch information
detectivekim committed Aug 19, 2024
1 parent 1e165f5 commit f5bce57
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/interfaces/params.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ use starknet::ContractAddress;
use clober_cairo::libraries::book_key::BookKey;
use clober_cairo::libraries::tick::Tick;

#[derive(Copy, Drop, Serde)]
#[derive(Drop, Serde)]
pub struct MakeParams {
pub key: BookKey,
pub tick: Tick,
pub unit: u64,
pub provider: ContractAddress,
}

#[derive(Copy, Drop, Serde)]
#[derive(Drop, Serde)]
pub struct TakeParams {
pub key: BookKey,
pub tick: Tick,
pub max_unit: u64,
}

#[derive(Copy, Drop, Serde)]
#[derive(Drop, Serde)]
pub struct CancelParams {
pub id: felt252,
pub to_unit: u64,
}

#[derive(Copy, Drop, Serde)]
#[derive(Drop, Serde)]
pub struct OrderInfo {
pub provider: ContractAddress,
pub open: u64,
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/book.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub mod Book {
}
}

#[derive(Copy, Drop, starknet::Store)]
#[derive(Drop, starknet::Store)]
pub struct Order {
pub provider: ContractAddress,
pub pending: u64
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/fee_policy.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use clober_cairo::libraries::i257::i257;
const MAX_FEE_RATE: i32 = 500000;
const MIN_FEE_RATE: i32 = -500000;

#[derive(Copy, Drop, Serde, Debug, Hash, PartialEq)]
#[derive(Copy, Drop, Serde, Hash, PartialEq)]
pub struct FeePolicy {
pub uses_quote: bool,
pub rate: i32,
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/lockers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use clober_cairo::libraries::storage_map::{Felt252Map, Felt252MapTrait};

const NOT_IMPLEMENTED: felt252 = 'Not implemented';

#[derive(Copy, Drop)]
#[derive(Drop)]
pub struct Lockers {
lockers: Felt252Map<(ContractAddress, ContractAddress)>
}
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/order_id.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use starknet::storage_access::{StorePacking};
use clober_cairo::utils::constants::{TWO_POW_192, TWO_POW_64, TWO_POW_40};
use clober_cairo::libraries::tick::Tick;

#[derive(Copy, Drop, Serde, Debug)]
#[derive(Drop)]
pub struct OrderId {
pub book_id: felt252, // u187
pub tick: Tick, // i24
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/segmented_segment_tree.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const MAX_NODES_P_MINUS_ONE: u64 = 14; // MAX_NODES / R = 2 ** `14`

pub type SegmentedSegmentTree = Felt252Map<felt252>;

#[derive(Copy, Drop, Serde, Debug)]
#[derive(Copy, Drop)]
struct LayerIndex {
pub group: u64,
pub node: u8
Expand Down

0 comments on commit f5bce57

Please sign in to comment.