2

I'm in the process of compiling code for a token, to test on a test network. How can I specify constructor arguments when compiling in Remix? The bytecode is available when I press compile, but no place to enter constructor arguments.

1 Answer 1

1

On the "Run" tab you should see a box like this:

enter image description here

The constructor arguments go in the "Create" box. You can leave "At Address" blank. Then click on "Create" to deploy the contract.

If you need the actual deployment bytecode with the constructor arguments appended, then do a dummy deployment in Remix, click on the "details" button next to the transaction in the window below the source code. The "input" field in the table that appears is the whole deployment bytecode including the constructor args. You can copy and paste this to deploy the contract wherever you like.

1
  • if the Create input box doesn't seem to allow input, check that your constructor name is valid. I had a typo in mine at first and the input box was read-only. Once fixed it worked as expected.
    – Luke W
    Commented Jan 28, 2018 at 17:30

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.