def _generate_new_address(self, creator=None) -> str:
        """Generates a new address for the global state.

        :return:
        """
        if creator:
            # TODO: Use nounce
            return "0x" + str(mk_contract_address(creator, 0).hex())
        while True:
            address = "0x" + "".join([str(hex(randint(0, 16)))[-1] for _ in range(40)])
            if address not in self.accounts.keys():
                return address
def _generate_new_address ( self , creator = None ) -> str : if creator : return "0x" + str ( mk_contract_address ( creator , 0 ) . hex ( ) ) while True : address = "0x" + "" . join ( [ str ( hex ( randint ( 0 , 16 ) ) ) [ - 1 ] for _ in range ( 40 ) ] ) if address not in self . accounts . keys ( ) : return address
Generates a new address for the global state.

        :return: