A Unified Theory of Code Connected Contracts