PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

How does this syntax work exactly? #13

Closed cipher222 closed 2 years ago

cipher222 commented 2 years ago

As I get further into the tutorial, I keep getting confused about the "extrapolation" of different variables. I understand what it does but am wondering what the logical reasoning behind this syntactical sugar is. Also, what is this method of extrapolation called?

Here is some of the confusing code: module.exports = async ({ getNamedAccounts, deployments }), const { networkConfig } = require("../helper-hardhat-config"), const { network } = require("hardhat"), const { deployer } = await getNamedAccounts.

basically, everything that uses {} when declaring a variable/parameter.

Thanks!!