Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunkar committed Apr 16, 2024
1 parent c1aaa5c commit f240b4a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions noir-projects/noir-contracts/contracts/parent_contract/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract Parent {
context.call_public_function(
target_contract,
target_selector,
[init_value],
[init_value].as_slice(),
GasOpts::default()
).deserialize_into()
}
Expand All @@ -35,13 +35,13 @@ contract Parent {
let return_value: Field = context.call_public_function(
target_contract,
target_selector,
[init_value],
[init_value].as_slice(),
GasOpts::default()
).deserialize_into();
context.call_public_function(
target_contract,
target_selector,
[return_value],
[return_value].as_slice(),
GasOpts::default()
).deserialize_into()
}
Expand Down Expand Up @@ -189,7 +189,12 @@ contract Parent {
target_selector: FunctionSelector,
args: [Field; 1]
) -> Field {
context.static_call_public_function(target_contract, target_selector, args, GasOpts::default()).deserialize_into()
context.static_call_public_function(
target_contract,
target_selector,
args.as_slice(),
GasOpts::default()
).deserialize_into()
}

// Public function to set a static context and verify correct propagation for nested public calls
Expand All @@ -205,7 +210,7 @@ contract Parent {
context.static_call_public_function(
this_address,
pub_entry_point_selector,
[target_contract.to_field(), target_selector.to_field(), args[0]],
[target_contract.to_field(), target_selector.to_field(), args[0]].as_slice(),
GasOpts::default()
).deserialize_into()
}
Expand Down

0 comments on commit f240b4a

Please sign in to comment.