fuel
March 12, 2023, 3:46pm
1
Hi there
Is there any chance to call predicate from contract like here?
asset_id: OFFERED_ASSET,
};
// Change output for unspent asked asset
let output_asked_change = Output::Change {
to: Address::from(taker_wallet.address()),
amount: 0,
asset_id: asked_asset,
};
let script_call = ScriptCallHandler::<()>::new(
vec![],
UnresolvedBytes::default(),
taker_wallet.clone(),
provider.clone(),
Default::default(),
)
.with_inputs(vec![input_predicate, input_from_taker])
.with_outputs(vec![
output_to_receiver,
output_to_taker,
furnic
March 12, 2023, 10:54pm
2
It is not possible to call a predicate from a contract, as predicates aren’t deployed on chain.
+1 to @furnic ’s answer. However, the linked file is a Rust test utility function, not a contract. The function creates a transaction to interact with a predicate. That is possible.
1 Like