           else
             c()
       (c) =>
-        @compile_all(config, callback)
-    ]
+        @compile_all(config, c)
+      (c) =>
+        @write_contracts(config, "contracts", c)
+    ], callback
 
   @deploy: (config, compile=true, done_deploying) ->
     coinbase = null

        err = new Error("Compilation failed. See above.")
      callback(err)

  @compile: (config, callback) ->
    async.series [
      (c) ->


        interval = setInterval verify, 1000

    ], (err) =>
      if err?
        done_deploying(err)
        return
      
      @write_contracts(config, "contracts and deployed addresses", done_deploying)


module.exports = Contracts