Skip to content

Commit fe22a59

Browse files
committed
reorder variables
1 parent b42ae69 commit fe22a59

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

contracts/governance/Governor.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ import {IGovernor, IERC6372} from "./IGovernor.sol";
2727
abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC721Receiver, IERC1155Receiver {
2828
using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque;
2929

30-
bytes32 public constant BALLOT_TYPEHASH =
31-
keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)");
32-
bytes32 public constant EXTENDED_BALLOT_TYPEHASH =
33-
keccak256(
34-
"ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)"
35-
);
36-
3730
struct ProposalCore {
3831
address proposer;
3932
uint48 voteStart;
@@ -43,7 +36,14 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
4336
uint48 eta;
4437
}
4538

39+
bytes32 public constant BALLOT_TYPEHASH =
40+
keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)");
41+
bytes32 public constant EXTENDED_BALLOT_TYPEHASH =
42+
keccak256(
43+
"ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)"
44+
);
4645
bytes32 private constant _ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1);
46+
4747
string private _name;
4848

4949
mapping(uint256 proposalId => ProposalCore) private _proposals;

contracts/mocks/StorageSlotMock.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import {StorageSlot} from "../utils/StorageSlot.sol";
77
contract StorageSlotMock {
88
using StorageSlot for *;
99

10+
mapping(uint256 key => string) public stringMap;
11+
12+
mapping(uint256 key => bytes) public bytesMap;
13+
1014
function setBoolean(bytes32 slot, bool value) public {
1115
slot.getBooleanSlot().value = value;
1216
}
@@ -39,8 +43,6 @@ contract StorageSlotMock {
3943
return slot.getUint256Slot().value;
4044
}
4145

42-
mapping(uint256 key => string) public stringMap;
43-
4446
function setString(bytes32 slot, string calldata value) public {
4547
slot.getStringSlot().value = value;
4648
}
@@ -57,8 +59,6 @@ contract StorageSlotMock {
5759
return stringMap[key].getStringSlot().value;
5860
}
5961

60-
mapping(uint256 key => bytes) public bytesMap;
61-
6262
function setBytes(bytes32 slot, bytes calldata value) public {
6363
slot.getBytesSlot().value = value;
6464
}

0 commit comments

Comments
 (0)