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
On the "Run" tab you should see a box like this:
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.
-
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 WCommented Jan 28, 2018 at 17:30