Function getChainFromAddress