abstract contract VestedCrowdsale is Crowdsale {
    address public vestingContract;

    constructor(address vestingContract_) {
        require(
            vestingContract_ != address(0),
            "VestedCrowdsale: zero vesting address"
        );

        vestingContract = vestingContract_;
    }

    function _startDistribution(uint256 scheduleStartTimestamp) internal {
        IVesting(vestingContract).setScheduleStartTimestamp(
            scheduleStartTimestamp
        );
    }

    /**
     * @dev Overrides delivery by transferring tokens to vesting schedule upon purchase.
     * @param beneficiary Token purchaser
     * @param tokenAmount Number of tokens to be vested
     */
    function _deliverTokens(address beneficiary, uint256 tokenAmount)
        internal
        override
    {
        IVesting(vestingContract).addVestingGrant(
            beneficiary,
            tokenAmount,
            false
        );
    }
}
/**
 * @title VestedCrowdsale
 * @author Enjinstarter
 * @dev Extension of Crowdsale contract where purchased tokens are transferred to a vesting schedule.
 */
function _deliverTokens(address beneficiary, uint256 tokenAmount)
    internal
    override
{
    IVesting(vestingContract).addVestingGrant(
        beneficiary,
        tokenAmount,
        false
    );
}

/**
 * @dev Overrides delivery by transferring tokens to vesting schedule upon purchase.
 * @param beneficiary Token purchaser
 * @param tokenAmount Number of tokens to be vested
 */