Skip to content

Commit

Permalink
reorder variables
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Aug 16, 2023
1 parent b42ae69 commit fe22a59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions contracts/governance/Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions contracts/mocks/StorageSlotMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit fe22a59

Please # to comment.