-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transfer unit tests for new token implementation (#2310)
* remove nonreentrant modifiers from the toke code as they are not needed * add setup for all account types * check all relevant contract initial states * add test between any possible contract accounts * prettier * add some documentation and prettier
- Loading branch information
1 parent
d7a303f
commit 2b3189f
Showing
6 changed files
with
608 additions
and
46 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,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "../token/OUSD.sol"; | ||
|
||
// used to alter internal state of OUSD contract | ||
contract TestUpgradedOUSD is OUSD { | ||
constructor() OUSD() {} | ||
|
||
function overwriteCreditBalances(address _account, uint256 _creditBalance) | ||
public | ||
{ | ||
_creditBalances[_account] = _creditBalance; | ||
} | ||
|
||
function overwriteAlternativeCPT(address _account, uint256 _acpt) public { | ||
alternativeCreditsPerToken[_account] = _acpt; | ||
} | ||
|
||
function overwriteRebaseState(address _account, RebaseOptions _rebaseOption) | ||
public | ||
{ | ||
rebaseState[_account] = _rebaseOption; | ||
} | ||
} |
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
Oops, something went wrong.