-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from dharma-eng/DSWv6
1.3.0 - DSWv6
- Loading branch information
Showing
11 changed files
with
3,673 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pragma solidity 0.5.11; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
import "../../interfaces/SaiToDaiMigratorInterface.sol"; | ||
|
||
|
||
/** | ||
* @title MockSaiToDaiMigrator | ||
* @notice This contract swaps Sai for Dai - be sure to give it the Dai first. | ||
*/ | ||
contract MockSaiToDaiMigrator is SaiToDaiMigratorInterface { | ||
IERC20 private constant _SAI = IERC20(0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359); | ||
IERC20 private constant _DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); | ||
|
||
function swapSaiToDai(uint256 balance) external { | ||
_SAI.transferFrom(msg.sender, address(this), balance); | ||
_DAI.transfer(msg.sender, balance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pragma solidity 0.5.11; | ||
|
||
|
||
interface DharmaSmartWalletImplementationV6Interface { | ||
function migrateSaiToDai() external; | ||
function migrateCSaiToCDai() external; | ||
} |
2 changes: 1 addition & 1 deletion
2
interfaces/SaiToDaiMigrator.sol → interfaces/SaiToDaiMigratorInterface.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pragma solidity 0.5.11; | ||
|
||
|
||
interface SaiToDaiMigrator { | ||
interface SaiToDaiMigratorInterface { | ||
function swapSaiToDai(uint256 balance) external; | ||
} |
Oops, something went wrong.