File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
contracts/governance/utils Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ import {IVotes} from "./IVotes.sol";
8
8
* @dev Common interface for {ERC20MultiVotes} and other {MultiVotes}-enabled contracts.
9
9
*/
10
10
interface IMultiVotes is IVotes {
11
-
12
11
/**
13
- * @dev Invalid, start should be equal or smaller than end.
14
- */
12
+ * @dev Invalid, start should be equal or smaller than end.
13
+ */
15
14
error StartIsBiggerThanEnd (uint256 start , uint256 end );
16
15
17
16
/**
Original file line number Diff line number Diff line change @@ -61,10 +61,14 @@ abstract contract MultiVotes is Votes, IMultiVotes {
61
61
* NOTE: Order may unexpectedly change if called in different transactions.
62
62
* Trust the returned array only if you obtain it within a single transaction.
63
63
*/
64
- function multiDelegates (address account , uint256 start , uint256 end ) public view virtual returns (address [] memory ) {
64
+ function multiDelegates (
65
+ address account ,
66
+ uint256 start ,
67
+ uint256 end
68
+ ) public view virtual returns (address [] memory ) {
65
69
uint256 maxLength = _delegatesList[account].length ;
66
70
require (end >= start, StartIsBiggerThanEnd (start, end));
67
- if (start >= maxLength) {
71
+ if (start >= maxLength) {
68
72
address [] memory empty = new address [](0 );
69
73
return empty;
70
74
}
@@ -75,7 +79,7 @@ abstract contract MultiVotes is Votes, IMultiVotes {
75
79
uint256 length = (end + 1 ) - start;
76
80
address [] memory list = new address [](length);
77
81
78
- for (uint256 i; i < length; i++ ) {
82
+ for (uint256 i; i < length; i++ ) {
79
83
list[i] = _delegatesList[account][start + i];
80
84
}
81
85
You can’t perform that action at this time.
0 commit comments