Skip to content

Latest commit

 

History

History
268 lines (251 loc) · 9.96 KB

TeamVesting.md

File metadata and controls

268 lines (251 loc) · 9.96 KB

Team Vesting Contract.

  • (TeamVesting.sol)

View Source: contracts/governance/Vesting/TeamVesting.sol

↗ Extends: VestingStorage, Proxy ↘ Derived Contracts: Vesting

TeamVesting contract

A regular vesting contract, but the owner (governance) is able to withdraw earlier without a slashing. *

Functions


constructor

Setup the vesting schedule.

function (address _logic, address _SOV, address _stakingAddress, address _tokenOwner, uint256 _cliff, uint256 _duration, address _feeSharingCollector) public nonpayable

Arguments

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.
_cliff uint256 The time interval to the first withdraw in seconds.
_duration uint256 The total duration in seconds.
_feeSharingCollector address
Source Code
constructor(
        address _logic,
        address _SOV,
        address _stakingAddress,
        address _tokenOwner,
        uint256 _cliff,
        uint256 _duration,
        address _feeSharingCollector
    ) public {
        require(_SOV != address(0), "SOV address invalid");
        require(_stakingAddress != address(0), "staking address invalid");
        require(_tokenOwner != address(0), "token owner address invalid");
        require(_duration >= _cliff, "duration must be bigger than or equal to the cliff");
        require(_feeSharingCollector != address(0), "feeSharingCollector address invalid");

        _setImplementation(_logic);
        SOV = IERC20(_SOV);
        staking = IStaking(_stakingAddress);
        require(_duration <= staking.MAX_DURATION(), "duration may not exceed the max duration");
        tokenOwner = _tokenOwner;
        cliff = _cliff;
        duration = _duration;
        feeSharingCollector = IFeeSharingCollector(_feeSharingCollector);
    }

Contracts