Function getChainForAddress