To enable full TypeScript type safety and method discovery when using a contract instance, you must define your ABI using as const.
If the ABI is not defined with as const, the TypeScript compiler widens the type to a generic AbiFragment[]. This causes the length property to become number and strips the literal types from fragment names and stateMutability. Consequently, the ContractInstance will not be able to derive specific method names from the ABI, and you will lose autocomplete and type checking for contract calls.
Correct usage:
const MY_ABI = [
{ name: 'transfer', type: 'function', ... },
] as const;
// This allows ContractInstance to map 'transfer' to a specific Method type
const contract: ContractInstance<typeof MY_ABI> = ...;