Contents are edited and learned from LearnWeb3DAO. Please visit the original website https://dev.to/learnweb3/build-your-own-decentralized-exchange-use-the-xyk-amm-curve-on-ethereum-using-solidity-ethersjs-nextjs-and-web3modal-3ncn
This project is a personal side project for me try to develop a AMM and deploy the project by using hardhat.
Before build up your project, you have to add your .env file first.
RPC_URL = https://eth-goerli.g.alchemy.com/v2/YOUR_API_KEY
PRIVATE_KEY = YOUR_PRIVATEKEY
Then use yarn to manage your node modules and install required ones.
yarn