Different ways to connect ethers.js to Metamask a explained by Patrick Collins in below video https://www.youtube.com/watch?v=pdsYCkUWrgQ
Different ways to connect Metamask wallet :
- using raw html & js $ ethers.js
- using nextjs framework with ethers.js
- nextjs with web3-react library
- nextjs with moralis
- nextjs with web3modal
- nextjs with usedapp
For testing using a simple smart contract, dpeloyed on local hardhat blockchain cloned https://github.com/PatrickAlphaC/hardhat-simple-storage command to run local hardhat blockchain
yarn hardhat node