-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from morpho-org/docs/update-readme
Update readme
- Loading branch information
Showing
1 changed file
with
54 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
# Morpho-Blue snippets | ||
# Morpho Blue Snippets | ||
|
||
## Typescript & Solidity based snippets related to Morpho Protocols. | ||
## Typescript & Solidity based snippets related to Morpho Protocols | ||
|
||
IMPORTANT | ||
This repository contains smart contracts that have been developed for educational, experimental, or demonstration purposes only. By using or interacting with these smart contracts, you acknowledge and accept the following: | ||
> [!IMPORTANT] | ||
> This repository contains smart contracts that have been developed for educational, experimental, or demonstration purposes only. | ||
By using or interacting with these smart contracts, you acknowledge and accept the following: | ||
> 1. The smart contracts in this repository have not been audited and are provided "as is" with no guarantees, warranties, or assurances of any kind. The authors and maintainers of this repository are not responsible for any damages, losses, or liabilities that may arise from the use or deployment of these smart contracts. | ||
> 2. The smart contracts in this repository are not intended for use in production environments or for the management of real-world assets, funds, or resources. Any use or deployment of these smart contracts for such purposes is done entirely at your own risk. | ||
> 3. The smart contracts are provided for reference and learning purposes, and you are solely responsible for understanding, modifying, and deploying them as needed. | ||
1. The smart contracts in this repository have not been audited and are provided "as is" with no guarantees, warranties, or assurances of any kind. The authors and maintainers of this repository are not responsible for any damages, losses, or liabilities that may arise from the use or deployment of these smart contracts. | ||
|
||
2. The smart contracts in this repository are not intended for use in production environments or for the management of real-world assets, funds, or resources. Any use or deployment of these smart contracts for such purposes is done entirely at your own risk. | ||
|
||
3. The smart contracts are provided for reference and learning purposes, and you are solely responsible for understanding, modifying, and deploying them as needed. | ||
|
||
## Morpho-Blue related functions in Solidity: | ||
## Morpho Blue related functions in Solidity | ||
|
||
One can use the logic provided in the following: | ||
|
||
1. functions to get data: | ||
1. Functions to get data: | ||
|
||
- supplyAPY | ||
- borrowAPY | ||
- supplyAssetsUser | ||
- borrowAssetsUser | ||
- collateralAssetsUser | ||
- marketTotalSupply | ||
- marketTotalBorrow | ||
- userHealthFactor | ||
- `supplyAPY` | ||
- `borrowAPY` | ||
- `supplyAssetsUser` | ||
- `borrowAssetsUser` | ||
- `collateralAssetsUser` | ||
- `marketTotalSupply` | ||
- `marketTotalBorrow` | ||
- `userHealthFactor` | ||
|
||
2. functions to modify state: | ||
2. Functions to modify state: | ||
|
||
- supply | ||
- supplyCollateral | ||
- withdrawCollateral | ||
- withdrawAmount | ||
- withdraw50Percent | ||
- withdrawAll | ||
- `supply` | ||
- `supplyCollateral` | ||
- `withdrawCollateral` | ||
- `withdrawAmount` | ||
- `withdraw50Percent` | ||
- `withdrawAll` | ||
|
||
3. functions using callbacks: | ||
3. Functions using callbacks: | ||
|
||
- leverageMe | ||
- deLeverageMe | ||
- `leverageMe` | ||
- `deLeverageMe` | ||
|
||
## MetaMorpho related functions in Solidity: | ||
|
||
One can use the logic provided in the following: | ||
|
||
1. functions to get data: | ||
1. Functions to get data: | ||
|
||
- totalDepositVault | ||
- vaultAssetsInMarket | ||
- totalSharesUserVault | ||
- supplyQueueVault | ||
- withdrawQueueVault | ||
- totalCapCollateral | ||
- supplyAPYMarket | ||
- supplyAPYVault | ||
- `totalDepositVault` | ||
- `vaultAssetsInMarket` | ||
- `totalSharesUserVault` | ||
- `supplyQueueVault` | ||
- `withdrawQueueVault` | ||
- `totalCapCollateral` | ||
- `supplyAPYMarket` | ||
- `supplyAPYVault` | ||
|
||
2. functions to modify state | ||
2. Functions to modify state: | ||
|
||
- depositInVault | ||
- withdrawFromVaultAmount | ||
- redeemAllFromVault | ||
- `depositInVault` | ||
- `withdrawFromVaultAmount` | ||
- `redeemAllFromVault` | ||
|
||
## Getting Started | ||
|
||
- Install Foundry. | ||
- Install yarn | ||
- Run foundryup | ||
- Run forge install | ||
- Create a .env file according to the .env.example file. | ||
- Install [Foundry](https://book.getfoundry.sh/getting-started/installation) | ||
- Install [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) | ||
- Run `foundryup` | ||
- Run `forge install` | ||
- Create a `.env` file according to the `.env.example` file. | ||
|
||
## Testing with Foundry 🔨 | ||
## Testing with Foundry | ||
|
||
You can run the test by running the command: | ||
You can run tests by running the command: | ||
|
||
```bash | ||
forge test | ||
``` | ||
|
||
Questions & Feedback | ||
For any question or feedback you can send an email to [email protected]. | ||
## Questions & Feedbacks | ||
|
||
If you have any questions or need further assistance, please don't hesitate to reach out on [Discord](https://discord.morpho.org). | ||
|
||
## License | ||
|
||
Licensing | ||
The code is under the MIT License. See License. | ||
The code is under the MIT License. See [`LICENSE`](./LICENSE). |