def get_network(self): """ Identify the connected network. This call returns a dictionary with keys chain_id, prefix, and other chain specific settings """ props = self.get_dynamic_global_properties() chain = props["current_supply"].split(" ")[1] assert chain in known_chains, "The chain you are connecting to is not supported" return known_chains.get(chain)
def chain_params(self): """ Identify the connected network. This call returns a dictionary with keys chain_id, prefix, and other chain specific settings """ props = self.get_dynamic_global_properties() chain = props["current_supply"].split(" ")[1] assert chain in known_chains, "The chain you are connecting " + \ "to is not supported" return known_chains.get(chain)