I am trying to deploy new contract on the net and I get two errors depending how exactly how I do it. Since I can not get ABI compiling contract on Parity I use solc --abi to get it. Now depending if I use compiled code or compile it on Parity I get one of two following errors:

throw new Error('invalid address');

Error: invalid address - (when compiling contract with web3 on Parity)


Error: Invalid params - (when using contract compiled with solc)

Any ideas what I am doing wrong? Here is the code:

var Web3 = require("web3");
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));


var source = "" +
"contract test {\n" +
"   function multiply(uint a) returns(uint d) {\n" +
"       return a * 7;\n" +
"   }\n" +
//var compiled = web3.eth.compile.solidity(source);

var compiled = 0x606060405260788060106000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa1146039576035565b6002565b34600257605160048080359060200190919050506067565b6040518082815260200191505060405180910390f35b60006007820290506073565b91905056;


var abi = [{"constant":true,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"payable":false,"type":"function"}]

web3.eth.contract(abi).new({data: compiled}, function (err, contract) {
    if(err) {
        // callback fires twice, we only want the second call when the contract is deployed
    } else if(contract.address){
        var myContract = contract;
        console.log('address: ' + myContract.address);

It is worth noting that calling:




while solc --bin gives:


Shouldn't they give same outcome?

  • You don't need the newlines in the source. Its actually better to leave them out Sep 29, 2016 at 13:36
  • Also, the issue is that you need quotes around the bytecode. i.e. var compiled = "0x6060....." Sep 29, 2016 at 13:38
  • @TjadenHess tried both and now I get Error: invalid address in both cases. Thrown at formatters.js
    – wonglik
    Sep 29, 2016 at 14:52
  • Oh, that's because you need a from: field in the tx object in the new call. Just put from:eth.coinbase before the data field. Sep 29, 2016 at 15:06
  • @TjadenHess added from:web3.eth.accounts[0] and still same same issue .
    – wonglik
    Sep 29, 2016 at 15:24

1 Answer 1


There was a bug in Parity 1.3.0. After updating to 1.3.2 it is working fine.

More details here

  • issue still on 2.1.1
    – Dr.X
    Oct 29, 2018 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.