Abi.decode decodes function return data using a full ABI. It looks up the function by name and decodes the return values based on the function outputs.
import { Abi, AbiItemNotFoundError, AbiDecodingError } from '@tevm/voltaire/Abi';try { abi.decode('missingFunction', returnData);} catch (error) { if (error instanceof AbiItemNotFoundError) { console.error('Function not found in ABI'); } if (error instanceof AbiDecodingError) { console.error('Return data did not match output types'); }}