// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @title SOMA ERC20 History Upgradeable Contract. * @author SOMA.finance * @notice An ERC20 extension to keep a history of each account's voting balance. */ interface IERC20HistoryUpgradeable { /** * @notice Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. * @param account The account that had a change in balance. * @param previousBalance The previous balance of `account`. * @param newBalance The new balance of `account`. */ event BalanceChanged(address indexed account, uint256 previousBalance, uint256 newBalance); /** * @notice Returns the balance for `account` at the end of `blockNumber`. * @param account The account to return the past balance of. * @param blockNumber The block number to return ``account``'s balance at. * @custom:requirement `blockNumber` must have been already mined. * @return The balance of `account` at `blockNumber`. */ function getPastBalance(address account, uint256 blockNumber) external view returns (uint256); /** * @notice Returns the total supply of votes available at the end of a past block (`blockNumber`). * @dev This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. * @param blockNumber The block number to return the total supply at. * @custom:requirement `blockNumber` must have been already mined. * @return The total supply at `blockNumber`. */ function getPastTotalSupply(uint256 blockNumber) external view returns (uint256); }