Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
karim-en committed Aug 9, 2023
1 parent 0e6d363 commit c4aec91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eth-connector/src/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@ pub enum FeeType {

#[derive(BorshDeserialize, BorshSerialize, Debug, Clone, Serialize, Deserialize, Copy)]
pub struct Fee {
// Fee percentage in 6 decimal precision (10% -> 0.1 * 10e6 -> 100_000)
pub fee_percentage: U128,
// The minimum fee amount for transfer
pub lower_bound: Option<U128>,
// The maximum fee amount for transfer
pub upper_bound: Option<U128>,
}

#[derive(BorshDeserialize, BorshSerialize)]
pub struct FeeStorage {
// Enables a default fee for deposit transfers
pub deposit_fee: Option<Fee>,
// Enables a default fee for withdrawal transfers
pub withdraw_fee: Option<Fee>,
// Override the default fee for deposit transfers that target silos
pub deposit_fee_per_silo: UnorderedMap<AccountId, Fee>,
// Override the default fee for withdrawal transfers initiated by silos
pub withdraw_fee_per_silo: UnorderedMap<AccountId, Fee>,
}

0 comments on commit c4aec91

Please sign in to comment.