Skip to content

orbanszlrd/donate-crypto

Repository files navigation

Donate Crypto

Prerequisites

Install Git, the free and open source distributed Version Control System.
Install Node.js which includes Node Package Manager.
Install Yarn Package Manager.

Clone the Project

Run git clone https://github.com/orbanszlrd/donate-crypto.git to clone te project from GitHub

Install Dependencies

Run yarn install or npm install to install the dependencies.

Compile Smart Contracts

The command below compiles every .sol file in your contracts folder.

npm run compile

You can find the compiled contracts in the artifacts folder

Deploy Smart Contracts to different Networks

To deploy a contract to a remote network you need a url and a private key.

  • For getting a url, go to Alchemy, sign up, create a new App in its dashboard

  • For the private key you need to install MetaMask, create an account and export its private key

  • To verify your smart contracts, sign up to Etherscan and create an API Key

Hardhat (Default)

Hardhat comes built-in with Hardhat Network, a local Ethereum network node designed for development

npm run deploy

Hardhat (Localhost)

npm run deploy:localhost

Ganache

Ganache is a personal blockchain running on your own mashine on port 7545.

npm run deploy:ganache

Goerli

Goerli is an Ethereum test network that allows for blockchain development testing before deployment on Mainnet, the main Ethereum network.

npm run deploy:goerli

Linting

npm run lint

Testing Smart Contracts

Writing automated tests when building smart contracts is of crucial importance. We can use Mocha test runner and the Chai assertion library.

Running Tests

npm run test

Running Tests with Coverage

For test coverage you need to install the solidity-coverage package.

npm run coverage

Further Help

Alchemy - The Web3 Development Platform
Chainlink - Securely connect Smart Contracts with off-chain Data and Services
Chainlink Faucet - Request testnet LINK
Ethereum - Technology Powering the Cryptocurrency Ether
Ethers.js - Library for Interacting with the Ethereum Blockchain
Etherscan - The Ethereum Blockchain Explorer
Ganache - Personal Blockchain for Ethereum development
Hardhat - Ethereum Development Environment for Professionals
MetaMask - A Crypto Wallet & Gateway to Blockchain Apps
MetaMask Docs - Getting Started
OpenZeppelin - The Standard for Secure Blockchain Applications
OpenZeppelin - Documentation Remix - Ethereum IDE
Solidity - Programming Language for Implementing Smart Contracts
web3.js - Ethereum JavaScript API