// SPDX-License-Identifier: MIT // Gearbox Protocol. Generalized leverage for DeFi protocols // (c) Gearbox Holdings, 2022 pragma solidity ^0.8.10; pragma abicoder v2; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IGearToken is IERC20 { /** * @dev Approves token spending by signature * @param owner The address to approve from * @param spender The address to be approved * @param rawAmount The number of tokens that are approved (type(uint256).max sets allowance to infinite) * @param deadline The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function permit( address owner, address spender, uint256 rawAmount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) external; /** * @notice Delegate votes by signature * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; /** * @notice Returns the current total votes for `account` * @param account The address to get voting power for * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96); /** * @notice Determine the number of votes for an account as of a prior block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96); }