diff --git a/packages/test_common/src/mocks/erc20.cairo b/packages/test_common/src/mocks/erc20.cairo index 3891fba49..225d60a9b 100644 --- a/packages/test_common/src/mocks/erc20.cairo +++ b/packages/test_common/src/mocks/erc20.cairo @@ -322,7 +322,7 @@ pub mod ERC20ReentrantMock { ) { let mut contract_state = self.get_contract_mut(); - if (contract_state.reenter_type.read() == Type::Before) { + if contract_state.reenter_type.read() == Type::Before { contract_state.reenter_type.write(Type::No); contract_state.function_call(); } @@ -336,7 +336,7 @@ pub mod ERC20ReentrantMock { ) { let mut contract_state = self.get_contract_mut(); - if (contract_state.reenter_type.read() == Type::After) { + if contract_state.reenter_type.read() == Type::After { contract_state.reenter_type.write(Type::No); contract_state.function_call(); } diff --git a/packages/token/src/erc20/extensions/erc4626.cairo b/packages/token/src/erc20/extensions/erc4626.cairo index c0b2bc208..f9e34c1aa 100644 --- a/packages/token/src/erc20/extensions/erc4626.cairo +++ b/packages/token/src/erc20/extensions/erc4626.cairo @@ -1,7 +1,7 @@ pub mod erc4626; pub mod interface; -pub use erc4626::DefaultConfig; +pub use erc4626::DefaultConfig; pub use erc4626::ERC4626Component; pub use erc4626::ERC4626DefaultLimits; pub use erc4626::ERC4626DefaultNoFees; diff --git a/packages/token/src/erc20/extensions/erc4626/erc4626.cairo b/packages/token/src/erc20/extensions/erc4626/erc4626.cairo index 67977e6de..d86fc8ac7 100644 --- a/packages/token/src/erc20/extensions/erc4626/erc4626.cairo +++ b/packages/token/src/erc20/extensions/erc4626/erc4626.cairo @@ -29,7 +29,7 @@ /// The drawback of this approach is that the virtual shares do capture (a very small) part of the /// value being accrued to the vault. Also, if the vault experiences losses and users try to exit /// the vault, the virtual shares and assets will cause the first exiting user to experience reduced -/// losses to the detriment to the last users who will experience bigger losses. +/// losses to the detriment to the last users who will experience bigger losses. #[starknet::component] pub mod ERC4626Component { use core::num::traits::{Bounded, Pow, Zero}; @@ -512,6 +512,7 @@ pub mod ERC4626Component { /// - `ERC20::transfer` must return true. /// /// Emits two `ERC20::Transfer` events (`ERC20::burn` and `ERC20::transfer`). + /// /// Emits a `Withdraw` event. fn _withdraw( ref self: ComponentState, @@ -548,7 +549,6 @@ pub mod ERC4626Component { math::u256_mul_div( assets, - //total_supply + math::power(10, Immutable::DECIMALS_OFFSET.into()), total_supply + 10_u256.pow(Immutable::DECIMALS_OFFSET.into()), self.total_assets() + 1, rounding, @@ -573,9 +573,9 @@ pub mod ERC4626Component { } } -/// -/// Default (empty) traits -/// +// +// Default (empty) traits +// pub impl ERC4626HooksEmptyImpl< TContractState,