There are no contracts that can be discriminatory unless there is a specific and clear purpose. For example, Hooters can discriminate against male waiters because their core business model is based around female waitstaff showing off their breasts through tight fitting t-shirts.
The problem with marriage is that there is no such compelling interest that can be demonstrated that justifies gender discrimination