-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PDE-401] Yieldtoken and tests (#135)
- Loading branch information
Showing
4 changed files
with
493 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.25; | ||
|
||
contract MockInvalidSmartWallet { | ||
// Empty contract that will fail when called | ||
} |
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,30 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.25; | ||
|
||
import { IAssetToken } from "../interfaces/IAssetToken.sol"; | ||
import { YieldToken } from "../token/YieldToken.sol"; | ||
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
|
||
contract MockYieldToken is YieldToken { | ||
|
||
constructor( | ||
address owner, | ||
string memory name, | ||
string memory symbol, | ||
IERC20 currencyToken, | ||
uint8 decimals_, | ||
string memory tokenURI_, | ||
IAssetToken assetToken, | ||
uint256 initialSupply | ||
) YieldToken(owner, name, symbol, currencyToken, decimals_, tokenURI_, assetToken, initialSupply) { } | ||
|
||
// Expose internal functions for testing | ||
function notifyDeposit(uint256 assets, uint256 shares, address controller) external { | ||
_notifyDeposit(assets, shares, controller); | ||
} | ||
|
||
function notifyRedeem(uint256 assets, uint256 shares, address controller) external { | ||
_notifyRedeem(assets, shares, controller); | ||
} | ||
|
||
} |
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
Oops, something went wrong.