Install Hardhat
npm install --save-dev hardhat
Initiate a new Hardhat project (in empty directory)
npx hardhat
Install OpenZeppelin upgrades plugin
npm install --save-dev @openzeppelin/hardhat-upgrades
Install OpenZeppelin contracts
npm install @openzeppelin/contracts
Compile contracts
npx hardhat compile
Test contracts
npx hardhat test
Run network node
npx hardhat node
Deploy contract to the local running node
npx hardhat run scripts/sample-script.js --network localhost
Hardhat Getting Started Hardhat Upgrades Plugin OpenZeppelin and Hardhat Upgrades Tutorial