https://github.com/morpho-org/morpho-seatbelt
Morpho seatbelt for governance setup and proposals.
https://github.com/morpho-org/morpho-seatbelt
Last synced: about 1 year ago
JSON representation
Morpho seatbelt for governance setup and proposals.
- Host: GitHub
- URL: https://github.com/morpho-org/morpho-seatbelt
- Owner: morpho-org
- License: mit
- Created: 2023-05-09T16:14:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T10:02:42.000Z (about 2 years ago)
- Last Synced: 2025-03-25T00:40:43.383Z (about 1 year ago)
- Language: Solidity
- Size: 329 KB
- Stars: 3
- Watchers: 8
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Morpho Seatbelt

---
## Overview
Morpho Seatbelt provides a framework for testing governance transactions to update any contract controlled (directly or indirectly) by the Morpho DAO. Morpho uses the [Zodiac](https://github.com/gnosis/zodiac) collection of tools to enforce transaction delays and restrict certain functions to addresses with an appropriate role. Some key utilities included are reading gnosis safe transactions from a json, reading key internal state variables of contracts without external getters, and minimal interfaces to limit dependencies.
---
## Development
### Getting Started
- Install [Foundry](https://github.com/foundry-rs/foundry) or Run `foundryup` to initialize Foundry.
- Run `yarn` to initialize the repository by installing the required dependencies.
- Create a `.env` file with a `ALCHEMY_KEY` field populated with a personal alchemy RPC key.
### Running tests
- Use `yarn test` to run tests on standard invariants regarding the Morpho DAO & the $MORPHO token setup.
- Use `yarn test:txs` to run tests on specific DAO transactions.
### Testing a DAO transaction
#### Testing a transaction through the Delay Modifier
- Copy the parameters of the call from the DAO to the delay modifier's `execTransactionFromModule` to a [json file appropriately named](./test/transactions/data/).
- Create a test contract that inherits from `DelayModifierTxTest` (see examples: [ma3CbEthListingTxTest](./test/transactions/ma3CbEthListingTxTest.sol), [ma3REthListingTxTest](./test/transactions/ma3REthListingTxTest.sol), [ma3SDaiUsdtListingTxTest](./test/transactions/ma3SDaiUsdtListingTxTest.sol)).
#### Testing a transaction to the Morpho DAO
- Copy the transaction data to a [json file appropriately named](./test/transactions/data/).
- Create a test contract that inherits from `MorphoDaoTxTest` (see example: [swapStefanoGuillaumeDaoSignersTxTest](./test/transactions/swapStefanoGuillaumeDaoSignersTxTest.sol)).
## Questions & Feedback
For any questions or feedbacks, you can join the Morpho [discord](https://discord.morpho.xyz).
---
## Licensing
The code is under the MIT License, see [`LICENSE`](./LICENSE).