diff --git a/.changeset/brown-turkeys-marry.md b/.changeset/brown-turkeys-marry.md index 0440f0d94..e44826d7c 100644 --- a/.changeset/brown-turkeys-marry.md +++ b/.changeset/brown-turkeys-marry.md @@ -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. diff --git a/.github/actions/gas-compare/action.yml b/.github/actions/gas-compare/action.yml index e764ad5d7..78c286c94 100644 --- a/.github/actions/gas-compare/action.yml +++ b/.github/actions/gas-compare/action.yml @@ -2,18 +2,18 @@ name: Compare gas costs description: Compare gas costs between branches inputs: token: - description: github token + description: GitHub token, required to access GitHub API required: true report: - description: report to read from + description: Path to the report to compare required: false default: gasReporterOutput.json out_report: - description: report to read + description: Path to save the output report required: false default: ${{ github.ref_name }}.gasreport.json ref_report: - description: report to read from + description: Path to the reference report for comparison required: false default: ${{ github.base_ref }}.gasreport.json diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a4eea0a2b..6700832b6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index bae9cb6c9..3704b4ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -427,7 +427,7 @@ Instead, contracts now revert with custom errors. Systems that interact with sma ##### Relying on storage locations for retrieving data -After 5.0, the storage location of some variables were changed. This is the case for `Initializable` and all the upgradeable contracts since they now use namespaced storaged locations. Any system relying on storage locations for retrieving data or detecting capabilities should be updated to support these new locations. +After 5.0, the storage location of some variables was changed. This is the case for `Initializable` and all the upgradeable contracts since they now use namespaced storage locations. Any system relying on storage locations for retrieving data or detecting capabilities should be updated to support these new locations. ## 4.9.6 (2024-02-29) diff --git a/GUIDELINES.md b/GUIDELINES.md index 2c21e956b..deafed005 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -6,7 +6,7 @@ Code must be thoroughly tested with quality unit tests. We defer to the [Moloch Testing Guide](https://github.com/MolochVentures/moloch/tree/master/test#readme) for specific recommendations, though not all of it is relevant here. Note the introduction: -> Tests should be written, not only to verify correctness of the target code, but to be comprehensively reviewed by other programmers. Therefore, for mission critical Solidity code, the quality of the tests are just as important (if not more so) than the code itself, and should be written with the highest standards of clarity and elegance. +> Tests should be written, not only to verify correctness of the target code, but to be comprehensively reviewed by other programmers. Therefore, for mission critical Solidity code, the quality of the tests is just as important (if not more so) than the code itself, and should be written to the highest standards of clarity and elegance. Every addition or change to the code must come with relevant and comprehensive tests. diff --git a/RELEASING.md b/RELEASING.md index bc2b2d500..6820d403d 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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 consistent and reliable. ## Changesets diff --git a/audits/2017-03.md b/audits/2017-03.md index e2f6cc172..d54174ecb 100644 --- a/audits/2017-03.md +++ b/audits/2017-03.md @@ -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 @@ -90,7 +90,7 @@ We are still working through the confirmation protocol in `Shareable.sol`, but w This bug has a number of causes that need to be addressed: 1. `resetSpentToday` and `confirm` together do not limit the days on which the function can be called or (it appears) the number of times it can be called. -1. Once a call has been confirmed and `execute`d it appears that it can be re-executed. This is not good. +1. Once a call has been confirmed and executed it appears that it can be re-executed. This is not good. 3. `confirmandCheck` doesn't seem to have logic about whether or not the function in question has been called. 4. Even if it did, `revoke` would need updates and logic to deal with revocation requests after a function call had been completed. @@ -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. @@ -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. @@ -224,7 +224,7 @@ Transfer() and transferFrom() use SafeMath functions, which will cause them to t ### SimpleToken -Sample instantiation of StandardToken. Note that in this sample, decimals is 18 and supply only 10,000, so the supply is a small fraction of a single nominal token. +Sample instantiation of StandardToken. Note that in this sample, decimals is 18 and supply is only 10,000, so the supply is a small fraction of a single nominal token. ### CrowdsaleToken diff --git a/contracts/access/IAccessControl.sol b/contracts/access/IAccessControl.sol index 4c16a6ef7..df3e7e747 100644 --- a/contracts/access/IAccessControl.sol +++ b/contracts/access/IAccessControl.sol @@ -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); diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index ba0953d16..56bd77ab3 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -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. diff --git a/contracts/interfaces/IERC4626.sol b/contracts/interfaces/IERC4626.sol index 8ebadd72f..59b37715d 100644 --- a/contracts/interfaces/IERC4626.sol +++ b/contracts/interfaces/IERC4626.sol @@ -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 diff --git a/contracts/proxy/Clones.sol b/contracts/proxy/Clones.sol index 6b8d9cc6f..4050e2cc9 100644 --- a/contracts/proxy/Clones.sol +++ b/contracts/proxy/Clones.sol @@ -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. */ @@ -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 @@ -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}. * diff --git a/contracts/proxy/utils/Initializable.sol b/contracts/proxy/utils/Initializable.sol index 3c1b7bfa8..c69e3ec97 100644 --- a/contracts/proxy/utils/Initializable.sol +++ b/contracts/proxy/utils/Initializable.sol @@ -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; diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 471908d6c..521f72e83 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -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. @@ -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. diff --git a/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol b/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol index d30521b49..0d1b35723 100644 --- a/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol +++ b/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol @@ -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. diff --git a/contracts/token/ERC6909/README.adoc b/contracts/token/ERC6909/README.adoc index 3fc9e1e52..17d116cc4 100644 --- a/contracts/token/ERC6909/README.adoc +++ b/contracts/token/ERC6909/README.adoc @@ -24,4 +24,4 @@ Implementations are provided for each of the 4 interfaces defined in the ERC. {{ERC6909Metadata}} -{{ERC6909TokenSupply}} \ No newline at end of file +{{ERC6909TokenSupply}} diff --git a/contracts/utils/README.adoc b/contracts/utils/README.adoc index d841de5e3..5151b4616 100644 --- a/contracts/utils/README.adoc +++ b/contracts/utils/README.adoc @@ -18,12 +18,12 @@ 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 keyed 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`). * {EnumerableSet}: Like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc. - * {DoubleEndedQueue}: An implementation of a https://en.wikipedia.org/wiki/Double-ended_queue[double ended queue] whose values can be removed added or remove from both sides. Useful for FIFO and LIFO structures. + * {DoubleEndedQueue}: An implementation of a https://en.wikipedia.org/wiki/Double-ended_queue[double ended queue] whose values can be added or removed from both sides. Useful for FIFO and LIFO structures. * {CircularBuffer}: A data structure to store the last N values pushed to it. * {Checkpoints}: A data structure to store values mapped to a strictly increasing key. Can be used for storing and accessing values over time. * {Heap}: A library that implements a https://en.wikipedia.org/wiki/Binary_heap[binary heap] in storage. diff --git a/contracts/utils/SlotDerivation.sol b/contracts/utils/SlotDerivation.sol index 62d1545c6..3507639e4 100644 --- a/contracts/utils/SlotDerivation.sol +++ b/contracts/utils/SlotDerivation.sol @@ -19,7 +19,7 @@ pragma solidity ^0.8.20; * using SlotDerivation for bytes32; * * // Declare a namespace - * string private constant _NAMESPACE = "" // eg. OpenZeppelin.Slot + * string private constant _NAMESPACE = ""; // eg. OpenZeppelin.Slot * * function setValueInNamespace(uint256 key, address newValue) internal { * _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue; diff --git a/contracts/utils/TransientSlot.sol b/contracts/utils/TransientSlot.sol index 25c57dd3f..eabd718cb 100644 --- a/contracts/utils/TransientSlot.sol +++ b/contracts/utils/TransientSlot.sol @@ -32,7 +32,7 @@ pragma solidity ^0.8.24; */ library TransientSlot { /** - * @dev UDVT that represent a slot holding a address. + * @dev UDVT that represents a slot holding a address. */ type AddressSlot is bytes32; @@ -44,7 +44,7 @@ library TransientSlot { } /** - * @dev UDVT that represent a slot holding a bool. + * @dev UDVT that represents a slot holding a bool. */ type BooleanSlot is bytes32; @@ -56,7 +56,7 @@ library TransientSlot { } /** - * @dev UDVT that represent a slot holding a bytes32. + * @dev UDVT that represents a slot holding a bytes32. */ type Bytes32Slot is bytes32; @@ -68,7 +68,7 @@ library TransientSlot { } /** - * @dev UDVT that represent a slot holding a uint256. + * @dev UDVT that represents a slot holding a uint256. */ type Uint256Slot is bytes32; @@ -80,7 +80,7 @@ library TransientSlot { } /** - * @dev UDVT that represent a slot holding a int256. + * @dev UDVT that represents a slot holding a int256. */ type Int256Slot is bytes32; diff --git a/contracts/utils/math/Math.sol b/contracts/utils/math/Math.sol index 46fb66562..765549785 100644 --- a/contracts/utils/math/Math.sol +++ b/contracts/utils/math/Math.sol @@ -46,7 +46,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 { @@ -57,7 +57,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 { @@ -68,7 +68,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 { diff --git a/contracts/utils/structs/Checkpoints.sol b/contracts/utils/structs/Checkpoints.sol index 8d8f13031..5250c8385 100644 --- a/contracts/utils/structs/Checkpoints.sol +++ b/contracts/utils/structs/Checkpoints.sol @@ -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; @@ -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; @@ -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; diff --git a/contracts/utils/structs/CircularBuffer.sol b/contracts/utils/structs/CircularBuffer.sol index ae0a4a88f..0799dd175 100644 --- a/contracts/utils/structs/CircularBuffer.sol +++ b/contracts/utils/structs/CircularBuffer.sol @@ -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. * diff --git a/scripts/generate/templates/Checkpoints.js b/scripts/generate/templates/Checkpoints.js index 7ec4a7253..eb0f5c8f3 100644 --- a/scripts/generate/templates/Checkpoints.js +++ b/scripts/generate/templates/Checkpoints.js @@ -119,7 +119,7 @@ function latestCheckpoint(${opts.historyTypeName} storage self) internal view re } /** - * @dev Returns the number of checkpoint. + * @dev Returns the number of checkpoints. */ function length(${opts.historyTypeName} storage self) internal view returns (uint256) { return self.${opts.checkpointFieldName}.length; diff --git a/scripts/generate/templates/Checkpoints.t.js b/scripts/generate/templates/Checkpoints.t.js index 8e178adfa..77a9cd31a 100644 --- a/scripts/generate/templates/Checkpoints.t.js +++ b/scripts/generate/templates/Checkpoints.t.js @@ -14,7 +14,7 @@ import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol const template = opts => `\ using Checkpoints for Checkpoints.${opts.historyTypeName}; -// Maximum gap between keys used during the fuzzing tests: the \`_prepareKeys\` function with make sure that +// Maximum gap between keys used during the fuzzing tests: the \`_prepareKeys\` function will make sure that // key#n+1 is in the [key#n, key#n + _KEY_MAX_GAP] range. uint8 internal constant _KEY_MAX_GAP = 64; diff --git a/scripts/generate/templates/SlotDerivation.js b/scripts/generate/templates/SlotDerivation.js index ec4d244b9..a00e98167 100644 --- a/scripts/generate/templates/SlotDerivation.js +++ b/scripts/generate/templates/SlotDerivation.js @@ -20,7 +20,7 @@ pragma solidity ^0.8.20; * using SlotDerivation for bytes32; * * // Declare a namespace - * string private constant _NAMESPACE = "" // eg. OpenZeppelin.Slot + * string private constant _NAMESPACE = ""; // eg. OpenZeppelin.Slot * * function setValueInNamespace(uint256 key, address newValue) internal { * _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue; diff --git a/scripts/generate/templates/TransientSlot.js b/scripts/generate/templates/TransientSlot.js index 8e291bc13..197587922 100644 --- a/scripts/generate/templates/TransientSlot.js +++ b/scripts/generate/templates/TransientSlot.js @@ -34,7 +34,7 @@ pragma solidity ^0.8.24; const udvt = ({ type, name }) => `\ /** - * @dev UDVT that represent a slot holding a ${type}. + * @dev UDVT that represents a slot holding a ${type}. */ type ${name}Slot is bytes32; diff --git a/scripts/release/format-changelog.js b/scripts/release/format-changelog.js index b8bcc8c71..c96dc924a 100755 --- a/scripts/release/format-changelog.js +++ b/scripts/release/format-changelog.js @@ -27,7 +27,7 @@ const formatted = changelog .replace(RELEASE_LINE_REGEX, (_, pr, entry) => (pr ? `- ${entry} (${pr})` : `- ${entry}`)) // Add date to new version .replace(VERSION_TITLE_REGEX, `\n## $1 (${new Date().toISOString().split('T')[0]})`) - // Conditionally allow vX.Y.Z.rc-.W sections only in prerelease + // Conditionally allow vX.Y.Z-rc.W sections only in prerelease .replace(/^## \d\.\d\.\d-rc\S+[^]+?(?=^#)/gm, section => (isPrerelease ? section : '')); fs.writeFileSync('CHANGELOG.md', formatted); diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index b7ae2a950..c596e6a2e 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -21,7 +21,7 @@ function shouldBehaveLikeAccessControl() { expect(await this.mock.hasRole(DEFAULT_ADMIN_ROLE, this.defaultAdmin)).to.be.true; }); - it("other roles's admin is the default admin role", async function () { + it("other role's admin is the default admin role", async function () { expect(await this.mock.getRoleAdmin(ROLE)).to.equal(DEFAULT_ADMIN_ROLE); }); diff --git a/test/account/utils/draft-ERC7579Utils.t.sol b/test/account/utils/draft-ERC7579Utils.t.sol index ea5890943..dfeb21765 100644 --- a/test/account/utils/draft-ERC7579Utils.t.sol +++ b/test/account/utils/draft-ERC7579Utils.t.sol @@ -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()); } diff --git a/test/metatx/ERC2771Context.test.js b/test/metatx/ERC2771Context.test.js index 93354d0fc..ce139961c 100644 --- a/test/metatx/ERC2771Context.test.js +++ b/test/metatx/ERC2771Context.test.js @@ -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]), ], ]); diff --git a/test/proxy/beacon/BeaconProxy.test.js b/test/proxy/beacon/BeaconProxy.test.js index 0a0878446..d64023bbc 100644 --- a/test/proxy/beacon/BeaconProxy.test.js +++ b/test/proxy/beacon/BeaconProxy.test.js @@ -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(); }); diff --git a/test/token/ERC20/extensions/ERC20Wrapper.test.js b/test/token/ERC20/extensions/ERC20Wrapper.test.js index 9e72e1a92..2f630e638 100644 --- a/test/token/ERC20/extensions/ERC20Wrapper.test.js +++ b/test/token/ERC20/extensions/ERC20Wrapper.test.js @@ -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)) @@ -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); diff --git a/test/token/ERC6909/ERC6909.behavior.js b/test/token/ERC6909/ERC6909.behavior.js index 0d13665a2..adfe15a32 100644 --- a/test/token/ERC6909/ERC6909.behavior.js +++ b/test/token/ERC6909/ERC6909.behavior.js @@ -37,7 +37,7 @@ function shouldBehaveLikeERC6909() { }); describe('setOperator', function () { - it('emits an an OperatorSet event and updated the value', async function () { + it('emits an OperatorSet event and updated the value', async function () { await expect(this.token.connect(this.holder).setOperator(this.operator, true)) .to.emit(this.token, 'OperatorSet') .withArgs(this.holder, this.operator, true); diff --git a/test/token/ERC6909/extensions/ERC6909ContentURI.test.js b/test/token/ERC6909/extensions/ERC6909ContentURI.test.js index 3597eb78e..2a54e2216 100644 --- a/test/token/ERC6909/extensions/ERC6909ContentURI.test.js +++ b/test/token/ERC6909/extensions/ERC6909ContentURI.test.js @@ -13,7 +13,7 @@ describe('ERC6909ContentURI', function () { }); describe('contractURI', function () { - it('is empty string be default', async function () { + it('is empty string by default', async function () { await expect(this.token.contractURI()).to.eventually.equal(''); }); @@ -28,7 +28,7 @@ describe('ERC6909ContentURI', function () { }); describe('tokenURI', function () { - it('is empty string be default', async function () { + it('is empty string by default', async function () { await expect(this.token.tokenURI(1n)).to.eventually.equal(''); }); diff --git a/test/utils/structs/Checkpoints.t.sol b/test/utils/structs/Checkpoints.t.sol index 548a9d47c..74d8fb8b8 100644 --- a/test/utils/structs/Checkpoints.t.sol +++ b/test/utils/structs/Checkpoints.t.sol @@ -10,7 +10,7 @@ import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol contract CheckpointsTrace224Test is Test { using Checkpoints for Checkpoints.Trace224; - // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function with make sure that + // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function will make sure that // key#n+1 is in the [key#n, key#n + _KEY_MAX_GAP] range. uint8 internal constant _KEY_MAX_GAP = 64; @@ -118,7 +118,7 @@ contract CheckpointsTrace224Test is Test { contract CheckpointsTrace208Test is Test { using Checkpoints for Checkpoints.Trace208; - // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function with make sure that + // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function will make sure that // key#n+1 is in the [key#n, key#n + _KEY_MAX_GAP] range. uint8 internal constant _KEY_MAX_GAP = 64; @@ -226,7 +226,7 @@ contract CheckpointsTrace208Test is Test { contract CheckpointsTrace160Test is Test { using Checkpoints for Checkpoints.Trace160; - // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function with make sure that + // Maximum gap between keys used during the fuzzing tests: the `_prepareKeys` function will make sure that // key#n+1 is in the [key#n, key#n + _KEY_MAX_GAP] range. uint8 internal constant _KEY_MAX_GAP = 64;