View Source: contracts/mockup/previousLoanToken/PreviousLoanToken.sol
↗ Extends: AdvancedTokenStorage
Constants & Variables
//public members
address public sovrynContractAddress;
address public wrbtcTokenAddress;
//internal members
address internal target_;
- constructor(address _newOwner, address _newTarget, address _sovrynContractAddress, address _wrbtcTokenAddress)
- constructor()
- setTarget(address _newTarget)
- _setTarget(address _newTarget)
- _setSovrynContractAddress(address _sovrynContractAddress)
- _setWrbtcTokenAddress(address _wrbtcTokenAddress)
- initialize(address _loanTokenAddress, string _name, string _symbol)
function (address _newOwner, address _newTarget, address _sovrynContractAddress, address _wrbtcTokenAddress) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
_newOwner | address | |
_newTarget | address | |
_sovrynContractAddress | address | |
_wrbtcTokenAddress | address |
Source Code
constructor(
address _newOwner,
address _newTarget,
address _sovrynContractAddress,
address _wrbtcTokenAddress
) public {
transferOwnership(_newOwner);
_setTarget(_newTarget);
_setSovrynContractAddress(_sovrynContractAddress);
_setWrbtcTokenAddress(_wrbtcTokenAddress);
}
function () external payable
Source Code
function() external payable {
if (gasleft() <= 2300) {
return;
}
address target = target_;
bytes memory data = msg.data;
assembly {
let result := delegatecall(gas, target, add(data, 0x20), mload(data), 0, 0)
let size := returndatasize
let ptr := mload(0x40)
returndatacopy(ptr, 0, size)
switch result
case 0 {
revert(ptr, size)
}
default {
return(ptr, size)
}
}
}
function setTarget(address _newTarget) public nonpayable onlyOwner
Arguments
Name | Type | Description |
---|---|---|
_newTarget | address |
Source Code
function setTarget(address _newTarget) public onlyOwner {
_setTarget(_newTarget);
}
function _setTarget(address _newTarget) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
_newTarget | address |
Source Code
function _setTarget(address _newTarget) internal {
require(Address.isContract(_newTarget), "target not a contract");
target_ = _newTarget;
}
function _setSovrynContractAddress(address _sovrynContractAddress) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
_sovrynContractAddress | address |
Source Code
function _setSovrynContractAddress(address _sovrynContractAddress) internal {
require(Address.isContract(_sovrynContractAddress), "sovryn not a contract");
sovrynContractAddress = _sovrynContractAddress;
}
function _setWrbtcTokenAddress(address _wrbtcTokenAddress) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
_wrbtcTokenAddress | address |
Source Code
function _setWrbtcTokenAddress(address _wrbtcTokenAddress) internal {
require(Address.isContract(_wrbtcTokenAddress), "wrbtc not a contract");
wrbtcTokenAddress = _wrbtcTokenAddress;
}
function initialize(address _loanTokenAddress, string _name, string _symbol) public nonpayable onlyOwner
Arguments
Name | Type | Description |
---|---|---|
_loanTokenAddress | address | |
_name | string | |
_symbol | string |
Source Code
function initialize(
address _loanTokenAddress,
string memory _name,
string memory _symbol
) public onlyOwner {
loanTokenAddress = _loanTokenAddress;
name = _name;
symbol = _symbol;
decimals = IERC20(loanTokenAddress).decimals();
initialPrice = 10**18; // starting price of 1
}
- Address
- Administered
- AdminRole
- AdvancedToken
- AdvancedTokenStorage
- Affiliates
- AffiliatesEvents
- ApprovalReceiver
- BProPriceFeed
- CheckpointsShared
- Constants
- Context
- DevelopmentFund
- DummyContract
- EnumerableAddressSet
- EnumerableBytes32Set
- EnumerableBytes4Set
- ERC20
- ERC20Detailed
- ErrorDecoder
- Escrow
- EscrowReward
- FeedsLike
- FeesEvents
- FeeSharingCollector
- FeeSharingCollectorProxy
- FeeSharingCollectorStorage
- FeesHelper
- FourYearVesting
- FourYearVestingFactory
- FourYearVestingLogic
- FourYearVestingStorage
- GenericTokenSender
- GovernorAlpha
- GovernorVault
- IApproveAndCall
- IChai
- IContractRegistry
- IConverterAMM
- IERC1820Registry
- IERC20_
- IERC20
- IERC777
- IERC777Recipient
- IERC777Sender
- IFeeSharingCollector
- IFourYearVesting
- IFourYearVestingFactory
- IFunctionsList
- ILiquidityMining
- ILiquidityPoolV1Converter
- ILoanPool
- ILoanToken
- ILoanTokenLogicBeacon
- ILoanTokenLogicModules
- ILoanTokenLogicProxy
- ILoanTokenModules
- ILoanTokenWRBTC
- ILockedSOV
- IMoCState
- IModulesProxyRegistry
- Initializable
- InterestUser
- IPot
- IPriceFeeds
- IPriceFeedsExt
- IProtocol
- IRSKOracle
- ISovryn
- ISovrynSwapNetwork
- IStaking
- ISwapsImpl
- ITeamVesting
- ITimelock
- IV1PoolOracle
- IVesting
- IVestingFactory
- IVestingRegistry
- IWrbtc
- IWrbtcERC20
- LenderInterestStruct
- LiquidationHelper
- LiquidityMining
- LiquidityMiningConfigToken
- LiquidityMiningProxy
- LiquidityMiningStorage
- LoanClosingsEvents
- LoanClosingsLiquidation
- LoanClosingsRollover
- LoanClosingsShared
- LoanClosingsWith
- LoanClosingsWithoutInvariantCheck
- LoanInterestStruct
- LoanMaintenance
- LoanMaintenanceEvents
- LoanOpenings
- LoanOpeningsEvents
- LoanParamsStruct
- LoanSettings
- LoanSettingsEvents
- LoanStruct
- LoanToken
- LoanTokenBase
- LoanTokenLogicBeacon
- LoanTokenLogicLM
- LoanTokenLogicProxy
- LoanTokenLogicStandard
- LoanTokenLogicStorage
- LoanTokenLogicWrbtc
- LoanTokenSettingsLowerAdmin
- LockedSOV
- MarginTradeStructHelpers
- Medianizer
- ModuleCommonFunctionalities
- ModulesCommonEvents
- ModulesProxy
- ModulesProxyRegistry
- MultiSigKeyHolders
- MultiSigWallet
- Mutex
- Objects
- OrderStruct
- OrigingVestingCreator
- OriginInvestorsClaim
- Ownable
- Pausable
- PausableOz
- PreviousLoanToken
- PreviousLoanTokenSettingsLowerAdmin
- PriceFeedRSKOracle
- PriceFeeds
- PriceFeedsLocal
- PriceFeedsMoC
- PriceFeedV1PoolOracle
- ProtocolAffiliatesInterface
- ProtocolLike
- ProtocolSettings
- ProtocolSettingsEvents
- ProtocolSettingsLike
- ProtocolSwapExternalInterface
- ProtocolTokenUser
- Proxy
- ProxyOwnable
- ReentrancyGuard
- RewardHelper
- RSKAddrValidator
- SafeERC20
- SafeMath
- SafeMath96
- setGet
- SharedReentrancyGuard
- SignedSafeMath
- SOV
- sovrynProtocol
- StakingAdminModule
- StakingGovernanceModule
- StakingInterface
- StakingProxy
- StakingRewards
- StakingRewardsProxy
- StakingRewardsStorage
- StakingShared
- StakingStakeModule
- StakingStorageModule
- StakingStorageShared
- StakingVestingModule
- StakingWithdrawModule
- State
- SwapsEvents
- SwapsExternal
- SwapsImplLocal
- SwapsImplSovrynSwap
- SwapsUser
- TeamVesting
- Timelock
- TimelockHarness
- TimelockInterface
- TokenSender
- UpgradableProxy
- USDTPriceFeed
- Utils
- VaultController
- Vesting
- VestingCreator
- VestingFactory
- VestingLogic
- VestingRegistry
- VestingRegistry2
- VestingRegistry3
- VestingRegistryLogic
- VestingRegistryProxy
- VestingRegistryStorage
- VestingStorage
- WeightedStakingModule
- WRBTC