I can answer this question the way Utah law handles it.
First, there is no “contract” for disowning a child and terminating the obligation to support the child, but there is a way to petition the court for an order for relinquishment of both one’s parental rights and termination of parental obligations.
You can find an introduction and overview of this process in Utah here:
Voluntary Relinquishment of Parental Rights
Utah Family Law, LC | divorceutah.com | 801-466-9277