Skip to content

Commit

Permalink
fix: some comments details and expected fund message
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoTech14 committed Oct 2, 2024
1 parent 232eaa1 commit 471ec3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions contracts/src/fundManager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ pub trait IFundManager<TContractState> {

#[starknet::contract]
mod FundManager {
// *************************
// ***************************************************************************************
// IMPORT
// *************************
// ***************************************************************************************
use core::array::ArrayTrait;
use core::traits::TryInto;
use starknet::ContractAddress;
use starknet::syscalls::deploy_syscall;
use starknet::class_hash::ClassHash;
use starknet::get_caller_address;

// *************************
// ***************************************************************************************
// STORAGE
// *************************
// ***************************************************************************************
#[storage]
struct Storage {
owner: ContractAddress,
Expand All @@ -33,19 +33,19 @@ mod FundManager {
fund_class_hash: ClassHash,
}

// *************************
// ***************************************************************************************
// CONSTRUCTOR
// *************************
// ***************************************************************************************
#[constructor]
fn constructor(ref self: ContractState, fund_class_hash: felt252) {
self.owner.write(get_caller_address());
self.fund_class_hash.write(fund_class_hash.try_into().unwrap());
self.current_id.write(0);
}

// *************************
// ***************************************************************************************
// EXTERNALS
// *************************
// ***************************************************************************************
#[abi(embed_v0)]
impl FundManagerImpl of super::IFundManager<ContractState> {
fn newFund(ref self: ContractState, name: felt252, goal: u64) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/tests/test_fund_manager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn test_constructor() {
let expected_fund_address = fund_manager_contract.getFundClassHash();
let owner = fund_manager_contract.getOwner();
assert(owner == OWNER(), 'Invalid owner');
assert(fund_class_hash == expected_fund_address, 'Invalid donator class hash');
assert(fund_class_hash == expected_fund_address, 'Invalid fund class hash');
}

#[test]
Expand Down

0 comments on commit 471ec3c

Please sign in to comment.