This project aims to achieve a swapping contract from TOKEN A(ENJ) to TOKEN B(USDT)
Try running some of the following tasks:
yarn hardhat compile
yarn hardhat run scripts/Pricefeed.ts- To run the swap scripts and fetch the price
check .env.example
POLYGON_MAINNET_URL
: Mainnet url rpc can be gotten from moralis/alchemy or any rpc node providerPRIVATE_KEY
: metamask privateENJ_CONTRACT_ADDRESS
: ENJ Token contract address from polygonscanENJ_OWNER_ADDRESS
: ENJ address from polygonscanUSDT_CONTRACT_ADDRESS
: USDT contract address from polygoscanUSDT_OWNER_ADDRESS
: USDT owner address(interacted with the contract)USDT_LIQUIDTY_ADDRESS
: USDT owner address(interacted with the contract) and would be used as a liquidity provider for the swap contractENJUSDT_PRICE_ADDRESS
: ENJ/USDT price feed address gotten from chainlink