Configuring Hardhat
The Hardhat script liquidate.ts
automates the liquidation process by interacting with the deployed Liquidator contract.
1. Review the Script
You can find the script code here.
Key Components:
Chain Data Configuration: Contains network-specific data such as operator keys, contract addresses, and token paths.
Contract Setup Functions: Functions to initialize contract instances using ABIs and addresses.
Liquidation Functions: Functions that perform the liquidation using different methods (direct contract interaction, script-based).
2. Update Chain Data
Ensure that the chainData
object in the script contains the correct addresses and keys for your environment:
3. Set Up Environment Variables
Ensure your .env
file contains all necessary variables, as shown in the Prerequisites section.
Last updated