pragma solidity >=0.4.24; pragma experimental ABIEncoderV2; import "../RewardEscrowV2Frozen/IRewardEscrowV2Frozen.sol"; interface IRewardEscrowV2Storage { /// Views function numVestingEntries(address account) external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function totalEscrowedBalance() external view returns (uint); function nextEntryId() external view returns (uint); function vestingSchedules(address account, uint256 entryId) external view returns (VestingEntries.VestingEntry memory); function accountVestingEntryIDs(address account, uint256 index) external view returns (uint); /// Mutative function setZeroAmount(address account, uint entryId) external; function setZeroAmountUntilTarget( address account, uint startIndex, uint targetAmount ) external returns ( uint total, uint endIndex, uint lastEntryTime ); function updateEscrowAccountBalance(address account, int delta) external; function updateVestedAccountBalance(address account, int delta) external; function updateTotalEscrowedBalance(int delta) external; function addVestingEntry(address account, VestingEntries.VestingEntry calldata entry) external returns (uint); // setFallbackRewardEscrow is used for configuration but not used by contracts } /// this should remain backwards compatible to IRewardEscrowV2Frozen /// ideally this would be done by inheriting from that interface /// but solidity v0.5 doesn't support interface inheritance interface IRewardEscrowV2 { // Views function balanceOf(address account) external view returns (uint); function numVestingEntries(address account) external view returns (uint); function totalEscrowedBalance() external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function getVestingQuantity(address account, uint256[] calldata entryIDs) external view returns (uint); function getVestingSchedules( address account, uint256 index, uint256 pageSize ) external view returns (VestingEntries.VestingEntryWithID[] memory); function getAccountVestingEntryIDs( address account, uint256 index, uint256 pageSize ) external view returns (uint256[] memory); function getVestingEntryClaimable(address account, uint256 entryID) external view returns (uint); function getVestingEntry(address account, uint256 entryID) external view returns (uint64, uint256); // Mutative functions function vest(uint256[] calldata entryIDs) external; function createEscrowEntry( address beneficiary, uint256 deposit, uint256 duration ) external; function appendVestingEntry( address account, uint256 quantity, uint256 duration ) external; function migrateVestingSchedule(address _addressToMigrate) external; function migrateAccountEscrowBalances( address[] calldata accounts, uint256[] calldata escrowBalances, uint256[] calldata vestedBalances ) external; // Account Merging function startMergingWindow() external; function mergeAccount(address accountToMerge, uint256[] calldata entryIDs) external; function nominateAccountToMerge(address account) external; function accountMergingIsOpen() external view returns (bool); // L2 Migration function importVestingEntries( address account, uint256 escrowedAmount, VestingEntries.VestingEntry[] calldata vestingEntries ) external; // Return amount of SNX transfered to SynthetixBridgeToOptimism deposit contract function burnForMigration(address account, uint256[] calldata entryIDs) external returns (uint256 escrowedAccountBalance, VestingEntries.VestingEntry[] memory vestingEntries); function nextEntryId() external view returns (uint); function vestingSchedules(address account, uint256 entryId) external view returns (VestingEntries.VestingEntry memory); function accountVestingEntryIDs(address account, uint256 index) external view returns (uint); /// below are methods not available in IRewardEscrowV2Frozen // revoke entries for liquidations (access controlled to Synthetix) function revokeFrom( address account, address recipient, uint targetAmount, uint startIndex ) external; }