Skip to content

Commit

Permalink
Improve general documentation for 5.2 (OpenZeppelin#5310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestognw authored Nov 21, 2024
1 parent 7105693 commit ccb39d2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/governance/utils/VotesExtended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract contract VotesExtended is Votes {
using Checkpoints for Checkpoints.Trace160;
using Checkpoints for Checkpoints.Trace208;

mapping(address delegatee => Checkpoints.Trace160) private _delegateCheckpoints;
mapping(address delegator => Checkpoints.Trace160) private _delegateCheckpoints;
mapping(address account => Checkpoints.Trace208) private _balanceOfCheckpoints;

/**
Expand Down
6 changes: 3 additions & 3 deletions contracts/interfaces/draft-IERC4337.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pragma solidity ^0.8.20;
* - `callData` (`bytes`)
* - `accountGasLimits` (`bytes32`): concatenation of verificationGas (16 bytes) and callGas (16 bytes)
* - `preVerificationGas` (`uint256`)
* - `gasFees` (`bytes32`): concatenation of maxPriorityFee (16 bytes) and maxFeePerGas (16 bytes)
* - `gasFees` (`bytes32`): concatenation of maxPriorityFeePerGas (16 bytes) and maxFeePerGas (16 bytes)
* - `paymasterAndData` (`bytes`): concatenation of paymaster fields (or empty)
* - `signature` (`bytes`)
*/
Expand All @@ -38,8 +38,8 @@ struct PackedUserOperation {
bytes callData;
bytes32 accountGasLimits; // `abi.encodePacked(verificationGasLimit, callGasLimit)` 16 bytes each
uint256 preVerificationGas;
bytes32 gasFees; // `abi.encodePacked(maxPriorityFee, maxFeePerGas)` 16 bytes each
bytes paymasterAndData; // `abi.encodePacked(paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData)`
bytes32 gasFees; // `abi.encodePacked(maxPriorityFeePerGas, maxFeePerGas)` 16 bytes each
bytes paymasterAndData; // `abi.encodePacked(paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData)` (20 bytes, 16 bytes, 16 bytes, dynamic)
bytes signature;
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/proxy/Clones.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ library Clones {
* access the arguments within the implementation, use {fetchCloneArgs}.
*
* This function uses the create2 opcode and a `salt` to deterministically deploy the clone. Using the same
* `implementation` and `salt` multiple times will revert, since the clones cannot be deployed twice at the same
* address.
* `implementation`, `args` and `salt` multiple time will revert, since the clones cannot be deployed twice
* at the same address.
*/
function cloneDeterministicWithImmutableArgs(
address implementation,
Expand Down
4 changes: 2 additions & 2 deletions contracts/utils/NoncesKeyed.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ abstract contract NoncesKeyed is Nonces {
* @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
*
* This version takes the key and the nonce in a single uint256 parameter:
* - use the first 8 bytes for the key
* - use the last 24 bytes for the nonce
* - use the first 24 bytes for the key
* - use the last 8 bytes for the nonce
*/
function _useCheckedNonce(address owner, uint256 keyNonce) internal virtual override {
(uint192 key, ) = _unpack(keyNonce);
Expand Down

0 comments on commit ccb39d2

Please sign in to comment.