Skip to content

Lession 7 When deploy 01-deploy-fund-me.js , error:expected 1 constructor arguments, got 0 #1021

Answered by krakxn
Sakana-xc asked this question in Q&A
Discussion options

You must be logged in to vote

The following changes should fix your problem. Cheers

  • yarn hardhat deply should be deploy and for deploy-fund-me done by running seperately for local networks and testnets via --network xyz
  • / import should be commented out
  • Do you have this in hardhat.config? Below:
namedAccounts: {
        deployer: {
            default: 0, // here this will by default take the first account as deployer
            1: 0, // similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
        },

Also, in helper-hardhat-config, you should follow camel case. Problem lies in e…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Sakana-xc
Comment options

@krakxn
Comment options

Answer selected by Sakana-xc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants