Skip to content

Commit

Permalink
liquidation test passed
Browse files Browse the repository at this point in the history
  • Loading branch information
sparqet committed Jun 28, 2024
1 parent e6f167f commit 1884dd0
Show file tree
Hide file tree
Showing 2 changed files with 471 additions and 14 deletions.
18 changes: 9 additions & 9 deletions src/exchange/liquidation_handler.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ mod LiquidationHandler {
BaseOrderHandler::unsafe_new_contract_state(); //retrieve BaseOrderHandler state
global_reentrancy_guard::non_reentrant_before(state_base.data_store.read());

let mut role_state: RoleModule::ContractState = RoleModule::unsafe_new_contract_state();
IRoleModule::only_liquidation_keeper(@role_state);
// let mut role_state: RoleModule::ContractState = RoleModule::unsafe_new_contract_state(); TODO uncomment role
// IRoleModule::only_liquidation_keeper(@role_state);

// with_oracle_prices_before(
// state_base.oracle.read(),
// state_base.data_store.read(),
// state_base.event_emitter.read(),
// @oracle_params
// );
with_oracle_prices_before(
state_base.oracle.read(),
state_base.data_store.read(),
state_base.event_emitter.read(),
@oracle_params
);

// let starting_gas: u128 = starknet_utils::sn_gasleft(array![100]); TODO GAS
let starting_gas: u256 = 0;
Expand Down Expand Up @@ -190,7 +190,7 @@ mod LiquidationHandler {
execute_order_feature_disabled_key(get_contract_address(), params.order.order_type)
);
state_base.order_utils_lib.read().execute_order_utils(params);
// with_oracle_prices_after(state_base.oracle.read());
with_oracle_prices_after(state_base.oracle.read());

global_reentrancy_guard::non_reentrant_after(state_base.data_store.read());
}
Expand Down
Loading

0 comments on commit 1884dd0

Please sign in to comment.