Skip to content

Smart contract modules to enable MakerDAO Endgame.

Notifications You must be signed in to change notification settings

0x3phemeralsoul/endgame-toolkit

 
 

Repository files navigation

Endgame Toolkit

A set of components for the SubDAO stack in the context of the MakerDAO Endgame.

Components

SubProxy

The SubProxy is the SubDAO level counter-party of the MakerDAO level MCD_PAUSE_PROXY.

The reason a Proxy is required is to isolate the context of execution for spells from the main governance contract to avoid potential exploits messing with the original contract storage.

This module is heavily inspired by the original DSPauseProxy contract, with a few modifications:

  1. Instead of a single owner, it uses the now classic wards/rely/deny pattern from MCD.
  2. The exec function is payable.

Interface

rely(address usr)

Grants usr access to execute calls through this contract.

deny(address usr)

Revokes usr access to execute calls through this contract.

exec(address target, bytes memory args) payable returns (bytes memory out)

Executes a calldata-encoded call args on target through delegatecall.
The caller must have been relyed before.

Contributing

Requirements

We use Foundry for all Solidity things and Node.js + Yarn to manage devtools, such as linting and formatting.

Install dependencies

After cloning the repo, run:

# 1. Install solhint, prettier, husky and other tools
yarn install
# 2. Install Foundry dependencies
forge update

Run tests

forge test -vvv

About

Smart contract modules to enable MakerDAO Endgame.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 91.7%
  • Shell 8.3%