Process

Install dependencies

  • forge install yieldprotocol/yield-utils-v2

    • IERC20 interface

  • forge install openZeppelin/openzeppelin-contracts

    • Ownable.sol

  • forge install smartcontractkit/chainlink

    • For AggregatorV3 and MockV3Aggregator

Pull contracts from Etherscan

  • WETH9.sol: https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2#code

  • DAI.sol: https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f#code

Updating contracts to v0.8.0

WETH9.sol:

  • added 'emit' to all events

  • uint(-1) refactored to type(uint).max (line 70)

  • https://ethereum.stackexchange.com/questions/80081/what-is-the-purpose-of-uint256-1

  • https://ethereum.stackexchange.com/questions/97491/meaning-of-expression-typeuint-max

DAI.sol:

  • removed inheritance of LibNote

  • -> removed note modifier from function reply and deny (line 78 & 79)

  • -> line 112: removed public from constructor.

  • -> line 190: now deprecated. changed to block.timestamp

  • -> line 192: uint(-1) changed to type(uint).max (also on 131, 147)

Last updated