Skip to content

Commit d5edb84

Browse files
committed
morpho fix
1 parent 265ddab commit d5edb84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/morpho-blue/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ Object.keys(config).forEach(chain => {
3232
async function getMarkets(api) {
3333
const logs = await getLogs({
3434
api, target: morphoBlue,
35+
skipCache: true,
3536
eventAbi: 'event CreateMarket(bytes32 indexed id, (address loanToken, address collateralToken, address oracle, address irm, uint256 lltv) marketParams)',
3637
onlyArgs: true, fromBlock,
3738
topics: ['0xac4b2400f169220b0c0afdde7a0b32e775ba727ea1cb30b35f935cdaab8683ac'],
3839
})
40+
if(logs.length < 5){
41+
throw new Error("Missing markets!")
42+
}
3943
return logs.map(i => i.id)
4044
}
4145
})

0 commit comments

Comments
 (0)