export type ContractAddressOrInstance = string | { address : string ; } ; export function getContractAddress ( addressOrInstance ) { if ( typeof addressOrInstance === 'string' ) { return addressOrInstance ; } else { return addressOrInstance . address ; } }