"Invalid constructor arguments" error, running immediately after deployment
See original GitHub issueHello, I’m running:
truffle migrate --network mainnet --reset
And then I’m immediately running
truffle run verify ContractName@address --network mainnet
and I get “Invalid constructor arguments provided. Please verify that they are in ABI-encoded format”.
How can they be invalid when I’ve only just deployed it?
Btw. I love this plugin so much 😃 it has worked many times in the past
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Invalid constructor arguments provided for a deployed Remix ...
You have to give what constructor needs on deploy. For example if constructor wants 2 uint variables then you have to give them...
Read more >Error! Invalid constructor arguments provided. Please verify ...
I want to create a token that can be minted. An error occurred while adding source code to etherscan: Error! Invalid constructor arguments...
Read more >How do I run Hardhat with the --constructor-args parameter?
I'm running into the same issue, my constructor does have all parameters in the deploy function but I don't know how to pass...
Read more >Protostar deployment issues #636 - GitHub
P.S i noticed, i'm able to deploy simple contracts with no constructor, like the boiler contract that comes with protostar, and view them...
Read more >4.3 Dependencies - Spring
Setter-based DI is realized by calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So it looks like it somehow retrieved incorrect constructor arguments. When I ran it on my end it retrieved this as the constructor arguments:
0x000000000000000000000000f2e47c29fc9f31cc50a62dea24956545772921bc, which are completely different from the ones you got.When running with the installed version v0.4.0, I did get an error because the flattened source code included multiple SPDX license identifiers. As a fix, I updated to the latest version v0.5.0 (which uses multi-file verification) and I was able to verify the contract.
I was able to run migrations and accurately verify those newly deployed contracts as well. I’m still not sure why it got different constructor args on your end than on my end, but I can’t reproduce the issue. Could you try updating to v0.5.0 and running compile + migrate + verify again to see if it’s working for you?
Closing this issue for inactivity. Feel free to open it with more information.