Skip to main content

E0047: Unknown ABI Type

The name used where an ABI name is required does not refer to any declared abi definition.

  • if x is AbiName
  • impl AbiName

Example (error)

fn test(x: Utxo) {
if x is NonExistent { // Error: no abi named NonExistent
}
}
utxo MyUtxo {
impl NonExistent { // Error: no abi named NonExistent
}
}

Fix

Declare the ABI or use the correct name:

abi MyAbi {
fn transfer(amount: i64) -> bool;
}

fn test(x: Utxo) {
if x is MyAbi { // OK
}
}