Skip to content

Commit

Permalink
[fix] not sending reason on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianvrj committed Sep 12, 2024
1 parent db3aac9 commit 8b9d53b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contracts/src/fundManager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use starknet::class_hash::ClassHash;

#[starknet::interface]
pub trait IFundManager<TContractState> {
fn newFund(ref self: TContractState, name: felt252, reason: felt252, goal: u64);
fn newFund(ref self: TContractState, name: felt252, goal: u64);
fn getCurrentId(self: @TContractState) -> u128;
fn getFund(self: @TContractState, id: u128) -> ContractAddress;
}
Expand Down Expand Up @@ -46,12 +46,11 @@ mod FundManager {
// *************************************************************************
#[abi(embed_v0)]
impl FundManagerImpl of super::IFundManager<ContractState> {
fn newFund(ref self: ContractState, name: felt252, reason: felt252, goal: u64) {
fn newFund(ref self: ContractState, name: felt252, goal: u64) {
let mut calldata = ArrayTrait::<felt252>::new();
calldata.append(self.current_id.read().try_into().unwrap());
calldata.append(get_caller_address().try_into().unwrap());
calldata.append(name);
calldata.append(reason);
calldata.append(goal.try_into().unwrap());
let (address_0, _) = deploy_syscall(
self.fund_class_hash.read(), 12345, calldata.span(), false
Expand Down

0 comments on commit 8b9d53b

Please sign in to comment.