- (FourYearVesting.sol)
View Source: contracts/governance/Vesting/fouryear/FourYearVesting.sol
↗ Extends: FourYearVestingStorage, UpgradableProxy
A four year vesting contract. *
- constructor(address _logic, address _SOV, address _stakingAddress, address _tokenOwner, address _feeSharingCollector, uint256 _extendDurationFor)
- setImplementation(address _implementation)
Setup the vesting schedule.
function (address _logic, address _SOV, address _stakingAddress, address _tokenOwner, address _feeSharingCollector, uint256 _extendDurationFor) public nonpayableArguments
| Name | Type | Description |
|---|---|---|
| _logic | address | The address of logic contract. |
| _SOV | address | The SOV token address. |
| _stakingAddress | address | |
| _tokenOwner | address | The owner of the tokens. |
| _feeSharingCollector | address | Fee sharing proxy address. |
| _extendDurationFor | uint256 | Duration till the unlocked tokens are extended. |
Source Code
constructor(
address _logic,
address _SOV,
address _stakingAddress,
address _tokenOwner,
address _feeSharingCollector,
uint256 _extendDurationFor
) public {
require(Address.isContract(_logic), "_logic not a contract");
require(_SOV != address(0), "SOV address invalid");
require(Address.isContract(_SOV), "_SOV not a contract");
require(_stakingAddress != address(0), "staking address invalid");
require(Address.isContract(_stakingAddress), "_stakingAddress not a contract");
require(_tokenOwner != address(0), "token owner address invalid");
require(_feeSharingCollector != address(0), "feeSharingCollector address invalid");
require(Address.isContract(_feeSharingCollector), "_feeSharingCollector not a contract");
require((_extendDurationFor % FOUR_WEEKS) == 0, "invalid duration");
_setImplementation(_logic);
SOV = IERC20(_SOV);
staking = IStaking(_stakingAddress);
tokenOwner = _tokenOwner;
feeSharingCollector = IFeeSharingCollector(_feeSharingCollector);
maxInterval = 18 * FOUR_WEEKS;
extendDurationFor = _extendDurationFor;
}⤾ overrides UpgradableProxy.setImplementation
Set address of the implementation - vesting owner.
function setImplementation(address _implementation) public nonpayable onlyProxyOwner Arguments
| Name | Type | Description |
|---|---|---|
| _implementation | address | Address of the implementation. Must match with what is set by token owner. |
Source Code
function setImplementation(address _implementation) public onlyProxyOwner {
require(Address.isContract(_implementation), "_implementation not a contract");
require(newImplementation == _implementation, "address mismatch");
_setImplementation(_implementation);
newImplementation = address(0);
}- 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