Skip to content

Commit 840d9a8

Browse files
authored
Merge branch 'typo-fixes' into fix/natspec-would-deploy-create3
2 parents e32bb93 + 781805e commit 840d9a8

39 files changed

Lines changed: 72 additions & 64 deletions

contracts/access/AccessControl.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 {
143143
* purpose is to provide a mechanism for accounts to lose their privileges
144144
* if they are compromised (such as when a trusted device is misplaced).
145145
*
146-
* If the calling account had been revoked `role`, emits a {RoleRevoked}
147-
* event.
146+
* Emits a {RoleRevoked} event if the calling account had `role` and this call successfully revoked it.
148147
*
149148
* Requirements:
150149
*

contracts/access/manager/AccessManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ contract AccessManager is Context, Multicall, IAccessManager {
329329
* Emits a {RoleAdminChanged} event.
330330
*
331331
* NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow
332-
* anyone to set grant or revoke such role.
332+
* anyone to grant or revoke such role.
333333
*/
334334
function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual {
335335
if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {

contracts/account/Account.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {LowLevelCall} from "../utils/LowLevelCall.sol";
1515
* Developers must implement the {AbstractSigner-_rawSignatureValidation} function to define the account's validation logic.
1616
*
1717
* NOTE: This core account doesn't include any mechanism for performing arbitrary external calls. This is an essential
18-
* feature that all Account should have. We leave it up to the developers to implement the mechanism of their choice.
18+
* feature that all Accounts should have. We leave it up to the developers to implement the mechanism of their choice.
1919
* Common choices include ERC-6900, ERC-7579 and ERC-7821 (among others).
2020
*
2121
* IMPORTANT: Implementing a mechanism to validate signatures is a security-sensitive operation as it may allow an
@@ -104,7 +104,7 @@ abstract contract Account is AbstractSigner, IAccount {
104104
}
105105

106106
/**
107-
* @dev Virtual function that returns the signable hash for a user operations. Since v0.8.0 of the entrypoint,
107+
* @dev Virtual function that returns the signable hash for a user operation. Since v0.8.0 of the entrypoint,
108108
* `userOpHash` is an EIP-712 hash that can be signed directly.
109109
*/
110110
function _signableUserOpHash(

contracts/account/utils/draft-ERC4337Utils.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ library ERC4337Utils {
175175
//
176176
// Prior to v0.8.0, this was easy to replicate for any entrypoint and chainId. Since v0.8.0 of the
177177
// entrypoint, this depends on the Entrypoint's domain separator, which cannot be hardcoded and is complex
178-
// to recompute. Domain separator could be fetch using the `getDomainSeparatorV4` getter, or recomputed from
178+
// to recompute. Domain separator could be fetched using the `getDomainSeparatorV4` getter, or recomputed from
179179
// the ERC-5267 getter, but both operation would require doing a view call to the entrypoint. Overall it feels
180180
// simpler and less error prone to get that functionality from the entrypoint directly.
181181
return IEntryPointExtra(entrypoint).getUserOpHash(self);

contracts/crosschain/ERC7786Recipient.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {IERC7786Recipient} from "../interfaces/draft-IERC7786.sol";
1212
* destination gateways. This contract leaves two functions unimplemented:
1313
*
1414
* * {_isAuthorizedGateway}, an internal getter used to verify whether an address is recognised by the contract as a
15-
* valid ERC-7786 destination gateway. One or multiple gateway can be supported. Note that any malicious address for
15+
* valid ERC-7786 destination gateway. One or multiple gateways can be supported. Note that any malicious address for
1616
* which this function returns true would be able to impersonate any account on any other chain sending any message.
1717
*
1818
* * {_processMessage}, the internal function that will be called with any message that has been validated.

contracts/crosschain/bridges/abstract/BridgeMultiToken.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {CrosschainLinked} from "../../CrosschainLinked.sol";
1717
* This base contract is used by the {BridgeERC1155}, which interfaces with legacy ERC-1155 tokens. It is also used by
1818
* the {ERC1155Crosschain} extension, which embeds the bridge logic directly in the token contract.
1919
*
20-
* This base contract implements the crosschain transfer operation though internal functions. It is for the the "child
21-
* contracts" that inherit from this to implement the external interfaces and make this functions accessible.
20+
* This base contract implements the crosschain transfer operation through internal functions. It is for the "child
21+
* contracts" that inherit from this to implement the external interfaces and make these functions accessible.
2222
*/
2323
abstract contract BridgeMultiToken is Context, CrosschainLinked {
2424
using InteroperableAddress for bytes;

contracts/finance/README.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ This directory includes primitives for financial systems:
88
- {VestingWallet} handles the vesting of Ether and ERC-20 tokens for a given beneficiary. Custody of multiple tokens can
99
be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting
1010
schedule.
11+
- {VestingWalletCliff} is an extension of {VestingWallet} that adds a cliff to the vesting schedule.
1112
1213
== Contracts
1314

1415
{{VestingWallet}}
16+
17+
{{VestingWalletCliff}}

contracts/finance/VestingWalletCliff.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ abstract contract VestingWalletCliff is VestingWallet {
2424
* constructor) and ends `cliffSeconds` later.
2525
*/
2626
constructor(uint64 cliffSeconds) {
27-
if (cliffSeconds > duration()) {
28-
revert InvalidCliffDuration(cliffSeconds, duration().toUint64());
27+
uint256 vestingDuration = duration();
28+
if (cliffSeconds > vestingDuration) {
29+
revert InvalidCliffDuration(cliffSeconds, vestingDuration.toUint64());
2930
}
3031
_cliff = start().toUint64() + cliffSeconds;
3132
}

contracts/governance/README.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This directory includes primitives for on-chain governance.
77

88
== Governor
99

10-
This modular system of Governor contracts allows the deployment on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol.
10+
This modular system of Governor contracts allows the deployment of on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol.
1111

1212
[TIP]
1313
====
@@ -58,6 +58,8 @@ Other extensions can customize the behavior or interface in multiple ways.
5858

5959
* {GovernorSuperQuorum}: Extension of {Governor} with a super quorum. Proposals that meet the super quorum (and have a majority of for votes) advance to the `Succeeded` state before the proposal deadline.
6060

61+
* {GovernorSequentialProposalId}: An extension of {Governor} that changes the numbering of proposal ids from the default hash-based approach to sequential ids.
62+
6163
In addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications:
6264

6365
* <<Governor-votingDelay-,`votingDelay()`>>: Delay (in ERC-6372 clock) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes.
@@ -108,8 +110,12 @@ NOTE: Functions of the `Governor` contract do not include access control. If you
108110

109111
{{GovernorSuperQuorum}}
110112

113+
{{GovernorSequentialProposalId}}
114+
111115
== Utils
112116

117+
{{IVotes}}
118+
113119
{{Votes}}
114120

115121
{{VotesExtended}}

contracts/governance/extensions/GovernorTimelockCompound.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
1414
* the admin of the timelock for any operation to be performed. A public, unrestricted,
1515
* {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock.
1616
*
17-
* Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
18-
* the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
17+
* Using this model means the proposal will be operated by the {ICompoundTimelock} and not by the {Governor}. Thus,
18+
* the assets and permissions must be attached to the {ICompoundTimelock}. Any asset sent to the {Governor} will be
1919
* inaccessible from a proposal, unless executed via {Governor-relay}.
2020
*/
2121
abstract contract GovernorTimelockCompound is Governor {
2222
ICompoundTimelock private _timelock;
2323

2424
/**
25-
* @dev Emitted when the timelock controller used for proposal execution is modified.
25+
* @dev Emitted when the timelock used for proposal execution is modified.
2626
*/
2727
event TimelockChange(address oldTimelock, address newTimelock);
2828

0 commit comments

Comments
 (0)