Last active
September 11, 2023 19:27
-
-
Save chuckbergeron/360ec7686f4a2a10c15573370a1c6fd6 to your computer and use it in GitHub Desktop.
PoolTogether v5 Hyperstructure - Arbitrage Bot, Finding Liquidation Pairs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const liquidationPairFactoryContract = new ethers.Contract( | |
liquidationPairFactoryAddress, | |
LiquidationPairFactoryAbi, | |
readProvider | |
); | |
let liquidationPairContracts: Contract[] = []; | |
const numPairs = await liquidationPairFactoryContract.totalPairs(); | |
for (let i = 0; i < numPairs; i++) { | |
const liquidationPairAddress = | |
await liquidationPairFactoryContract.allPairs(i); | |
const liquidationPairContract = new ethers.Contract( | |
liquidationPairAddress, | |
LiquidationPairAbi, | |
readProvider | |
); | |
liquidationPairContracts.push(liquidationPairContract); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment