how the owner or manager can interact with the VestingEscrow contract. Could you explain…
- User
how the owner or manager can interact with the VestingEscrow contract. Could you explain the conditions under which revocation is possible and the steps involved? // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.23;
import {Clone} from ‘@solady/utils/Clone.sol’; import {Math} from ‘@openzeppelin/contracts/utils/math/Math.sol’; import {Address} from ‘@openzeppelin/contracts/utils/Address.sol’; import {IERC20} from ‘@openzeppelin/contracts/token/ERC20/IERC20.sol’; import {SafeERC20} from ‘@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol’; import {IVestingEscrowFactory} from ‘src/interfaces/IVestingEscrowFactory.sol’; import {IVestingEscrow} from ‘src/interfaces/IVestingEscrow.sol’; import {IVotingAdaptor} from ‘src/interfaces/IVotingAdaptor.sol’;
contract VestingEscrow is IVestingEscrow, Clone { using SafeERC20 for IERC20; using Address for address; using Address for address payable;
/// @notice The factory that created this VestingEscrow instance. function factory() public pure returns (IVestingEscrowFactory) { return IVestingEscrowFactory(_getArgAddress(0)); }
/// @notice The token. function token() public pure returns (IERC20) { return IERC20(_getArgAddress(20)); }
/// @notice The token recipient. function recipient() public pure returns (address) { return _getArgAddress(40); }
/// @notice The vesting start timestamp. function startTime() public pure returns (uint40) { return _getArgUint40(60); }
/// @notice The vesting end timestamp. function endTime() public pure returns (uint40) { return _getArgUint40(65); }
/// @notice The vesting cliff length. function cliffLength() public pure returns (uint40) { return _getArgUint40(70); }
/// @notice The total amount of tokens locked. function totalLocked() public pure returns (uint256) { return _getArgUint256(75); }
/// @notice The total amount of tokens that have been claimed. uint256 public totalClaimed;
/// @notice The vesting end time or the time at which vesting was revoked. uint40 public disabledAt;
/// @notice Whether vesting is fully revokable. bool public isFullyRevokable;
/// @notice Whether vesting has been fully revoked. bool public isFullyRevoked;
/// @notice Throws if called by any account other than the owner. modifier onlyOwner() { _checkOwner(); _; }
/// @notice Throws if called by any account other than the owner or manager. modifier onlyOwnerOrManager() { _checkOwnerOrManager(); _; }
/// @notice Throws if called by any account other than the recipient. modifier onlyRecipient() { _checkRecipient(); _; }
/// @notice Throws if the voting adaptor is not set. modifier whenVotingAdaptorIsSet() { _checkVotingAdaptorIsSet(); _; }
/// @notice Initializes the contract. /// @param _isFullyRevokable Whether the tokens are fully revokable. /// @param _initialDelegateParams The optional initial delegate information (skipped if empty bytes). function initialize(bool _isFullyRevokable, bytes calldata _initialDelegateParams) external { address _factory = address(factory()); uint256 _totalLocked = totalLocked(); uint40 _endTime = endTime(); IERC20 _token = token();
- Assistant
- User
add the governance participation aspect. How does the recipient use the votingAdaptor to participate in governance?
- Assistant
- User
- Assistant
- User
prove the validity with evidence
- Assistant