Giter Club home page Giter Club logo

morpho-seatbelt's Introduction

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 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 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

Testing a transaction to the Morpho DAO

Questions & Feedback

For any questions or feedbacks, you can join the Morpho discord.


Licensing

The code is under the MIT License, see LICENSE.

morpho-seatbelt's People

Contributors

tristan22400 avatar pakim249cal avatar merlinegalite avatar rubilmax avatar

Stargazers

Philippe Gonday avatar Quentin Garchery avatar Daksh avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ranamom

morpho-seatbelt's Issues

Check Morpho token roles

  • Role 0 can only transfer, transferFrom tokens
  • Only multisig of the DAO, asso, labs, sense contract (cf forum post)

Add an unwrap transaction util

With an unwrapping utility for data wrapped in an execTransactionFromModule call, it would be easy for tests to be written to use either wrapped or unwrapped transaction data as they please, and easily modify tests to take this into account.

Check DAO setup with Zodiac

  • Make sure that the Morpho Admin is the owner of the different protocols + proxy admin
  • Make sure that the DAO multisig can submit tx on the Delay Modifier to interact with the protocols

Check Operator role

  • Make sure that the operator has the correct right, given the current notion page

CI should not run all tests.

CI tests should be limited to testing the proper functioning of this repository. The nature of this repo is to consume lots of RPC calls to verify state, and so it is unsustainable for all tests to be run in CI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.