Skip to content

Commit

Permalink
updated with the latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianfranco99 committed Oct 26, 2024
1 parent f58dd21 commit d670464
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/src/constants/funds/fund_manager_constants.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
pub mod FundManagerConstants {
pub const FUND_MANAGER_ADDRESS: felt252 =
0x00a885638f5167da8c38f115077c23ed7411539ea8f019ef09ec025d0c52d0ff;
}
}
4 changes: 3 additions & 1 deletion contracts/src/fund.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ mod Fund {
use starknet::get_contract_address;
use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};
use gostarkme::constants::{funds::{state_constants::FundStates},};
use gostarkme::constants::{funds::{fund_constants::FundConstants, fund_manager_constants::FundManagerConstants},};
use gostarkme::constants::{
funds::{fund_constants::FundConstants, fund_manager_constants::FundManagerConstants},
};
use gostarkme::constants::{funds::{starknet_constants::StarknetConstants},};

// *************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/fundManager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ mod FundManager {
)
.unwrap();

self.funds.write(self.current_id.read(), address_0);
self.funds.write(self.current_id.read(), new_fund_address);
self
.emit(
FundDeployed {
owner: get_caller_address(),
fund_address: address_0,
fund_address: new_fund_address,
fund_id: self.current_id.read()
}
);
Expand Down
2 changes: 1 addition & 1 deletion contracts/tests/test_fund.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn test_set_goal() {
let dispatcher = IFundDispatcher { contract_address };
let goal = dispatcher.getGoal();
assert(goal == GOAL(), 'Invalid goal');
start_cheat_caller_address_global(FUND_MANAGER());
start_cheat_caller_address_global(FUND_MANAGER());
dispatcher.setGoal(123);
let new_goal = dispatcher.getGoal();
assert(new_goal == 123, 'Set goal method not working')
Expand Down

0 comments on commit d670464

Please sign in to comment.