The notion of a smart contract (as implemented by blockchains like Ethereum) makes the difference between a legal contract and code even smaller: the [Solidity] code IS the (unambiguous) contract.
Unfortunately “smart contracts” are missing two key features that real contracts have: a number of squishy conditions required to make them valid, and the ability to have a judge determine that a contract is not legally unenforceable even if otherwise valid.