web3 icon indicating copy to clipboard operation
web3 copied to clipboard

ERROR: Error deploying contract: mismatched argument (0) and parameter (1) counts

Open bitcoinmeetups opened this issue 2 years ago • 3 comments

Hi,

I'm BM, a very nice and polite guy.

I was trying to deploy some example from your README.md file but I got this error message with the erc721 example:

ERROR: Error deploying contract: mismatched argument (0) and parameter (1) counts

I also got the same error message when I tried deploying another contract using the web3 tools. Any idea how to deploy CAT.bin for example?

bitcoinmeetups avatar Feb 23 '23 17:02 bitcoinmeetups

Please provide an example, but likely you didn't pass in the required parameters for the constructor.

treeder avatar Feb 23 '23 18:02 treeder

Is it the EVM that blocks faulty contracts? Or is it web3?

I would prefer if I could upload anything, regardless of whether it works or not.

Ethereum is strange and unpleasant. If I write a C program in the terminal, I compile with GCC and then I can run the software, assuming there are no bugs. I think it's a deliberate choice by the Ethereum elite to try to prevent normal people from deploying to the blockchain. There's no reason why it should be more complicated than using GCC, which takes about 1 second and requires just a few flags. It's also strange if buggy contracts cannot even be uploaded. It's like not being able to save a C file to the harddrive because it contains bugs. It doesn't make sense at all.

Ethereum is so unpleasant and Vitalik is a socialist. That's what I say.

bitcoinmeetups avatar Feb 23 '23 21:02 bitcoinmeetups

It's Ethereum/EVM. And yes, blockchains are horrible to work with, debugging is a guessing game.

You could try using something else to build and deploy and see if it works better like https://hardhat.org/

treeder avatar Feb 27 '23 00:02 treeder