Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 892 Bytes

File metadata and controls

26 lines (17 loc) · 892 Bytes

Proxy Borrow Exercise

In this exercise, you'll learn how to borrow DAI through a DSProxy using DssProxyActions.

The starter code for this exercise is provided in foundry/src/exercises/ProxyBorrow.sol

Solution is in foundry/src/solutions/ProxyBorrow.sol

Hint: notes/code/DssProxyActions.sol

Task 1 - Borrow DAI via proxy

function borrow(uint256 amt) external auth {
    // Write your code here
}
  • Execute IDssProxyActions.draw through the proxy to generate DAI.
  • Transfer the borrowed DAI to the caller.

Test

forge test --fork-url $FORK_URL --match-path test/ProxyBorrow.t.sol -vvv