Skip to content

Commit

Permalink
Merge branch 'typo-fixes' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx authored Feb 14, 2025
2 parents 64fc8f8 + 64954d8 commit 17a379d
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .changeset/brown-turkeys-marry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'openzeppelin-solidity': minor
---

`ER6909TokenSupply`: Add an extension of ERC6909 which tracks total supply for each token id.
`ERC6909TokenSupply`: Add an extension of ERC6909 which tracks total supply for each token id.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: npm run test:inheritance
- name: Check pragma consistency between files
run: npm run test:pragma
- name: Check proceduraly generated contracts are up-to-date
- name: Check procedurally generated contracts are up-to-date
run: npm run test:generation
- name: Compare gas costs
uses: ./.github/actions/gas-compare
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Releasing

OpenZeppelin Contracts uses a fully automated release process that takes care of compiling, packaging, and publishing the library, all of which is carried out in a clean CI environment (GitHub Actions), implemented in the ([`release-cycle`](.github/workflows/release-cycle.yml)) workflow. This helps to reduce the potential for human error and inconsistencies, and ensures that the release process is ongoing and reliable.
OpenZeppelin Contracts uses a fully automated release process that takes care of compiling, packaging, and publishing the library, all of which is carried out in a clean CI environment (GitHub Actions), implemented in the [`release-cycle`](.github/workflows/release-cycle.yml) workflow. This helps to reduce the potential for human error and inconsistencies, and ensures that the release process is ongoing and reliable.

## Changesets

Expand Down
6 changes: 3 additions & 3 deletions audits/2017-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The git commit hash we evaluated is:

# Disclaimer

The audit makes no statements or warrantees about utility of the code, safety of the code, suitability of the business model, regulatory regime for the business model, or any other statements about fitness of the contracts to purpose, or their bug free status. The audit documentation is for discussion purposes only.
The audit makes no statements or warranties about utility of the code, safety of the code, suitability of the business model, regulatory regime for the business model, or any other statements about fitness of the contracts to purpose, or their bug free status. The audit documentation is for discussion purposes only.

# Executive Summary

Expand Down Expand Up @@ -109,7 +109,7 @@ It would be nice to see how many payments are pending. This would imply a bit of

## Shareable Contract

We do not believe the `Shareable.sol` contract is ready for primetime. It is missing functions, and as written may be vulnerable to a reordering attack -- an attack in which a miner or other party "racing" with a smart contract participant inserts their own information into a list or mapping.
We do not believe the `Shareable.sol` contract is ready for prime time. It is missing functions, and as written may be vulnerable to a reordering attack -- an attack in which a miner or other party "racing" with a smart contract participant inserts their own information into a list or mapping.

The confirmation and revocation code needs to be looked over with a very careful eye imagining extraordinarily bad behavior by shared owners before this contract can be called safe.

Expand Down Expand Up @@ -159,7 +159,7 @@ Allows owner to set a public string of contract information. No issues.

This needs some work. Doesn't check if `_required <= len(_owners)` for instance, that would be a bummer. What if _required were like `MAX - 1`?

I have a general concern about the difference between `owners`, `_owners`, and `owner` in `Ownable.sol`. I recommend "Owners" be renamed. In general we do not recomment single character differences in variable names, although a preceding underscore is not uncommon in Solidity code.
I have a general concern about the difference between `owners`, `_owners`, and `owner` in `Ownable.sol`. I recommend "Owners" be renamed. In general we do not recommend single character differences in variable names, although a preceding underscore is not uncommon in Solidity code.

Line 34: "this contract only has six types of events"...actually only two.

