Metamask-extension: Deploy contract (with MEW) causes "Recipient address is invalid."

Created on 27 Nov 2017  路  9Comments  路  Source: MetaMask/metamask-extension


Trying to deploy a contract with myetherwallet/metamask combo on rinkeby

MEW prepares data but in MM, error message is seen

image

Note : Data is BIG (300K+)

P2-sooner T00-bug

Most helpful comment

Looks like MEW is passing us something as the recipient, and we aren't recognizing it as nothing. We'll need to investigate this.

All 9 comments

How are you initializing the transaction? Seems that there is an issue with the format of the recipient address. The recipient should be omitted for contract creation. And contract bytecode should be in the data field

On MEW select deploy contract. (no params so this should work)

Select to use with metamask.

Sign Tx (that works)

Write it
Q) are you sure
A) damn right I'm sure
-> up comes the commit window as shown.

I'm having the same issue with MEW, any suggestions?

Looks like MEW is passing us something as the recipient, and we aren't recognizing it as nothing. We'll need to investigate this.

So in the official Web3 docs, https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsendtransaction, the 'to' should be left undefined for Contract Creation we can open either open an issue with MEW, and/or we can account for this issue in MetaMask.

Similar issue when deploying to Ropsten.

looks like mew is giving us "to": ""

{
  "from": "<valid from address>",
  "nonce": "0xd4",
  "gasPrice": "0x04e3b29200",
  "gasLimit": "0x5208",
  "to": "",
  "value": "0x00",
  "data": "0xabcd",
  "chainId": 3
}

I have the same issue when using the "Metamask/Mist" option, but using the "private key" option as follows worked:
screen shot 2018-01-06 at 10 11 01 pm

So in my view, the problem can be fixed if Metamask makes the empty string a valid recipient address, and warn the user this is only valid for contract deploy.
Thanks!

Hitting the same roadblock trying to deploy to Ropsten using MEW & MetaMask.

Was this page helpful?
0 / 5 - 0 ratings