Skip to main content

E0047: Unknown ABI Type

The name used in if x is AbiName does not refer to any declared abi definition.

Example (error)

fn test(x: Utxo) {
if x is 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
}
}