Compiling and deploying contracts