From fe22a59659590882873a6c56189e0547ae7e917f Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Wed, 16 Aug 2023 18:47:16 -0300 Subject: [PATCH] reorder variables --- contracts/governance/Governor.sol | 14 +++++++------- contracts/mocks/StorageSlotMock.sol | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index b149129dd61..999744d817d 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -27,13 +27,6 @@ import {IGovernor, IERC6372} from "./IGovernor.sol"; abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC721Receiver, IERC1155Receiver { using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; - bytes32 public constant BALLOT_TYPEHASH = - keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)"); - bytes32 public constant EXTENDED_BALLOT_TYPEHASH = - keccak256( - "ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)" - ); - struct ProposalCore { address proposer; uint48 voteStart; @@ -43,7 +36,14 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 uint48 eta; } + bytes32 public constant BALLOT_TYPEHASH = + keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)"); + bytes32 public constant EXTENDED_BALLOT_TYPEHASH = + keccak256( + "ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)" + ); bytes32 private constant _ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); + string private _name; mapping(uint256 proposalId => ProposalCore) private _proposals; diff --git a/contracts/mocks/StorageSlotMock.sol b/contracts/mocks/StorageSlotMock.sol index dbdad7a2a8e..992d526e1d2 100644 --- a/contracts/mocks/StorageSlotMock.sol +++ b/contracts/mocks/StorageSlotMock.sol @@ -7,6 +7,10 @@ import {StorageSlot} from "../utils/StorageSlot.sol"; contract StorageSlotMock { using StorageSlot for *; + mapping(uint256 key => string) public stringMap; + + mapping(uint256 key => bytes) public bytesMap; + function setBoolean(bytes32 slot, bool value) public { slot.getBooleanSlot().value = value; } @@ -39,8 +43,6 @@ contract StorageSlotMock { return slot.getUint256Slot().value; } - mapping(uint256 key => string) public stringMap; - function setString(bytes32 slot, string calldata value) public { slot.getStringSlot().value = value; } @@ -57,8 +59,6 @@ contract StorageSlotMock { return stringMap[key].getStringSlot().value; } - mapping(uint256 key => bytes) public bytesMap; - function setBytes(bytes32 slot, bytes calldata value) public { slot.getBytesSlot().value = value; }