-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathLoanTokenLogicStorage.sol
50 lines (40 loc) · 1.77 KB
/
LoanTokenLogicStorage.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pragma solidity 0.5.17;
import "./AdvancedToken.sol";
contract LoanTokenLogicStorage is AdvancedToken {
/// DO NOT ADD VARIABLES HERE - SEE BELOW
/// @dev It is important to maintain the variables order so the delegate
/// calls can access sovrynContractAddress
/// ------------- MUST BE THE SAME AS IN LoanToken CONTRACT -------------------
address public sovrynContractAddress;
address public wrbtcTokenAddress;
address public target_;
address public admin;
/// ------------- END MUST BE THE SAME AS IN LoanToken CONTRACT -------------------
/// @dev Add new variables here on the bottom.
address public earlyAccessToken; //not used anymore, but staying for upgradability
address public pauser;
/** The address of the liquidity mining contract */
address public liquidityMiningAddress;
/** The address of the staking contract */
address public stakingContractAddress;
/// @dev Used by flashBorrow function.
uint256 public constant VERSION = 6;
/// @dev Used by flashBorrow function.
address internal constant arbitraryCaller = 0x000F400e6818158D541C3EBE45FE3AA0d47372FF;
bytes32 internal constant iToken_ProfitSoFar =
0x37aa2b7d583612f016e4a4de4292cb015139b3d7762663d06a53964912ea2fb6; // keccak256("iToken_ProfitSoFar")
uint256 public constant TINY_AMOUNT = 25e13;
function stringToBytes32(string memory source) public pure returns (bytes32 result) {
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
modifier onlyPauserOrOwner() {
require(isOwner() || msg.sender == pauser, "unauthorized"); // SS02
_;
}
}