         return
 
     build: ->
-        console.log 'Sending compiled code to ethereum node...'
         that = this
         constructVars = []
         i = 0

        messages.add new PlainMessageView(message: output, className: 'green-message')

    call: (@myContract, @functionName) ->
        console.log 'Calling contract...'
        result = @myContract[Object.keys(@functionName)[0]]()
        @showOutput @myContract.address, result

    toggle: ->
        console.log 'Atom Solidity View was toggled!'

        if @modalPanel.isVisible()
            @modalPanel.hide()
        else

            e = new Error('Could not parse input')
            callback(e, null)

    # our asyncLoop
    # may be we will need it sometime
    asyncLoop: (iterations, func, callback) ->
        index = 0
        done = false
        cycle =
            next: ->
                if done
                    return
                if index < iterations
                    index++
                    func cycle
                else
                    done = true
                    callback()
            iteration: ->
                index - 1
            break: ->
                done = true
                callback()
        cycle.next()
        cycle

    # Construct function buttons from abi
    constructFunctions: (@contractABI, callback) ->
        for contractFunction in contractABI
            if contractFunction.type = 'function'
                @createChilds contractFunction, (error, childInputs) ->
                    if !error
                        callback(null, [contractFunction.name, childInputs])
                    else
                        callback(null, [null, null])

    createChilds: (contractFunction, callback) ->
        reactElements = []
        i = 0
        if contractFunction.inputs.length > 0
            while i < contractFunction.inputs.length
                reactElements[i] = [contractFunction.inputs[i].type, contractFunction.inputs[i].name]
                i++
        callback(null, reactElements)

    # Construct react child inputs
    create: (@abi, @code, @constructVars, @contractName) ->
        that = this
        # hide create button
        @prepareEnv @contractName, (err, callback) ->
