https://github.com/morpho-org/morpho-blue-deployment
https://github.com/morpho-org/morpho-blue-deployment
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/morpho-org/morpho-blue-deployment
- Owner: morpho-org
- License: other
- Created: 2023-11-21T17:29:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T17:41:55.000Z (over 1 year ago)
- Last Synced: 2024-09-06T13:52:20.777Z (over 1 year ago)
- Language: Solidity
- Size: 395 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Morpho Blue Deployment
Morpho Blue is a noncustodial lending protocol implemented for the Ethereum Virtual Machine.
Morpho Blue offers a new trustless primitive with increased efficiency and flexibility compared to existing lending platforms.
It provides permissionless risk management and permissionless market creation with oracle agnostic pricing.
It also enables higher collateralization factors, improved interest rates, and lower gas consumption.
The protocol is designed to be a simple, immutable, and governance-minimized base layer that allows for a wide variety of other layers to be built on top.
Morpho Blue also offers a convenient developer experience with a singleton implementation, callbacks, free flash loans, and account management features.
## Whitepaper
The protocol is described in detail in the [Morpho Blue Whitepaper](./morpho-blue-whitepaper.pdf).
## Getting Started
### Installation
```bash
yarn
cp .env.example .env
```
### Deployment
- Add the desired network key and its corresponding RPC url to `foundry.toml`
- `yarn deploy:{component} {network} --broadcast --sender {sender}` followed with appropriate private key management parameters
> [!NOTE]
> If the provided network's RPC url uses a variable environment (such as `ALCHEMY_KEY`), it should be defined in your `.env`
For example:
```bash
yarn deploy:morpho goerli --broadcast --ledger --sender 0x7Ef4174aFdF4514F556439fa2822212278151Db6
```
All deployments that require an instance of Morpho expects that instance to have previously been deployed on the same network using `yarn deploy:morpho {network} --broadcast`, so that Morpho's address is saved and committed to this repository in [broadcast logs](./broadcast/DeployMorpho.sol/1/run-latest.json).
> [!NOTE]
> Broadcast run logs are to be committed to this repository for future reference.
### Etherscan verification
> [!NOTE]
> Your `.env` should contain a valid `ETHERSCAN_API_KEY`.
After each contract deployed, a verification command is automatically added to the verify script associated to the component deployed (for example: [`script/morpho/verify.sh`](script/morpho/verify.sh)).
- Verify all contracts deployed for a component: `yarn verify:{component}`
For example:
```bash
yarn verify:morpho
```
> [!NOTE]
> Verify scripts are **NOT** to be committed to this repository because they are expected to be run only once.
## License
All scripts are licensed under [`GPL-2.0-or-later`](./LICENSE).