Skip to content

Commit 84e3681

Browse files
Apply suggestions from code review
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
1 parent 533f7ba commit 84e3681

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/test_common/src/mocks/erc20.cairo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ pub mod ERC20ReentrantMock {
322322
) {
323323
let mut contract_state = self.get_contract_mut();
324324

325-
if (contract_state.reenter_type.read() == Type::Before) {
325+
if contract_state.reenter_type.read() == Type::Before {
326326
contract_state.reenter_type.write(Type::No);
327327
contract_state.function_call();
328328
}
@@ -336,7 +336,7 @@ pub mod ERC20ReentrantMock {
336336
) {
337337
let mut contract_state = self.get_contract_mut();
338338

339-
if (contract_state.reenter_type.read() == Type::After) {
339+
if contract_state.reenter_type.read() == Type::After {
340340
contract_state.reenter_type.write(Type::No);
341341
contract_state.function_call();
342342
}

packages/token/src/erc20/extensions/erc4626.cairo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub mod erc4626;
22
pub mod interface;
3-
pub use erc4626::DefaultConfig;
43

4+
pub use erc4626::DefaultConfig;
55
pub use erc4626::ERC4626Component;
66
pub use erc4626::ERC4626DefaultLimits;
77
pub use erc4626::ERC4626DefaultNoFees;

packages/token/src/erc20/extensions/erc4626/erc4626.cairo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/// The drawback of this approach is that the virtual shares do capture (a very small) part of the
3030
/// value being accrued to the vault. Also, if the vault experiences losses and users try to exit
3131
/// the vault, the virtual shares and assets will cause the first exiting user to experience reduced
32-
/// losses to the detriment to the last users who will experience bigger losses.
32+
/// losses to the detriment to the last users who will experience bigger losses.
3333
#[starknet::component]
3434
pub mod ERC4626Component {
3535
use core::num::traits::{Bounded, Pow, Zero};
@@ -512,6 +512,7 @@ pub mod ERC4626Component {
512512
/// - `ERC20::transfer` must return true.
513513
///
514514
/// Emits two `ERC20::Transfer` events (`ERC20::burn` and `ERC20::transfer`).
515+
///
515516
/// Emits a `Withdraw` event.
516517
fn _withdraw(
517518
ref self: ComponentState<TContractState>,
@@ -548,7 +549,6 @@ pub mod ERC4626Component {
548549

549550
math::u256_mul_div(
550551
assets,
551-
//total_supply + math::power(10, Immutable::DECIMALS_OFFSET.into()),
552552
total_supply + 10_u256.pow(Immutable::DECIMALS_OFFSET.into()),
553553
self.total_assets() + 1,
554554
rounding,
@@ -573,9 +573,9 @@ pub mod ERC4626Component {
573573
}
574574
}
575575

576-
///
577-
/// Default (empty) traits
578-
///
576+
//
577+
// Default (empty) traits
578+
//
579579

580580
pub impl ERC4626HooksEmptyImpl<
581581
TContractState,

0 commit comments

Comments
 (0)