Name of the contract to instantiate.
Use const assertion for full typing: "DataRegistry" as const
Optional viem client instance.
Defaults to auto-configured client. Obtain via createClient() or viem.
A fully typed contract instance with methods corresponding to the contract's ABI
Provides complete type safety following viem's patterns with automatic ABI loading and address resolution. Contract instances are cached per chain for performance. Use const assertion for full type inference.
// Full type inference with const assertion
const dataRegistry = getContractController("DataRegistry" as const, client);
// Now dataRegistry has full type inference for all methods
const result = await dataRegistry.read.getFileCount(); // Type: bigint
await dataRegistry.write.addFile([url, proof]); // Typed parameters
// Auto-configured client
const permissions = getContractController("DataPortabilityPermissions" as const);
const granted = await permissions.read.hasPermission([grantor, grantee]);
Gets a typed contract instance for the specified contract name.