Calling other contracts

Your contract method might be calling other contracts. To do so, you must feed the external contract IDs that your contract depends on to the method you're calling. You do it by chaining .set_contracts(&[external_contract_id, ...]) to the method you want to call. For instance:

    let bits = *foo_contract_id.hash();
    let res = foo_caller_contract_instance
        .call_foo_contract(Bits256(bits), true)
        .set_contracts(&[foo_contract_id.clone()]) // Sets the external contract
        .call()
        .await?;