Hot answers tagged

1

The error was because of a typo mistake. I was passing an undefined argument which caused this error. Its not an error because of no. of arguments.


1

Problem had to do with an initialization of the Contract class from web3 like this: new Contract([]); Even though vscode says that it clearly needs at least one parameter in the constructor, it caused this error. I fixed it by setting it to null instead (this is about setting the initialState in redux). I still don't understand why this issue occurs, as ...


1

I had exactly the same issue, however thanks to @Ismael reply i figured it out. I added initMetaMask before init method: initMetaMask: function() { async function enableUser() { const accounts = await ethereum.enable(); const account = accounts[0]; App.account = account; } enableUser(); }, also i added code that ...


Only top voted, non community-wiki answers of a minimum length are eligible