dapps
dapps
directory contains all the meta data we need to connect to our multiple DeFi applications. In here, we will find:interfaces
contains all the different functions available for a respective DeFi application. Some applications, like Aave, contain 4 different interfaces.libraries
contains all the defined functions needed to be implemented in our Facet files. If you don't know what a Diamond Contract is, kindly refer to **EIP-2535.**DappMods.sol
is a contract that contains modifiers required to transact certain functions in the Facet files<dapp-name>Facet.sol
are the multiple Facet contracts that call their respective dapp interface functions and store the updated storage inside the Escrow librariesescrow
ILoansEscrow
along with it's implemented contracts.callDapp()
setTokenAllowance()
claimToken()
libraries
section.libraries
LibEscrow.sol
library contains functions that help us interact with our respective escrow. It does the following:tokenUpdated()
either adds or removes escrow tokens from a loan escrow depending whether the tokenAddress
is contained in the list of tokens
or not.EscrowClaimTokensFacet.sol
claimTokens()
that allows the user, as long as they are the borrower and the loan status is closed, to safely transfer all the escrow tokens from the loan escrow to the user's wallet.