Search code examples
ethereumsolidityabi

How to fix "Uncaught (in promise) Error: Invalid number of parameters for"


I get "Uncaught (in promise) Error: Invalid number of parameters for ..." error but I'm passing correct number of parameters. How to fix this?


Solution

  • One reason leads to this problem is using SOLC 0.5.8. It has a bug which produces incorrect abi sometimes. Downgrading to 0.5.7 fixed the problem for me.