Skip to content

Error: ERROR processing /home/blayne/hardhat-fund-me/deploy/00-deploy-mock.js: TypeError: from.toLowerCase is not a function #2491

Answered by othaime-en
blaynejosh asked this question in Q&A
Discussion options

You must be logged in to vote

@blaynejosh enclose deployer with {} change this line const deployer = await getNamedAccounts() to const {deployer} = await getNamedAccounts()

The line await getNamedAccounts() returns the namedAccounts object and we need to extract deployer from it. So we use the {} notation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@blaynejosh
Comment options

Answer selected by blaynejosh
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