A process for producing a contact lens, comprising the steps of: (a) obtaining a contact lens precursor which is a coated contact lens which comprises a lens bulk material completely covered with an anchor layer of a polyanionic polymer which comprises at least 60% by mole of repeating units of at least one carboxyl-containing vinylic monomer; (b) placing and sealing the contact lens precursor in a lens package which comprises an aqueous solution for immersing the contact lens precursor, wherein the aqueous solution comprises (i) at least one polyaziridine compound having a number average molecular weight of about 2000 Dalton or less and at least two aziridine groups, (ii) a thermally-crosslinkable hydrophilic polymeric material which has azetidinium groups, and (iii) a buffering system for ensuring the aqueous solution having a pH of from about 6.8 to about 9.5; (c) staging (i.e., holding) the sealed lens package with the contact lens precursor immersed in the aqueous solution therein at a temperature of from about 10°C to about 100°C for a time period of from about 0.5 to about 24 hours; and (d) autoclaving, after step (c), the sealed lens package with the contact lens precursor immersed in the aqueous solution therein at a temperature of from about 115°C to about 125°C for approximately 20-90 minutes to obtain the contact lens, wherein the contact lens comprise (i) a crosslink anchor layer thereon and an outer surface hydrogel layer which is covalently attached to the crosslinked anchor layer, wherein the crosslinked anchor layer is obtained by crosslinking the polyanionic polymer in the anchor layer via crosslinkers derived from said at least one polyaziridine compound in coupling reaction between at least one pair of aziridine and carboxyl groups, wherein the outer surface hydrogel layer is formed by crosslinking the thermally-crosslinked hydrophilic polymeric material, (a) obtaining a contact lens precursor which is a coated contact lens which comprises a lens bulk material completely covered with an anchor layer of a polyanionic polymer which comprises at least 60% by mole of repeating units of at least one carboxyl-containing vinylic monomer; (b) placing and sealing the contact lens precursor in a lens package which comprises an aqueous solution for immersing the contact lens precursor, wherein the aqueous solution comprises (i) at least one polyaziridine compound having a number average molecular weight of about 2000 Dalton or less and at least two aziridine groups, (ii) a thermally-crosslinkable hydrophilic polymeric material which has azetidinium groups, and (iii) a buffering system for ensuring the aqueous solution having a pH of from about 6.8 to about 9.5; (i) at least one polyaziridine compound having a number average molecular weight of about 2000 Dalton or less and at least two aziridine groups, (ii) a thermally-crosslinkable hydrophilic polymeric material which has azetidinium groups, and (iii) a buffering system for ensuring the aqueous solution having a pH of from about 6.8 to about 9.5; (c) staging (i.e., holding) the sealed lens package with the contact lens precursor immersed in the aqueous solution therein at a temperature of from about 10°C to about 100°C for a time period of from about 0.5 to about 24 hours; and (d) autoclaving, after step (c), the sealed lens package with the contact lens precursor immersed in the aqueous solution therein at a temperature of from about 115°C to about 125°C for approximately 20-90 minutes to obtain the contact lens, wherein the contact lens comprise (i) a crosslink anchor layer thereon and an outer surface hydrogel layer which is covalently attached to the crosslinked anchor layer, wherein the crosslinked anchor layer is obtained by crosslinking the polyanionic polymer in the anchor layer via crosslinkers derived from said at least one polyaziridine compound in coupling reaction between at least one pair of aziridine and carboxyl groups, wherein the outer surface hydrogel layer is formed by crosslinking the thermally-crosslinked hydrophilic polymeric material,