makerdao / dss-test

GNU Affero General Public License v3.0
11 stars 9 forks source link

dss-test

Modern test framework for Maker repositories to get up and running with MCD faster. Extends forge-std.

Getting Started

First do forge install makerdao/dss-test (or dapp equivalent) in your newly setup repository.

Look at src/tests/IntegrationTest.t.sol for a bunch of examples.

There is a special GodMode library which provides useful functions such as giving auth access to an arbitrary contract or setting token balances to any amount.

MCD

A DssInstance is mostly just for keeping a bundle of references to all the common mcd contracts. If you are doing integration testing this can be loaded from the chainlog automatically with MCD.loadFromChainlog(). MCD also provides some high level functions:

MCDUser

MCDUser instances can be used to interact with MCD. They represent the end users and can perform any number of actions. Usually what you will want to do is inherit this contract and extend the functionality to whatever library you are building. MCDUser provides some high level functions: