Retrieves the deployed contract address for a specific contract on a given chain.
The chain ID to look up the contract on
The contract name to get the address for
The contract address as a hex string
When contract address not found for the specified contract and chain
try { const dataRegistryAddress = getContractAddress(1480, 'DataRegistry'); console.log('DataRegistry address:', dataRegistryAddress);} catch (error) { console.error('Contract not deployed on this chain:', error.message);} Copy
try { const dataRegistryAddress = getContractAddress(1480, 'DataRegistry'); console.log('DataRegistry address:', dataRegistryAddress);} catch (error) { console.error('Contract not deployed on this chain:', error.message);}
Retrieves the deployed contract address for a specific contract on a given chain.