I'm trying to deploy a contract using MEW toward Ganache.

When deploying a contract should the "to" field be included? if the answer is yes, what value should it contain?

is there an official documentation that defines this behavior?

Thank you

  • Can you tell me where you see this to in "deploy contract" - there should be no "to" and I was just verifying again and only see Byte Code and gas limit as is to be expected
    – ligi
    Jan 13, 2018 at 15:24
  • the "to" is inside the transaction generated: i downloaded MEW version , and the steps that i did are: access "contract" section > deploy contract > insert bytecode > sign transaction with private key > 2 textareas appear, the left one shows the readable transaction with the "to" field, empty
    – Stormsson
    Jan 13, 2018 at 16:10

1 Answer 1


to should indeed be empty (in reality it's 0 in the encoded transaction).

The Yellow Paper is the definitive source, but this blog post might help as an overview: https://programtheblockchain.com/posts/2018/01/09/how-smart-contract-deployment-works/. (It might make sense to go back and also read our post about transactions in general, which is linked near the top.)

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.