How to 'attach' metadata to a bitcoin receive address
That's all well and nice, but it turns out that courts aren't interested in "mathematical proofs" (with good reason).  I recommend reading all the books by Bruce Schneider.

Let's say you got someone to pay you at receive_public_key. Does that mean he has agreed to contract M? No.

The courts would still need to see documentation that your partner actually saw and agreed to the contract M. You could have emailed the guy and said "I'll give you $10 if you send Bitcoins to receive_public_key, then later claim that he agreed to contract M.

This same thing happened in the 90's, with vendors claiming cryptographic digital signatures had the property of Non-repudiation. But the courts disagreed. For example, someone can hold a gun to your head and make you 'sign' a contract (digital or otherwise). No court will consider that a valid contract, fancy math or no fancy math.