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 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.
- Install Foundry or Run
foundryup
to initialize Foundry. - Run
yarn
to initialize the repository by installing the required dependencies. - Create a
.env
file with aALCHEMY_KEY
field populated with a personal alchemy RPC key.
- 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.
- Copy the parameters of the call from the DAO to the delay modifier's
execTransactionFromModule
to a json file appropriately named. - Create a test contract that inherits from
DelayModifierTxTest
(see examples: ma3CbEthListingTxTest, ma3REthListingTxTest, ma3SDaiUsdtListingTxTest).
- Copy the transaction data to a json file appropriately named.
- Create a test contract that inherits from
MorphoDaoTxTest
(see example: swapStefanoGuillaumeDaoSignersTxTest).
For any questions or feedbacks, you can join the Morpho discord.
The code is under the MIT License, see LICENSE
.