Let’s say I have 2 contracts: contract A and contract B. Contract A calls the function func_a in function func_b of contract B, and function func_b requests the price from the Pyth Oracle
// Contract A
impl ContractA for Contract {
fn func_a(){
let contract_b = abi(ContractB, CONTRACT_B_ADDRESS);
let price = contract_b.func_b();
}
}
//Contract B
impl ContractB for Contract {
fn func_b() -> u64{
let pyth_contract = abi(PythCore, spark_contracts.pyth_address.into());
pyth_contract.price(PRICE_FEED).price
}
}
rust and ts sdks request an array of contracts when calling func_a, can you please tell me if the call will work correctly if I pass 2 addresses into the call of contract A: the address of contract B and the address of Pyth Oracle
let tx_params = TxParameters::default().with_gas_price(1);
contract_a
.methods()
.func_a()
.tx_params(tx_params)
// .with_contracts() <- here is my question
.call()