Skip to content

Group Typo Fixes 4 #5750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
25eb677
Add github release tag to readme. (#5627)
Olexandr88 Apr 8, 2025
a7fb048
Merge branch 'master' into typo-fixes
arr00 May 9, 2025
fba8c4f
Update hardhat.config.js (#5675)
XZSt4nce May 9, 2025
d43e45b
Merge branch 'master' of github.com:OpenZeppelin/openzeppelin-contrac…
gonzaotc Jun 23, 2025
5702d95
fix: change SlotDerivation usage to 'for *' in template and generated…
gonzaotc Jun 24, 2025
659d4b2
Merge branch 'typo-fixes' of github.com:OpenZeppelin/openzeppelin-con…
gonzaotc Jun 23, 2025
0b9edd4
Merge branch 'master' into typo-fixes
Amxx Jul 1, 2025
6caac66
chore: remove redundant word (#5774)
sellskin Jul 1, 2025
98a43df
Merge branch 'master' into typo-fixes
Amxx Jul 8, 2025
337211c
Merge branch 'master' into typo-fixes
Amxx Jul 12, 2025
33513d1
Explicit Initialization of Loop Counter in escapeJSON Function (#5796)
reallesee Jul 12, 2025
fe20e98
Merge branch 'master' into typo-fixes
Amxx Jul 21, 2025
7d823fe
chore: fix typos (#5807)
solanaXpeter Jul 21, 2025
a774572
Merge branch 'master' into typo-fixes
Amxx Jul 23, 2025
a909a7d
Improve Math.sol NatSpec documentation (#5813)
aviggiano Jul 23, 2025
2c0d228
fix: typos (#5811)
crStiv Jul 24, 2025
2bb691a
Merge branch 'master' into typo-fixes
Amxx Jul 24, 2025
0f5566d
Merge branch 'master' into typo-fixes
Amxx Jul 31, 2025
7dcf761
Fix typos and inaccuracies in documentation (#5815)
torrpriius Aug 4, 2025
0b388b0
Merge branch 'master' into typo-fixes
ernestognw Aug 4, 2025
2050256
up
gap-editor Aug 3, 2025
95c41d2
fix: couple of typos (#5833)
CreeptoGengar Aug 6, 2025
58cbf7b
Remove duplicate word in ERC7821 comment (#5839)
aso20455 Aug 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To keep your system secure, you should **always** use the installed code as-is,
The guides in the [documentation site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides:

* [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system.
* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales).
* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives.
* [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools including non-overflowing math, signature verification, and trustless paying systems.

The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts' development in the [community forum](https://forum.openzeppelin.com).
Expand Down
2 changes: 1 addition & 1 deletion contracts/account/extensions/draft-ERC7821.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Account} from "../Account.sol";
/**
* @dev Minimal batch executor following ERC-7821.
*
* Only supports supports single batch mode (`0x01000000000000000000`). Does not support optional "opData".
* Only supports single batch mode (`0x01000000000000000000`). Does not support optional "opData".
*
* @custom:stateless
*/
Expand Down
6 changes: 3 additions & 3 deletions contracts/governance/extensions/GovernorTimelockControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ abstract contract GovernorTimelockControl is Governor {
return currentState;
}

bytes32 queueid = _timelockIds[proposalId];
if (_timelock.isOperationPending(queueid)) {
bytes32 queueId = _timelockIds[proposalId];
if (_timelock.isOperationPending(queueId)) {
return ProposalState.Queued;
} else if (_timelock.isOperationDone(queueid)) {
} else if (_timelock.isOperationDone(queueId)) {
// This can happen if the proposal is executed directly on the timelock.
return ProposalState.Executed;
} else {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/TimelockReentrant.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contract TimelockReentrant {
_reentered = true;
}

function enableRentrancy(address target, bytes calldata data) external {
function enableReentrancy(address target, bytes calldata data) external {
_reenterTarget = target;
_reenterData = data;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/Base64.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library Base64 {
*/
function _encode(bytes memory data, string memory table, bool withPadding) private pure returns (string memory) {
/**
* Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
* Inspired by Brecht Devos (Brechtpd) implementation - MIT license
* https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
*/
if (data.length == 0) return "";
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/SlotDerivation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pragma solidity ^0.8.20;
* contract Example {
* // Add the library methods
* using StorageSlot for bytes32;
* using SlotDerivation for bytes32;
* using SlotDerivation for *;
*
* // Declare a namespace
* string private constant _NAMESPACE = "<namespace>"; // eg. OpenZeppelin.Slot
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/Strings.sol
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ library Strings {
bytes memory output = new bytes(2 * buffer.length); // worst case scenario
uint256 outputLength = 0;

for (uint256 i; i < buffer.length; ++i) {
for (uint256 i = 0; i < buffer.length; ++i) {
bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));
if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {
output[outputLength++] = "\\";
Expand Down
1 change: 1 addition & 0 deletions contracts/utils/cryptography/ECDSA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ library ECDSA {
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
*
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/cryptography/README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Cryptography

[.readme-notice]
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils/cryptography
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils#cryptography

A collection of contracts and libraries that implement various signature validation schemes and cryptographic primitives. These utilities enable secure authentication, multisignature operations, and advanced cryptographic operations in smart contracts.

Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/cryptography/draft-ERC7739Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library ERC7739Utils {
* - `APP_DOMAIN_SEPARATOR` is the EIP-712 {EIP712-_domainSeparatorV4} of the application smart contract that is
* requesting the signature verification (though ERC-1271).
* - `contentsHash` is the hash of the underlying data structure or message.
* - `contentsDescr` is a descriptor of the "contents" part of the the EIP-712 type of the nested signature.
* - `contentsDescr` is a descriptor of the "contents" part of the EIP-712 type of the nested signature.
*
* NOTE: This function returns empty if the input format is invalid instead of reverting.
* data instead.
Expand Down
4 changes: 2 additions & 2 deletions contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ library Math {
}

/**
* @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
* @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.
*
* IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
* However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
* However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute
* one branch when needed, making this function more expensive.
*/
function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/access-control.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ There is an additional feature built on top of `AccessControl`: giving the execu

At this point, with both a proposer and an executor assigned, the timelock can perform operations.

An optional next step is for the deployer to renounce its administrative privileges and leave the timelock self-administered. If the deployer decides to do so, all further maintenance, including assigning new proposers/schedulers or changing the timelock duration will have to follow the timelock workflow. This links the governance of the timelock to the governance of contracts attached to the timelock, and enforce a delay on timelock maintenance operations.
An optional next step is for the deployer to renounce its administrative privileges and leave the timelock self-administered. If the deployer decides to do so, all further maintenance, including assigning new proposers/schedulers or changing the timelock duration will have to follow the timelock workflow. This links the governance of the timelock to the governance of contracts attached to the timelock, and enforces a delay on timelock maintenance operations.

WARNING: If the deployer renounces administrative rights in favour of timelock itself, assigning new proposers or executors will require a timelocked operation. This means that if the accounts in charge of any of these two roles become unavailable, then the entire contract (and any contract it controls) becomes locked indefinitely.

Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/account-abstraction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ struct PackedUserOperation {

This process of bundling user operations involves several costs that the bundler must cover, including base transaction fees, calldata serialization, entrypoint execution, and paymaster context costs. To compensate for these expenses, bundlers use the `preVerificationGas` and `gasFees` fields to charge users appropriately.

NOTE: Estimating `preVerificationGas` is not standardized as it varies based on network conditions such as gas prices and the size of the operation bundle.
NOTE: Estimating `preVerificationGas` is not standardized as it varies based on factors like calldata size, signature complexity, and bundler-specific serialization costs.

TIP: Use xref:api:account.adoc#ERC4337Utils[`ERC4337Utils`] to manipulate the `UserOperation` struct and other ERC-4337 related values.

=== Entrypoint

Each `UserOperation` is executed through a contract known as the https://etherscan.io/address/0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108#code[`EntryPoint`]. This contract is a singleton deployed across multiple networks at the same address although other custom implementations may be used.

The Entrypoint contracts is considered a trusted entity by the account.
The Entrypoint contract is considered a trusted entity by the account.

=== Bundlers

Expand Down Expand Up @@ -83,7 +83,7 @@ To build your own factory, see xref:accounts.adoc#accounts_factory[account facto

=== Paymaster Contract

A Paymaster is an optional entity that can sponsor gas fees for Accounts, or allow them to pay for those fees in ERC-20 instead of native currency. This abstracts gas away of the user experience in the same way that computational costs of cloud servers are abstracted away from end-users.
A Paymaster is an optional entity that can sponsor gas fees for Accounts, or allow them to pay for those fees in ERC-20 instead of native currency. This abstracts gas away from the user experience in the same way that computational costs of cloud servers are abstracted away from end-users.

To build your own paymaster, see https://docs.openzeppelin.com/community-contracts/0.0.1/paymasters[paymasters].

Expand All @@ -95,6 +95,6 @@ To process a bundle of `UserOperations`, bundlers call xref:api:account.adoc#Acc

These rules outline the requirements for operations to be processed by the canonical mempool.

Accounts can access its own storage during the validation phase, they might easily violate ERC-7562 storage access rules in undirect ways. For example, most accounts access their public keys from storage when validating a signature, limiting the ability of having accounts that validate operations for other accounts (e.g. via ERC-1271)
Accounts can access their own storage during the validation phase, they might easily violate ERC-7562 storage access rules in indirect ways. For example, most accounts access their public keys from storage when validating a signature, limiting the ability of having accounts that validate operations for other accounts (e.g. via https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]))

TIP: Although any Account that breaks such rules may still be processed by a private bundler, developers should keep in mind the centralization tradeoffs of relying on private infrastructure instead of _permissionless_ execution.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/utilities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Some use cases require more powerful data structures than arrays and mappings of
- xref:api:utils.adoc#EnumerableSet[`EnumerableSet`]: A https://en.wikipedia.org/wiki/Set_(abstract_data_type)[set] with enumeration capabilities.
- xref:api:utils.adoc#EnumerableMap[`EnumerableMap`]: A `mapping` variant with enumeration capabilities.
- xref:api:utils.adoc#MerkleTree[`MerkleTree`]: An on-chain https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] with helper functions.
- xref:api:utils.adoc#Heap.sol[`Heap`]: A https://en.wikipedia.org/wiki/Binary_heap[binary heap] to store elements with priority defined by a compartor function.
- xref:api:utils.adoc#Heap.sol[`Heap`]: A https://en.wikipedia.org/wiki/Binary_heap[binary heap] to store elements with priority defined by a comparator function.

The `Enumerable*` structures are similar to mappings in that they store and remove elements in constant time and don't allow for repeated entries, but they also support _enumeration_, which means you can easily query all stored entries both on and off-chain.

Expand Down
2 changes: 1 addition & 1 deletion scripts/generate/templates/SlotDerivation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pragma solidity ^0.8.20;
* contract Example {
* // Add the library methods
* using StorageSlot for bytes32;
* using SlotDerivation for bytes32;
* using SlotDerivation for *;
*
* // Declare a namespace
* string private constant _NAMESPACE = "<namespace>"; // eg. OpenZeppelin.Slot
Expand Down
4 changes: 2 additions & 2 deletions test/governance/TimelockController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ describe('TimelockController', function () {
reentrantOperation.predecessor,
reentrantOperation.salt,
]);
await reentrant.enableRentrancy(this.mock, data);
await reentrant.enableReentrancy(this.mock, data);

// Expect to fail
await expect(
Expand Down Expand Up @@ -811,7 +811,7 @@ describe('TimelockController', function () {
reentrantBatchOperation.predecessor,
reentrantBatchOperation.salt,
]);
await reentrant.enableRentrancy(this.mock, data);
await reentrant.enableReentrancy(this.mock, data);

// Expect to fail
await expect(
Expand Down