sudo apt install curl curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash nvm install node nvm install 14.18.0 nvm ls nvm use 14..0
mkdir hardhat-tutorial cd hardhat-tutorial npm init --yes npm install --save-dev hardhat
sudo snap install --classic code
sudo snap install --classic sublime-text
npx hardhat compile
Go to https://www.alchemyapi.io, sign up, create a new App in its dashboard, and replace "KEY" with its key.
Replace this private key with your Ropsten account private key. To export your private key from Metamask, open Metamask and go to Account Details > Export Private Key. Be aware of NEVER putting real Ether into testing accounts.
npx hardhat run scripts/deploy.js --network ropsten
npx hardhat node
npx hardhat run scripts/deploy.js --network localhost