This script parses the Morpho pool data and outputs it in the format required by the lending protocol adapter.
-
Go to the Morpho API and download the pool data for the chains you want to support. Use this link to get the query. <<< note that you need to change the
chainIdto the chain you want to support >>> , currently only Ethereum and Base are supported. -
Run the script with the following command:
node morphoPoolParser.js <inputFile> <chainId> <outputFile>- The output schema will look like this:
morpho: {
[SupportedChain.Base]: [
{ underlyingToken: '0x00...', aToken: '0x00...', pool: '0x00...' },
...
],
}