I'm hitting an error when trying to do a cross contract call with two contracts running on substrate branch monthly-2022-03
and compiled with
"language": "ink! 3.0.0-rc8",
"compiler": "rustc 1.62.0-nightly"
The error is 'encountered error while calling ImportedContract::external_function: NotCallable'
The External
Contract is imported as follows:
/// Calls the `External` contract
#[ink(message)]
pub fn external_fn_wrapper(&self, accountid: AccountId, threshold: u8) -> bool {
let mut external_instance: ExternalRef = ink_env::call::FromAccountId::from_account_id(self.external_account);
external_instance.external_function(accountid, threshold).unwrap()
}
The function that's trying to be cross-called in the External
contract is public which I assume means it's callable.
#[ink(message)]
pub fn external_function(
&mut self,
user: AccountId,
threshold: u8,
) -> Result<bool, Error> {
Does anyone have any ideas?