Skip to content

Commit

Permalink
field rename: factory->creator
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenad committed Jun 12, 2024
1 parent 85e4667 commit 1b44c51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions listings/applications/crowdfunding/src/campaign.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub mod Campaign {
contributions: contributable_component::Storage,
end_time: u64,
token: IERC20Dispatcher,
factory: ContractAddress,
creator: ContractAddress,
target: u256,
title: ByteArray,
description: ByteArray,
Expand Down Expand Up @@ -159,7 +159,7 @@ pub mod Campaign {
self.target.write(target);
self.description.write(description);
self.end_time.write(get_block_timestamp() + duration);
self.factory.write(get_caller_address());
self.creator.write(get_caller_address());
self.ownable._init(owner);
self.status.write(Status::PENDING)
}
Expand Down Expand Up @@ -246,7 +246,7 @@ pub mod Campaign {
}

fn upgrade(ref self: ContractState, impl_hash: ClassHash) -> Result<(), Array<felt252>> {
if get_caller_address() != self.factory.read() {
if get_caller_address() != self.creator.read() {
return Result::Err(array![Errors::NOT_FACTORY]);
}
if impl_hash.is_zero() {
Expand Down

0 comments on commit 1b44c51

Please sign in to comment.