question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Invalid constructor arguments" error, running immediately after deployment

See original GitHub issue

Hello, 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:closed
  • Created 3 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
rkaliscommented, Oct 27, 2020

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?

0reactions
rkaliscommented, Dec 9, 2020

Closing this issue for inactivity. Feel free to open it with more information.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found