Skip to content

Commit 0ddc302

Browse files
committed
update lib
1 parent cc052f6 commit 0ddc302

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

src/lib.cairo

+9-9
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ mod tests {
9999
mod test_controller;
100100
pub mod utils;
101101
}
102-
// mod equalizer {
103-
// mod test_allocator;
104-
// mod test_equalizer;
105-
// pub mod utils;
106-
// }
102+
mod equalizer {
103+
mod test_allocator;
104+
mod test_equalizer;
105+
pub mod utils;
106+
}
107107
// mod external {
108108
// mod test_ekubo;
109109
// mod test_pragma_v2;
110110
// pub mod utils;
111111
// }
112-
// mod flash_mint {
113-
// mod test_flash_mint;
114-
// pub mod utils;
115-
// }
112+
mod flash_mint {
113+
mod test_flash_mint;
114+
pub mod utils;
115+
}
116116
mod gate {
117117
mod test_gate;
118118
pub mod utils;

src/tests/flash_mint/test_flash_mint.cairo

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
mod test_flash_mint {
22
use core::num::traits::Zero;
33
use opus::core::flash_mint::flash_mint as flash_mint_contract;
4-
use opus::interfaces::IERC20::{IERC20Dispatcher, IERC20DispatcherTrait};
5-
use opus::interfaces::IEqualizer::{IEqualizerDispatcher, IEqualizerDispatcherTrait};
6-
use opus::interfaces::IFlashBorrower::{IFlashBorrowerDispatcher, IFlashBorrowerDispatcherTrait};
4+
use opus::interfaces::IERC20::IERC20DispatcherTrait;
5+
use opus::interfaces::IEqualizer::IEqualizerDispatcherTrait;
76
use opus::interfaces::IFlashMint::{IFlashMintDispatcher, IFlashMintDispatcherTrait};
8-
use opus::interfaces::IShrine::{IShrineDispatcher, IShrineDispatcherTrait};
7+
use opus::interfaces::IShrine::IShrineDispatcherTrait;
98
use opus::mock::flash_borrower::flash_borrower as flash_borrower_contract;
109
use opus::tests::common;
1110
use opus::tests::equalizer::utils::equalizer_utils;
1211
use opus::tests::flash_mint::utils::flash_mint_utils;
1312
use opus::tests::shrine::utils::shrine_utils;
14-
use snforge_std::{
15-
CheatTarget, EventSpyAssertionsTrait, spy_events, start_cheat_caller_address, stop_cheat_caller_address,
16-
};
13+
use snforge_std::{EventSpyAssertionsTrait, spy_events, start_cheat_caller_address, stop_cheat_caller_address};
1714
use starknet::ContractAddress;
18-
use wadray::{SignedWad, WAD_ONE, Wad};
15+
use wadray::{WAD_ONE, Wad};
1916

2017
//
2118
// Tests

src/tests/flash_mint/utils.cairo

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ pub mod flash_mint_utils {
22
use access_control::{IAccessControlDispatcher, IAccessControlDispatcherTrait};
33
use core::num::traits::Zero;
44
use opus::core::roles::shrine_roles;
5-
use opus::interfaces::IFlashMint::{IFlashMintDispatcher, IFlashMintDispatcherTrait};
5+
use opus::interfaces::IFlashMint::IFlashMintDispatcher;
66
use opus::interfaces::IShrine::{IShrineDispatcher, IShrineDispatcherTrait};
7-
use opus::mock::flash_borrower::flash_borrower as flash_borrower_contract;
87
use opus::tests::shrine::utils::shrine_utils;
9-
use snforge_std::{CheatTarget, ContractClassTrait, declare, start_cheat_caller_address, stop_cheat_caller_address};
10-
use starknet::{ContractAddress, SyscallResultTrait};
11-
use wadray::{WAD_ONE, Wad};
8+
use snforge_std::{
9+
ContractClassTrait, DeclareResultTrait, declare, start_cheat_caller_address, stop_cheat_caller_address,
10+
};
11+
use starknet::ContractAddress;
12+
use wadray::WAD_ONE;
1213

1314
pub const YIN_TOTAL_SUPPLY: u128 = 20000000000000000000000; // 20000 * WAD_ONE
1415
pub const DEFAULT_MINT_AMOUNT: u256 = 500000000000000000000; // 500 * WAD_ONE
@@ -48,7 +49,7 @@ pub mod flash_mint_utils {
4849
);
4950

5051
// Mint some yin in shrine
51-
start_cheat_caller_address(CheatTarget::All, shrine_utils::admin());
52+
start_cheat_caller_address(shrine, shrine_utils::admin());
5253
shrine_dispatcher.inject(Zero::zero(), YIN_TOTAL_SUPPLY.into());
5354
(shrine, flashmint)
5455
}

0 commit comments

Comments
 (0)