Expand Down
2 changes: 1 addition & 1 deletion contracts/access/IAccessControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface IAccessControl {
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
* {RoleAdminChanged} not being emitted to signal this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/extensions/GovernorTimelockAccess.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {Time} from "../../utils/types/Time.sol";
*
* ==== Security Considerations
*
* Some operations may be cancelable in the `AccessManager` by the admin or a set of guardians, depending on the
* Some operations may be cancellable in the `AccessManager` by the admin or a set of guardians, depending on the
* restricted function being invoked. Since proposals are atomic, the cancellation by a guardian of a single operation
* in a proposal will cause all of the proposal to become unable to execute. Consider proposing cancellable operations
* separately.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
* the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
* inaccessible from a proposal, unless executed via {Governor-relay}.
*
* WARNING: Setting up the TimelockController to have additional proposers or cancellers besides the governor is very
* WARNING: Setting up the TimelockController to have additional proposers or cancelers besides the governor is very
* risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing
* operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance
* proposals that have been approved by the voters, effectively executing a Denial of Service attack.
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC4626.sol
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ interface IERC4626 is IERC20, IERC20Metadata {
function maxRedeem(address owner) external view returns (uint256 maxShares);

/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
* @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
Expand Down
6 changes: 3 additions & 3 deletions contracts/proxy/Clones.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ library Clones {
error CloneArgumentsTooLong();

/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
* @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.
*
* This function uses the create opcode, which should never revert.
*/
Expand Down Expand Up @@ -54,7 +54,7 @@ library Clones {
}

/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
* @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`.
*
* 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
Expand Down Expand Up @@ -158,7 +158,7 @@ library Clones {
}

/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation` with custom
* @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom
* immutable arguments. These are provided through `args` and cannot be changed after deployment. To
* access the arguments within the implementation, use {fetchCloneArgs}.
*
Expand Down
2 changes: 1 addition & 1 deletion contracts/proxy/utils/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ abstract contract Initializable {
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// - construction: the contract is initialized at version 1 (no reinitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/ERC20/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
}

/**
* @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
* @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
Expand Down Expand Up @@ -291,7 +291,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
}

/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
* @dev Updates `owner`'s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract contract ERC20TemporaryApproval is ERC20, IERC7674 {
}

/**
* @dev Sets `value` as the temporary allowance of `spender` over the `owner` s tokens.
* @dev Sets `value` as the temporary allowance of `spender` over the `owner`'s tokens.
*
* This internal function is equivalent to `temporaryApprove`, and can be used to e.g. set automatic allowances
* for certain subsystems, etc.
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/ERC6909/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/

This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-6909[ERC-6909 Minimal Multi-Token Interface].

The ERC consists of four interfaces which fulfill different roles--the interfaces are as follows:
The ERC consists of four interfaces which fulfill different roles - the interfaces are as follows:

. {IERC6909}: Base interface for a vanilla ERC6909 token.
. {IERC6909ContentURI}: Extends the base interface and adds content URI (contract and token level) functionality.
Expand All @@ -24,4 +24,4 @@ Implementations are provided for each of the 4 interfaces defined in the ERC.

{{ERC6909Metadata}}

{{ERC6909TokenSupply}}
{{ERC6909TokenSupply}}
2 changes: 1 addition & 1 deletion contracts/utils/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Miscellaneous contracts and libraries containing utility functions you can use t
* {ReentrancyGuardTransient}: Variant of {ReentrancyGuard} that uses transient storage (https://eips.ethereum.org/EIPS/eip-1153[EIP-1153]).
* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending.
* {Nonces}: Utility for tracking and verifying address nonces that only increment.
* {NoncesKeyed}: Alternative to {Nonces}, that support key-ed nonces following https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337 speciciations].
* {NoncesKeyed}: Alternative to {Nonces}, that support key-ed nonces following https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337 specifications].
* {ERC165}, {ERC165Checker}: Utilities for inspecting interfaces supported by contracts.
* {BitMaps}: A simple library to manage boolean value mapped to a numerical index in an efficient way.
* {EnumerableMap}: A type like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`], but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`).
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/SlotDerivation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pragma solidity ^0.8.20;
* using SlotDerivation for bytes32;
*
* // Declare a namespace
* string private constant _NAMESPACE = "<namespace>" // eg. OpenZeppelin.Slot
* string private constant _NAMESPACE = "<namespace>"; // eg. OpenZeppelin.Slot
*
* function setValueInNamespace(uint256 key, address newValue) internal {
* _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
Expand Down
6 changes: 3 additions & 3 deletions contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library Math {
}

/**
* @dev Returns the addition of two unsigned integers, with an success flag (no overflow).
* @dev Returns the addition of two unsigned integers, with a success flag (no overflow).
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
Expand All @@ -29,7 +29,7 @@ library Math {
}

/**
* @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow).
* @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
Expand All @@ -39,7 +39,7 @@ library Math {
}

/**
* @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow).
* @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
Expand Down
6 changes: 3 additions & 3 deletions contracts/utils/structs/Checkpoints.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ library Checkpoints {
}

/**
* @dev Returns the number of checkpoint.
* @dev Returns the number of checkpoints.
*/
function length(Trace224 storage self) internal view returns (uint256) {
return self._checkpoints.length;
Expand Down Expand Up @@ -317,7 +317,7 @@ library Checkpoints {
}

/**
* @dev Returns the number of checkpoint.
* @dev Returns the number of checkpoints.
*/
function length(Trace208 storage self) internal view returns (uint256) {
return self._checkpoints.length;
Expand Down Expand Up @@ -520,7 +520,7 @@ library Checkpoints {
}

/**
* @dev Returns the number of checkpoint.
* @dev Returns the number of checkpoints.
*/
function length(Trace160 storage self) internal view returns (uint256) {
return self._checkpoints.length;
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/structs/CircularBuffer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ library CircularBuffer {
}

/**
* @dev Initialize a new CircularBuffer of given size.
* @dev Initialize a new CircularBuffer of a given size.
*
* If the CircularBuffer was already setup and used, calling that function again will reset it to a blank state.
*
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 @@ -20,7 +20,7 @@ pragma solidity ^0.8.20;
* using SlotDerivation for bytes32;
*
* // Declare a namespace
* string private constant _NAMESPACE = "<namespace>" // eg. OpenZeppelin.Slot
* string private constant _NAMESPACE = "<namespace>"; // eg. OpenZeppelin.Slot
*
* function setValueInNamespace(uint256 key, address newValue) internal {
* _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
Expand Down
2 changes: 1 addition & 1 deletion test/account/utils/draft-ERC7579Utils.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ contract SampleAccount is IAccount, Ownable {
// builtin decoder for the `execute` function.

// This is where the vulnerability from ExecutionLib results in a different result between validation
// andexecution.
// and execution.

emit Log(true, executionCalldata.decodeBatch());
}
Expand Down
2 changes: 1 addition & 1 deletion test/metatx/ERC2771Context.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('ERC2771Context', function () {
const nonce = await this.forwarder.nonces(this.sender);
const data = this.context.interface.encodeFunctionData('multicall', [
[
// poisonned call to 'msgSender()'
// poisoned call to 'msgSender()'
ethers.concat([this.context.interface.encodeFunctionData('msgSender'), this.other.address]),
],
]);
Expand Down
2 changes: 1 addition & 1 deletion test/proxy/beacon/BeaconProxy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('BeaconProxy', function () {
it('non-compliant beacon', async function () {
const badBeacon = await ethers.deployContract('BadBeaconNoImpl');

// BadBeaconNoImpl does not provide `implementation()` has no fallback.
// BadBeaconNoImpl does not provide `implementation()` and has no fallback.
// This causes ERC1967Utils._setBeacon to revert.
await expect(this.newBeaconProxy(badBeacon, '0x')).to.be.revertedWithoutReason();
});
Expand Down
4 changes: 2 additions & 2 deletions test/token/ERC20/extensions/ERC20Wrapper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('ERC20Wrapper', function () {
.withArgs(this.token, 0, initialSupply);
});

it('reverts when inssuficient balance', async function () {
it('reverts when insufficient balance', async function () {
await this.underlying.connect(this.holder).approve(this.token, ethers.MaxUint256);

await expect(this.token.connect(this.holder).depositFor(this.holder, ethers.MaxUint256))
Expand Down Expand Up @@ -117,7 +117,7 @@ describe('ERC20Wrapper', function () {
await this.token.connect(this.holder).depositFor(this.holder, initialSupply);
});

it('reverts when inssuficient balance', async function () {
it('reverts when insufficient balance', async function () {
await expect(this.token.connect(this.holder).withdrawTo(this.holder, ethers.MaxInt256))
.to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance')
.withArgs(this.holder, initialSupply, ethers.MaxInt256);
Expand Down

0 comments on commit 17a379d

Please sign in to comment.