-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff17af5
commit 44841fe
Showing
397 changed files
with
73,136 additions
and
0 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
contracts/mutants/BalanceDripExposed/1/BOR/BalanceDripExposed.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
pragma solidity >=0.6.0 <0.7.0; | ||
|
||
import "../drip/BalanceDrip.sol"; | ||
|
||
contract BalanceDripExposed { | ||
using BalanceDrip for BalanceDrip.State; | ||
|
||
event DrippedTotalSupply( | ||
uint256 newTokens | ||
); | ||
|
||
event Dripped( | ||
address indexed user, | ||
uint256 newTokens | ||
); | ||
|
||
BalanceDrip.State internal dripState; | ||
|
||
function setDripRate( | ||
uint256 dripRatePerSecond | ||
) external { | ||
dripState.dripRatePerSecond = dripRatePerSecond; | ||
} | ||
|
||
function drip( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function captureNewTokensForUser( | ||
address user, | ||
uint256 userMeasureBalance | ||
) external returns (uint128) { | ||
uint128 newTokens = dripState.captureNewTokensForUser( | ||
user, | ||
userMeasureBalance | ||
); | ||
|
||
emit Dripped(user, newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function dripTwice( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
newTokens = newTokens - dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function exchangeRateMantissa() external view returns (uint256) { | ||
return dripState.exchangeRateMantissa; | ||
} | ||
|
||
function totalDripped() external view returns (uint256) { | ||
return dripState.totalDripped; | ||
} | ||
|
||
function resetTotalDripped() external { | ||
dripState.resetTotalDripped(); | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
contracts/mutants/BalanceDripExposed/1/EED/BalanceDripExposed.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
pragma solidity >=0.6.0 <0.7.0; | ||
|
||
import "../drip/BalanceDrip.sol"; | ||
|
||
contract BalanceDripExposed { | ||
using BalanceDrip for BalanceDrip.State; | ||
|
||
event DrippedTotalSupply( | ||
uint256 newTokens | ||
); | ||
|
||
event Dripped( | ||
address indexed user, | ||
uint256 newTokens | ||
); | ||
|
||
BalanceDrip.State internal dripState; | ||
|
||
function setDripRate( | ||
uint256 dripRatePerSecond | ||
) external { | ||
dripState.dripRatePerSecond = dripRatePerSecond; | ||
} | ||
|
||
function drip( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
/* emit DrippedTotalSupply(newTokens); */ | ||
|
||
return newTokens; | ||
} | ||
|
||
function captureNewTokensForUser( | ||
address user, | ||
uint256 userMeasureBalance | ||
) external returns (uint128) { | ||
uint128 newTokens = dripState.captureNewTokensForUser( | ||
user, | ||
userMeasureBalance | ||
); | ||
|
||
emit Dripped(user, newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function dripTwice( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
newTokens = newTokens + dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function exchangeRateMantissa() external view returns (uint256) { | ||
return dripState.exchangeRateMantissa; | ||
} | ||
|
||
function totalDripped() external view returns (uint256) { | ||
return dripState.totalDripped; | ||
} | ||
|
||
function resetTotalDripped() external { | ||
dripState.resetTotalDripped(); | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
contracts/mutants/BalanceDripExposed/1/FVR/BalanceDripExposed.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
pragma solidity >=0.6.0 <0.7.0; | ||
|
||
import "../drip/BalanceDrip.sol"; | ||
|
||
contract BalanceDripExposed { | ||
using BalanceDrip for BalanceDrip.State; | ||
|
||
event DrippedTotalSupply( | ||
uint256 newTokens | ||
); | ||
|
||
event Dripped( | ||
address indexed user, | ||
uint256 newTokens | ||
); | ||
|
||
BalanceDrip.State internal dripState; | ||
|
||
function setDripRate( | ||
uint256 dripRatePerSecond | ||
) public { | ||
dripState.dripRatePerSecond = dripRatePerSecond; | ||
} | ||
|
||
function drip( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function captureNewTokensForUser( | ||
address user, | ||
uint256 userMeasureBalance | ||
) external returns (uint128) { | ||
uint128 newTokens = dripState.captureNewTokensForUser( | ||
user, | ||
userMeasureBalance | ||
); | ||
|
||
emit Dripped(user, newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function dripTwice( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
newTokens = newTokens + dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function exchangeRateMantissa() external view returns (uint256) { | ||
return dripState.exchangeRateMantissa; | ||
} | ||
|
||
function totalDripped() external view returns (uint256) { | ||
return dripState.totalDripped; | ||
} | ||
|
||
function resetTotalDripped() external { | ||
dripState.resetTotalDripped(); | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
contracts/mutants/BalanceDripExposed/1/RSD/BalanceDripExposed.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
pragma solidity >=0.6.0 <0.7.0; | ||
|
||
import "../drip/BalanceDrip.sol"; | ||
|
||
contract BalanceDripExposed { | ||
using BalanceDrip for BalanceDrip.State; | ||
|
||
event DrippedTotalSupply( | ||
uint256 newTokens | ||
); | ||
|
||
event Dripped( | ||
address indexed user, | ||
uint256 newTokens | ||
); | ||
|
||
BalanceDrip.State internal dripState; | ||
|
||
function setDripRate( | ||
uint256 dripRatePerSecond | ||
) external { | ||
dripState.dripRatePerSecond = dripRatePerSecond; | ||
} | ||
|
||
function drip( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
/* return newTokens; */ | ||
} | ||
|
||
function captureNewTokensForUser( | ||
address user, | ||
uint256 userMeasureBalance | ||
) external returns (uint128) { | ||
uint128 newTokens = dripState.captureNewTokensForUser( | ||
user, | ||
userMeasureBalance | ||
); | ||
|
||
emit Dripped(user, newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function dripTwice( | ||
uint256 measureTotalSupply, | ||
uint256 currentTime, | ||
uint256 maxNewTokens | ||
) external returns (uint256) { | ||
uint256 newTokens = dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
newTokens = newTokens + dripState.drip( | ||
measureTotalSupply, | ||
currentTime, | ||
maxNewTokens | ||
); | ||
|
||
emit DrippedTotalSupply(newTokens); | ||
|
||
return newTokens; | ||
} | ||
|
||
function exchangeRateMantissa() external view returns (uint256) { | ||
return dripState.exchangeRateMantissa; | ||
} | ||
|
||
function totalDripped() external view returns (uint256) { | ||
return dripState.totalDripped; | ||
} | ||
|
||
function resetTotalDripped() external { | ||
dripState.resetTotalDripped(); | ||
} | ||
} |
Oops, something went wrong.