AbhiDiva96 / CryptoPurse

https://crypto-purse.vercel.app
MIT License
4 stars 10 forks source link

Smart contract #19

Closed muskan171105 closed 5 days ago

muskan171105 commented 1 month ago

This PR integrates Hardhat into the project to facilitate the development and deployment of smart contracts. The following changes have been made:

  1. Added Hardhat Configuration:

    • Introduced a hardhat.config.js file to configure the Hardhat environment.
    • Set up the Solidity compiler with optimization settings.
  2. Updated package.json:

    • Added necessary dependencies for Hardhat and Ethers.js.
    • Included scripts for testing and deploying smart contracts.
  3. Directory Structure:

    • The following default directories are used:
      • Contracts: ./contracts for storing smart contracts.
      • Tests: ./test for writing tests for the contracts.
      • Scripts: ./scripts for deployment scripts.
      • Artifacts: ./artifacts for compiled contract artifacts.
      • Cache: ./cache for caching files.

Instructions to Run the Project

  1. Install Dependencies: Make sure to install the project dependencies, including Hardhat:

    
    npm install
  2. Set Up Environment Variables (if deploying):

    • Create a .env file in the root directory of the project.
    • Add the following lines to the .env file (replace with your actual keys):
      RINKEBY_URL=https://rinkeby.infura.io/v3/YOUR_INFURA_PROJECT_ID
      RINKEBY_PRIVATE_KEY=YOUR_PRIVATE_KEY
      MAINNET_URL=https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID
      MAINNET_PRIVATE_KEY=YOUR_PRIVATE_KEY
  3. Run Hardhat Tests: To test the smart contracts, run:

    
    npm run test
  4. Deploy Smart Contracts: To deploy the smart contracts, use:

    
    npm run deploy

This PR closed issue #9

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
crypto-purse ❌ Failed (Inspect) Oct 16, 2024 10:02pm