Tutorial
Deployment

Deploy Smart Contract

  1. Open the folder and search for a file called hardhat.config.js. This is the file that contains the configuration for our project. Open it and add the following code to it:
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: {
    version: '0.8.9',
    defaultNetwork: 'goerli',
    networks: {
      hardhat: {},
      goerli: {
        url: 'https://rpc.ankr.com/eth_goerli',
        accounts: [`0x${process.env.PRIVATE_KEY}`]
      }
    },
    settings: {
      optimizer: {
        enabled: true,
        runs: 200,
      },
    },
  },
};
 
  1. Now go to the terminal and run the following command: npm run deploy and wait for the contract to be deployed. Once the contract is deployed, you will see the contract address in the terminal.
 Compilation successful
 Processing contract: "CrowdFunding"
 Deployment parameters written to deployArgs.json in your project directory
 Upload successful
 Open this link to deploy your contracts: https://thirdweb.com/contracts/deploy/fsfsfsfsfsfsfsfggfdg
  1. Go to the link which is provided in the terminal and click on "Deploy". Now click on "Connect Wallet" and connect your metamask wallet. Now click on "Deploy" and wait for the contract to be deployed and it will deduct some ether from your account.

Now you have successfully deployed your smart contract. You can see your dashboard

ezgif-1-4c175b3c07