diff --git a/packages/contracts/CHANGELOG.md b/packages/contracts/CHANGELOG.md
index c8bad728e..17348d1cb 100644
--- a/packages/contracts/CHANGELOG.md
+++ b/packages/contracts/CHANGELOG.md
@@ -105,7 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added the `Multisig` plugin and setup contract.
- Added a `VotingMode` enumeration to specify if the vote should be conducted in `Standard`, `EarlyExecution`, or `VoteReplacement` mode.
- Added the `Admin` plugin and setup contract.
-- Added NFT compatibility by using OpenZepplin's `IVotesUpgradeable` interface in `ERC20Voting` and renaming the contract to `TokenVoting`.
+- Added NFT compatibility by using OpenZeppelin's `IVotesUpgradeable` interface in `ERC20Voting` and renaming the contract to `TokenVoting`.
- Added extra check in `PermissionManager` to disallow giving DAO specific permissions to ANY_ADDR + giving any other permissions
to ANY_ADDR unless oracle is passed. Also, freeze can only be used when where is not ANY_ADDR.
- Added `resolver` check in initialize function and `setDefaultResolver` of `ENSSubdomainRegistrar.sol`.
@@ -152,7 +152,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `AllowlistVotingSetup` and `ERC20VotingSetup`.
- Added utility functions (`deployPluginRepoRegistry`, `deployPluginSetupProcessor`, `deployPluginRepoFactory`, and `filterEvents`) to the test suite.
- Added `DaoAuthorizableBase` class.
-- Added `DaoAuthorizableClonable` using OpenZepplin initialization.
+- Added `DaoAuthorizableClonable` using OpenZeppelin initialization.
- Added mocks and tests for the `Plugin` and `PluginSetup` classes.
- Added `PluginSetupProcessor` to be the main class processing `PluginSetup` contracts and applying permissions in the installing DAO.
- Added `DaoAuthorizableUpgradeable` and a free `_auth` function to provide an `auth` modifier to the different plugin types and prevent code duplication.
@@ -162,7 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added helper function `test/test-utils/ens.ts` deploying the `ENSSubdomainRegistrar` and `ENS`-related contracts.
- Added Multi Target Bulk Permission object for `PermissionManager` with the oracle option as well.
- Added Abstract `PluginSetup` for the devs to inherit from for their concrete plugin manager implementation.
-- Added the `solidity-docgen` hardhat plugin by OpenZepplin to automatically generate documentation via `yarn docgen`.
+- Added the `solidity-docgen` hardhat plugin by OpenZeppelin to automatically generate documentation via `yarn docgen`.
- Added deployment script for `ENSSubdomainRegistrar`.
- Added `ENSSubdomainRegistrar` `Component` to register subdomains at the ENS.
- Added `IPluginRepo` interface for plugin PluginRepo contract.
diff --git a/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/01-conditions.md b/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/01-conditions.md
index fc856036d..9f266065e 100644
--- a/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/01-conditions.md
+++ b/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/01-conditions.md
@@ -11,7 +11,7 @@ This contract must implement the `IPermissionCondition` interface.
interface IPermissionCondition {
/// @notice This method is used to check if a call is permitted.
/// @param _where The address of the target contract.
- /// @param _who The address (EOA or contract) for which the permission are checked.
+ /// @param _who The address (EOA or contract) for which the permissions are checked.
/// @param _permissionId The permission identifier.
/// @param _data Optional data passed to the `PermissionCondition` implementation.
/// @return allowed Returns true if the call is permitted.
@@ -170,10 +170,10 @@ Here, the permission condition will only allow the call if the PoH registry conf
In another use-case, we might want to make sure that the `sendCoins` function can only be called if the ETH price in USD is above a certain threshold:
-```solidity title="PriceOracle.sol"
+```solidity title="PriceOracleCondition.sol"
import '@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol';
-contract PriceOracle is IPermissionCondition {
+contract PriceOracleCondition is IPermissionCondition {
AggregatorV3Interface internal priceFeed;
// Network: Goerli
diff --git a/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/index.md b/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/index.md
index 4f3185ec4..2bbf85ad6 100644
--- a/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/index.md
+++ b/packages/contracts/docs/osx/01-how-it-works/01-core/02-permissions/index.md
@@ -45,7 +45,7 @@ This concatenated information is then stored as `keccak256` hashes inside a mapp
mapping(bytes32 => address) internal permissionsHashed;
```
-Here, the `bytes32` keys are the permission hashes and the `address` values are either zero-address flags, such as `ALLOW_FLAG = address(0)` and `UNSET_FLAG = address(2)` indicating if the permission is set, or an actual address pointing to a `PermissionCondition` contract, which is discussed in the next section of this guide.
+Here, the `bytes32` keys are the permission hashes and the `address` values are either zero-address flags, such as `ALLOW_FLAG = address(2)` and `UNSET_FLAG = address(0)` indicating if the permission is set, or an actual address pointing to a `PermissionCondition` contract, which is discussed in the next section of this guide.
### Authorization Modifiers
diff --git a/packages/contracts/docs/osx/01-how-it-works/aragon-os-framework-overview.drawio.svg b/packages/contracts/docs/osx/01-how-it-works/aragon-os-framework-overview.drawio.svg
index 9a746fec0..e16654ece 100644
--- a/packages/contracts/docs/osx/01-how-it-works/aragon-os-framework-overview.drawio.svg
+++ b/packages/contracts/docs/osx/01-how-it-works/aragon-os-framework-overview.drawio.svg
@@ -346,13 +346,13 @@
- OpenZepplin Contracts
+ OpenZeppelin Contracts
- OpenZepplin...
+ OpenZeppelin...
diff --git a/packages/contracts/docs/osx/01-how-it-works/index.md b/packages/contracts/docs/osx/01-how-it-works/index.md
index eddf75952..a325fa8c6 100644
--- a/packages/contracts/docs/osx/01-how-it-works/index.md
+++ b/packages/contracts/docs/osx/01-how-it-works/index.md
@@ -21,7 +21,7 @@ The Aragon OSx DAO framework is structured as follows:
The foundation of the Aragon OSx protocol is the **code layer** constituted by the core and framework related contracts.
The [core contracts](./01-core/index.md) provide the core primitives intended to be used by users and implemented by developers of the DAO framework.
The [framework contracts](./02-framework/index.md) provide the infrastructure to easily create and manage your DAOs and plugins easy.
-Both are built on top of external dependencies, most notably the [OpenZepplin](https://www.openzeppelin.com/contracts) and the [Ethereum Name Service (ENS)](https://docs.ens.domains/) contracts.
+Both are built on top of external dependencies, most notably the [OpenZeppelin](https://www.openzeppelin.com/contracts) and the [Ethereum Name Service (ENS)](https://docs.ens.domains/) contracts.
The core and framework contracts are free to use, and no additional fees are charged.
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/02-plugin-types.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/02-plugin-types.md
index 1f1381909..030224c8f 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/02-plugin-types.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/02-plugin-types.md
@@ -20,7 +20,7 @@ Upgradeable plugin contracts (i.e., `PluginUUPSUpgradeable` implementations) mus
### Upgradeability & Deployment
-Upgradeability and the deployment method of a plugin contract go hand in hand. The motivation behind upgrading smart contracts is nicely summarized by OpenZepplin:
+Upgradeability and the deployment method of a plugin contract go hand in hand. The motivation behind upgrading smart contracts is nicely summarized by OpenZeppelin:
> Smart contracts in Ethereum are immutable by default. Once you create them there is no way to alter them, effectively acting as an unbreakable contract among participants.
>
@@ -37,9 +37,9 @@ Upgradeability and the deployment method of a plugin contract go hand in hand. T
> 3. Update all contracts that interacted with the old contract to use the address of the new one
> 4. Reach out to all your users and convince them to start using the new deployment (and handle both contracts being used simultaneously, as users are slow to migrate
>
-> _source: [OpenZepplin: What's in an upgrade](https://docs.openzeppelin.com/learn/upgrading-smart-contracts#whats-in-an-upgrade)_
+> _source: [OpenZeppelin: What's in an upgrade](https://docs.openzeppelin.com/learn/upgrading-smart-contracts#whats-in-an-upgrade)_
-With upgradeable smart contracts, you can modify their code while keep using or even extending the storage (see the guide [Writing Upgradeable Contracts](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) by OpenZepplin).
+With upgradeable smart contracts, you can modify their code while keep using or even extending the storage (see the guide [Writing Upgradeable Contracts](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) by OpenZeppelin).
To enable upgradeable smart contracts (as well as cheap contract clones), the proxy pattern is used.
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md
index d16b9c424..3f45fdf57 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md
@@ -76,7 +76,7 @@ contract SimpleAdmin is PluginCloneable {
-We must protect it from being called multiple times by using [OpenZepplin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginCloneable_init(IDAO _dao)` available through the `PluginCloneable` base contract to store the `IDAO _dao` reference in the right place.
+We must protect it from being called multiple times by using [OpenZeppelin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginCloneable_init(IDAO _dao)` available through the `PluginCloneable` base contract to store the `IDAO _dao` reference in the right place.
:::caution
If you forget calling `__PluginCloneable_init(_dao)` inside your `initialize` function, your plugin won't be associated with a DAO and cannot use the DAO's `PermissionManager`.
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md
index 41020b736..37cfaa288 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md
@@ -117,7 +117,7 @@ function prepareInstallation(
address _dao,
bytes calldata _data
) external returns (address plugin, PreparedSetupData memory preparedSetupData) {
- // Decode `_data` to extract the params needed for cloning and initializing `Admin` plugin.
+ // Decode `_data` to extract the params needed for cloning and initializing the `Admin` plugin.
address admin = abi.decode(_data, (address));
if (admin == address(0)) {
@@ -134,7 +134,7 @@ function prepareInstallation(
PermissionLib.MultiTargetPermission[]
memory permissions = new PermissionLib.MultiTargetPermission[](2);
- // Grant the `ADMIN_EXECUTE_PERMISSION` of the Plugin to the admin.
+ // Grant the `ADMIN_EXECUTE_PERMISSION` of the plugin to the admin.
permissions[0] = PermissionLib.MultiTargetPermission({
operation: PermissionLib.Operation.Grant,
where: plugin,
@@ -158,7 +158,7 @@ function prepareInstallation(
-At the top of the function, we first decode the `admin` address from the `_data` provided and check, that it is not accidentally set to `address(0)`. In the next step, we clone the plugin contract using [OpenZepplin's `Clones` library](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones) and initialize it with the `admin` address. For this to work, we had to include the following three code lines at the top of the file:
+At the top of the function, we first decode the `admin` address from the `_data` provided and check, that it is not accidentally set to `address(0)`. In the next step, we clone the plugin contract using [OpenZeppelin's `Clones` library](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones) and initialize it with the `admin` address. For this to work, we had to include the following three code lines at the top of the file:
SimpleAdminSetup
: Adding the Clones
library and the error AdminAddressInvalid
@@ -181,7 +181,7 @@ contract SimpleAdminSetup is PluginSetup {
Finally, we construct an array of permission operations requesting two permissions to be granted that is returned by the function. First, we request the `ADMIN_EXECUTE_PERMISSION_ID` permission for the `admin` (`who`) address on the `plugin` (`where`). Second, we request the `EXECUTE_PERMISSION_ID` permission for the freshly deployed `plugin` (`who`) on the `_dao` (`where`). We don't add conditions to the permissions, so we use the `NO_CONDITION` constant provided by `PermissionLib`.
-The first line, `using Clones for address;`, allows us to call OpenZepplin `Clones` library to clone contracts deployed at an address.
+The first line, `using Clones for address;`, allows us to call OpenZeppelin `Clones` library to clone contracts deployed at an address.
The second line introduces a custom error being thrown if the admin address specified is the zero address.
### Implementing the `prepareUninstallation` function
@@ -262,7 +262,7 @@ contract SimpleAdminSetup is PluginSetup {
address _dao,
bytes calldata _data
) external returns (address plugin, PreparedSetupData memory preparedSetupData) {
- // Decode `_data` to extract the params needed for cloning and initializing `Admin` plugin.
+ // Decode `_data` to extract the params needed for cloning and initializing the `Admin` plugin.
address admin = abi.decode(_data, (address));
if (admin == address(0)) {
@@ -279,7 +279,7 @@ contract SimpleAdminSetup is PluginSetup {
PermissionLib.MultiTargetPermission[]
memory permissions = new PermissionLib.MultiTargetPermission[](2);
- // Grant the `ADMIN_EXECUTE_PERMISSION` of the Plugin to the admin.
+ // Grant the `ADMIN_EXECUTE_PERMISSION` of the plugin to the admin.
permissions[0] = PermissionLib.MultiTargetPermission({
operation: PermissionLib.Operation.Grant,
where: plugin,
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md
index 3743ab225..d55493c19 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md
@@ -30,7 +30,7 @@ contract SimpleStorageBuild1 is PluginUUPSUpgradeable {
-To discriminate the initialize functions of different builds, we name it `initializeBuild1` this time. Again, you must protect it from being used multiple times by using [OpenZepplin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginUUPSUpgradeable_init(IDAO _dao)` available through the `PluginUUPSUpgradeable` base contract storing the `IDAO _dao` reference in the right place.
+To discriminate the initialize functions of different builds, we name it `initializeBuild1` this time. Again, you must protect it from being used multiple times by using [OpenZeppelin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginUUPSUpgradeable_init(IDAO _dao)` available through the `PluginUUPSUpgradeable` base contract storing the `IDAO _dao` reference in the right place.
This becomes more demanding for subsequent builds of your plugin.
@@ -77,4 +77,4 @@ contract SimpleStorageBuild2 is PluginUUPSUpgradeable {
In general, for each version for which you want to support updates from, you have to provide a separate `initializeFromBuildX` function taking care of initializing the storage and transferring the `helpers` and `permissions` of the previous version into the same state as if it had been freshly installed.
Each `initializeBuildX` must be protected with a modifier that allows it to be only called once.
-In contrast to build 1, we now must use [OpenZepplin's `modifier reinitializer(uint8 build)`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable-reinitializer-uint8-) for build 2 instead of `modifier initializer` because it allows us to execute 255 subsequent initializations. More specifically, we used `reinitializer(2)` here for our build 2. Note that we could also have used `function initializeBuild1(IDAO _dao, uint256 _number) external reinitializer(1)` for build 1 because `initializer` and `reinitializer(1)` are equivalent statements. For build 3, we must use `reinitializer(3)`, for build 4 `reinitializer(4)` and so on.
+In contrast to build 1, we now must use [OpenZeppelin's `modifier reinitializer(uint8 build)`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable-reinitializer-uint8-) for build 2 instead of `modifier initializer` because it allows us to execute 255 subsequent initializations. More specifically, we used `reinitializer(2)` here for our build 2. Note that we could also have used `function initializeBuild1(IDAO _dao, uint256 _number) external reinitializer(1)` for build 1 because `initializer` and `reinitializer(1)` are equivalent statements. For build 3, we must use `reinitializer(3)`, for build 4 `reinitializer(4)` and so on.
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/02-implementation.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/02-implementation.md
index 3fd3fe143..f4c8964c5 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/02-implementation.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/02-implementation.md
@@ -84,7 +84,7 @@ contract SimpleStorageBuild2 is PluginUUPSUpgradeable {
-Builds that you publish don't necessarily need to introduce new storage varaibles of your contracts don't necessarily need to change the storage.
+Builds that you publish don't necessarily need to introduce new storage variables of your contracts don't necessarily need to change the storage.
#### Build 3: Changes Affecting the Bytecode
diff --git a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/06-meta-tx-plugins.md b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/06-meta-tx-plugins.md
index 2759db419..87cd646d8 100644
--- a/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/06-meta-tx-plugins.md
+++ b/packages/contracts/docs/osx/02-how-to-guides/02-plugin-development/06-meta-tx-plugins.md
@@ -5,7 +5,7 @@ title: Meta Transactions
## Supporting Meta Transactions
Our plugins are compatible with the [ERC-2771 (Meta Transaction)](https://eips.ethereum.org/EIPS/eip-2771) standard, which allows users to send gasless transactions, also known as meta transactions.
-This is possible because we use `_msgSender` and `_msgData` context from OpenZepplin's `Context` and `ContextUpgradeable` in our `Plugin`, `PluginCloneable`, and `PluginUUPSUpgradeable` classes.
+This is possible because we use `_msgSender` and `_msgData` context from OpenZeppelin's `Context` and `ContextUpgradeable` in our `Plugin`, `PluginCloneable`, and `PluginUUPSUpgradeable` classes.
To support meta transactions, your implementation contract must inherit and override the `Context` implementation with the `_msgSender` and `_msgData` functions provided in OpenGSN's `BaseRelayRecipient`, and use the [DAO's trusted forwarder](../../01-how-it-works/01-core/01-dao/index.md#6-meta-transaction-compatibility).
diff --git a/packages/contracts/src/core/dao/DAO.sol b/packages/contracts/src/core/dao/DAO.sol
index a22784de6..48bbe793e 100644
--- a/packages/contracts/src/core/dao/DAO.sol
+++ b/packages/contracts/src/core/dao/DAO.sol
@@ -66,7 +66,7 @@ contract DAO is
/// @notice The address of the trusted forwarder verifying meta transactions.
address private trustedForwarder;
- /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO uri.
+ /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.
string private _daoURI;
/// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.
@@ -87,8 +87,8 @@ contract DAO is
/// @param actual The actual native token amount deposited.
error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);
- /// @notice Emitted when a new DAO uri is set.
- /// @param daoURI The new uri.
+ /// @notice Emitted when a new DAO URI is set.
+ /// @param daoURI The new URI.
event NewURI(string daoURI);
/// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.
@@ -104,6 +104,7 @@ contract DAO is
/// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.
/// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.
/// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.
+ /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).
function initialize(
bytes calldata _metadata,
address _initialOwner,
@@ -134,7 +135,7 @@ contract DAO is
_permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;
}
- /// @notice Internal method authorizing the upgrade of the contract via the [upgradeabilty mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
+ /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
/// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.
function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}
@@ -204,7 +205,7 @@ contract DAO is
} else {
// Check if the call failed.
if (!success) {
- // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see https://eips.ethereum.org/EIPS/eip-150).
+ // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).
// In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit
// where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.
if (gasAfter < gasBefore / 64) {
@@ -277,8 +278,8 @@ contract DAO is
}
/// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.
- /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by EIP-2929.
- /// Gas cost increases in future hard forks might break this function. As an alternative, EIP-2930-type transactions using access lists can be employed.
+ /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).
+ /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.
receive() external payable {
emit NativeTokenDeposited(msg.sender, msg.value);
}
@@ -305,7 +306,7 @@ contract DAO is
emit TrustedForwarderSet(_trustedForwarder);
}
- /// @notice Registers the ERC721/ERC1155 interfaces and callbacks.
+ /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.
function _registerTokenInterfaces() private {
_registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);
_registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);
@@ -340,20 +341,20 @@ contract DAO is
return _daoURI;
}
- /// @notice Updates the set DAO uri to a new value.
- /// @param newDaoURI The new DAO uri to be set.
+ /// @notice Updates the set DAO URI to a new value.
+ /// @param newDaoURI The new DAO URI to be set.
function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {
_setDaoURI(newDaoURI);
}
- /// @notice Sets the new DAO uri and emits the associated event.
- /// @param daoURI_ The new DAO uri.
+ /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.
+ /// @param daoURI_ The new DAO URI.
function _setDaoURI(string calldata daoURI_) internal {
_daoURI = daoURI_;
emit NewURI(daoURI_);
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[47] private __gap;
}
diff --git a/packages/contracts/src/core/dao/IDAO.sol b/packages/contracts/src/core/dao/IDAO.sol
index 099d7a1e8..176604b7d 100644
--- a/packages/contracts/src/core/dao/IDAO.sol
+++ b/packages/contracts/src/core/dao/IDAO.sol
@@ -37,7 +37,7 @@ interface IDAO {
/// @param metadata The IPFS hash of the new metadata object.
event MetadataSet(bytes metadata);
- /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire excution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.
+ /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.
/// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.
/// @param _actions The array of actions.
/// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.
diff --git a/packages/contracts/src/core/dao/IEIP4824.sol b/packages/contracts/src/core/dao/IEIP4824.sol
index 17ff0fd11..3f3967e3b 100644
--- a/packages/contracts/src/core/dao/IEIP4824.sol
+++ b/packages/contracts/src/core/dao/IEIP4824.sol
@@ -6,6 +6,7 @@ pragma solidity 0.8.17;
/// @dev See https://eips.ethereum.org/EIPS/eip-4824
/// @author Aragon Association - 2021-2023
interface IEIP4824 {
- /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the "EIP-4824 DAO JSON-LD Schema". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the "EIP-4824 Members JSON-LD Schema". The proposalsURI should point to a JSON file that conforms to the "EIP-4824 Proposals JSON-LD Schema". The activityLogURI should point to a JSON file that conforms to the "EIP-4824 Activity Log JSON-LD Schema". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically-hosted or dynamically-generated.
+ /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the "EIP-4824 DAO JSON-LD Schema". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the "EIP-4824 Members JSON-LD Schema". The proposalsURI should point to a JSON file that conforms to the "EIP-4824 Proposals JSON-LD Schema". The activityLogURI should point to a JSON file that conforms to the "EIP-4824 Activity Log JSON-LD Schema". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.
+ /// @return _daoURI The DAO URI.
function daoURI() external view returns (string memory _daoURI);
}
diff --git a/packages/contracts/src/core/permission/IPermissionCondition.sol b/packages/contracts/src/core/permission/IPermissionCondition.sol
index bf98bc582..17c71e420 100644
--- a/packages/contracts/src/core/permission/IPermissionCondition.sol
+++ b/packages/contracts/src/core/permission/IPermissionCondition.sol
@@ -8,7 +8,7 @@ pragma solidity 0.8.17;
interface IPermissionCondition {
/// @notice This method is used to check if a call is permitted.
/// @param _where The address of the target contract.
- /// @param _who The address (EOA or contract) for which the permission are checked.
+ /// @param _who The address (EOA or contract) for which the permissions are checked.
/// @param _permissionId The permission identifier.
/// @param _data Optional data passed to the `PermissionCondition` implementation.
/// @return allowed Returns true if the call is permitted.
diff --git a/packages/contracts/src/core/permission/PermissionLib.sol b/packages/contracts/src/core/permission/PermissionLib.sol
index e9e9596aa..7949fe669 100644
--- a/packages/contracts/src/core/permission/PermissionLib.sol
+++ b/packages/contracts/src/core/permission/PermissionLib.sol
@@ -29,9 +29,9 @@ library PermissionLib {
bytes32 permissionId;
}
- /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a conditon.
+ /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.
/// @param operation The permission operation type.
- /// @param where The address of the target contract for which `who` recieves permission.
+ /// @param where The address of the target contract for which `who` receives permission.
/// @param who The address (EOA or contract) receiving the permission.
/// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.
/// @param permissionId The permission identifier.
diff --git a/packages/contracts/src/core/permission/PermissionManager.sol b/packages/contracts/src/core/permission/PermissionManager.sol
index d3f392d3f..0094c5101 100644
--- a/packages/contracts/src/core/permission/PermissionManager.sol
+++ b/packages/contracts/src/core/permission/PermissionManager.sol
@@ -98,7 +98,7 @@ abstract contract PermissionManager is Initializable {
/// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.
/// @dev Requires the `ROOT_PERMISSION_ID` permission.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) receiving the permission.
/// @param _permissionId The permission identifier.
/// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.
@@ -112,7 +112,7 @@ abstract contract PermissionManager is Initializable {
/// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.
/// @dev Requires the `ROOT_PERMISSION_ID` permission
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) receiving the permission.
/// @param _permissionId The permission identifier.
/// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.
@@ -190,7 +190,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) for which the permission is checked.
/// @param _permissionId The permission identifier.
/// @param _data The optional data passed to the `PermissionCondition` registered.
@@ -214,7 +214,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice This method is used in the public `grant` method of the permission manager.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {
@@ -222,7 +222,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice This method is used in the internal `_grant` method of the permission manager.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
/// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).
@@ -275,7 +275,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice This method is used in the public `revoke` method of the permission manager.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
/// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.
@@ -289,7 +289,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice Checks if a caller is granted permissions on a target contract via a permission identifier and redirects the approval to a `PermissionCondition` if this was specified in the setup.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
/// @param _data The optional data passed to the `PermissionCondition` registered.
@@ -335,7 +335,7 @@ abstract contract PermissionManager is Initializable {
}
/// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word "PERMISSION", the contract address, the address owning the permission, and the permission identifier.
- /// @param _where The address of the target contract for which `_who` recieves permission.
+ /// @param _where The address of the target contract for which `_who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
/// @return The permission hash.
@@ -347,10 +347,10 @@ abstract contract PermissionManager is Initializable {
return keccak256(abi.encodePacked("PERMISSION", _who, _where, _permissionId));
}
- /// @notice Decides if the granting permissionId is restricted when `_who = ANY_ADDR` or `_where = ANY_ADDR`.
+ /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.
/// @param _permissionId The permission identifier.
/// @return Whether or not the permission is restricted.
- /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included not required to be set it again.
+ /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.
function isPermissionRestrictedForAnyAddr(
bytes32 _permissionId
) internal view virtual returns (bool) {
@@ -358,6 +358,6 @@ abstract contract PermissionManager is Initializable {
return false;
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/core/plugin/IPlugin.sol b/packages/contracts/src/core/plugin/IPlugin.sol
index 479c6e974..2b8abe4b3 100644
--- a/packages/contracts/src/core/plugin/IPlugin.sol
+++ b/packages/contracts/src/core/plugin/IPlugin.sol
@@ -12,6 +12,6 @@ interface IPlugin {
Constructable
}
- /// @notice returns the plugin's type
+ /// @notice Returns the plugin's type
function pluginType() external view returns (PluginType);
}
diff --git a/packages/contracts/src/core/plugin/PluginUUPSUpgradeable.sol b/packages/contracts/src/core/plugin/PluginUUPSUpgradeable.sol
index 53a578275..af59d81a5 100644
--- a/packages/contracts/src/core/plugin/PluginUUPSUpgradeable.sol
+++ b/packages/contracts/src/core/plugin/PluginUUPSUpgradeable.sol
@@ -56,12 +56,12 @@ abstract contract PluginUUPSUpgradeable is
return _getImplementation();
}
- /// @notice Internal method authorizing the upgrade of the contract via the [upgradeabilty mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
+ /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
/// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.
function _authorizeUpgrade(
address
) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[50] private __gap;
}
diff --git a/packages/contracts/src/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol b/packages/contracts/src/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol
index 719975cdf..b099cc69f 100644
--- a/packages/contracts/src/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol
+++ b/packages/contracts/src/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol
@@ -34,6 +34,6 @@ abstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {
_;
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/core/plugin/membership/IMembership.sol b/packages/contracts/src/core/plugin/membership/IMembership.sol
index 32bc7ee7d..068e59581 100644
--- a/packages/contracts/src/core/plugin/membership/IMembership.sol
+++ b/packages/contracts/src/core/plugin/membership/IMembership.sol
@@ -4,7 +4,7 @@ pragma solidity 0.8.17;
import {IDAO} from "../../dao/IDAO.sol";
-/// @title IProposal
+/// @title IMembership
/// @author Aragon Association - 2022-2023
/// @notice An interface to be implemented by DAO plugins that define membership.
interface IMembership {
diff --git a/packages/contracts/src/core/plugin/proposal/Proposal.sol b/packages/contracts/src/core/plugin/proposal/Proposal.sol
index 2405d6262..9a8f9da3a 100644
--- a/packages/contracts/src/core/plugin/proposal/Proposal.sol
+++ b/packages/contracts/src/core/plugin/proposal/Proposal.sol
@@ -36,7 +36,7 @@ abstract contract Proposal is IProposal, ERC165 {
}
/// @notice Internal function to create a proposal.
- /// @param _metadata The the proposal metadata.
+ /// @param _metadata The proposal metadata.
/// @param _startDate The start date of the proposal in seconds.
/// @param _endDate The end date of the proposal in seconds.
/// @param _allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.
diff --git a/packages/contracts/src/core/plugin/proposal/ProposalUpgradeable.sol b/packages/contracts/src/core/plugin/proposal/ProposalUpgradeable.sol
index a230ce96d..2a5c882f0 100644
--- a/packages/contracts/src/core/plugin/proposal/ProposalUpgradeable.sol
+++ b/packages/contracts/src/core/plugin/proposal/ProposalUpgradeable.sol
@@ -7,7 +7,7 @@ import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/intro
import "./IProposal.sol";
-/// @title ProposalUgradeable
+/// @title ProposalUpgradeable
/// @author Aragon Association - 2022-2023
/// @notice An abstract contract containing the traits and internal functionality to create and execute proposals that can be inherited by upgradeable DAO plugins.
abstract contract ProposalUpgradeable is IProposal, ERC165Upgradeable {
@@ -36,7 +36,7 @@ abstract contract ProposalUpgradeable is IProposal, ERC165Upgradeable {
}
/// @notice Internal function to create a proposal.
- /// @param _metadata The the proposal metadata.
+ /// @param _metadata The proposal metadata.
/// @param _startDate The start date of the proposal in seconds.
/// @param _endDate The end date of the proposal in seconds.
/// @param _allowFailureMap A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index `i` is 1, the proposal succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.
@@ -79,6 +79,6 @@ abstract contract ProposalUpgradeable is IProposal, ERC165Upgradeable {
emit ProposalExecuted({proposalId: _proposalId});
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/core/utils/BitMap.sol b/packages/contracts/src/core/utils/BitMap.sol
index 74eae0fee..47fbce4a0 100644
--- a/packages/contracts/src/core/utils/BitMap.sol
+++ b/packages/contracts/src/core/utils/BitMap.sol
@@ -4,7 +4,7 @@ pragma solidity 0.8.17;
/// @param bitmap The `uint256` representation of bits.
/// @param index The index number to check whether 1 or 0 is set.
-/// @return Returns `true` whether the bit is set at `index` on `bitmap`.
+/// @return Returns `true` if the bit is set at `index` on `bitmap`.
function hasBit(uint256 bitmap, uint8 index) pure returns (bool) {
uint256 bitValue = bitmap & (1 << index);
return bitValue > 0;
@@ -12,7 +12,7 @@ function hasBit(uint256 bitmap, uint8 index) pure returns (bool) {
/// @param bitmap The `uint256` representation of bits.
/// @param index The index number to set the bit.
-/// @return Returns a new number on which the bit is set at `index`.
+/// @return Returns a new number in which the bit is set at `index`.
function flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {
return bitmap ^ (1 << index);
}
diff --git a/packages/contracts/src/core/utils/CallbackHandler.sol b/packages/contracts/src/core/utils/CallbackHandler.sol
index bccfd3730..e0fda25cf 100644
--- a/packages/contracts/src/core/utils/CallbackHandler.sol
+++ b/packages/contracts/src/core/utils/CallbackHandler.sol
@@ -4,7 +4,7 @@ pragma solidity 0.8.17;
/// @title CallbackHandler
/// @author Aragon Association - 2022-2023
-/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inherting have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.
+/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.
/// @dev This callback handling functionality is intented to be used by executor contracts (i.e., `DAO.sol`).
abstract contract CallbackHandler {
/// @notice A mapping between callback function selectors and magic return numbers.
@@ -21,12 +21,13 @@ abstract contract CallbackHandler {
/// @notice Emitted when `_handleCallback` is called.
/// @param sender Who called the callback.
/// @param sig The function signature.
- /// @param data The calldata for the function signature.
+ /// @param data The calldata.
event CallbackReceived(address sender, bytes4 indexed sig, bytes data);
/// @notice Handles callbacks to adaptively support ERC standards.
/// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.
/// @param _callbackSelector The function selector of the callback function.
+ /// @param _data The calldata.
/// @return The magic number registered for the function selector triggering the fallback.
function _handleCallback(
bytes4 _callbackSelector,
@@ -49,6 +50,6 @@ abstract contract CallbackHandler {
callbackMagicNumbers[_callbackSelector] = _magicNumber;
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/core/utils/auth.sol b/packages/contracts/src/core/utils/auth.sol
index 68d49a058..7f5f107e2 100644
--- a/packages/contracts/src/core/utils/auth.sol
+++ b/packages/contracts/src/core/utils/auth.sol
@@ -12,7 +12,7 @@ import {IDAO} from "../dao/IDAO.sol";
error DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);
/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.
-/// @param _where The address of the target contract for which `who` recieves permission.
+/// @param _where The address of the target contract for which `who` receives permission.
/// @param _who The address (EOA or contract) owning the permission.
/// @param _permissionId The permission identifier.
/// @param _data The optional data passed to the `PermissionCondition` registered.
diff --git a/packages/contracts/src/framework/dao/DAOFactory.sol b/packages/contracts/src/framework/dao/DAOFactory.sol
index 86a1d87a2..498297c29 100644
--- a/packages/contracts/src/framework/dao/DAOFactory.sol
+++ b/packages/contracts/src/framework/dao/DAOFactory.sol
@@ -131,7 +131,7 @@ contract DAOFactory {
applyInstallationPermissionID
);
- // Revoke Temporarly `ROOT_PERMISSION_ID` from `pluginSetupProcessor` that implecitly granted to this `DaoFactory`
+ // Revoke Temporarly `ROOT_PERMISSION_ID` from `pluginSetupProcessor` that implicitly granted to this `DaoFactory`
// at the create dao step `address(this)` being the initial owner of the new created DAO.
createdDao.revoke(address(createdDao), address(this), rootPermissionID);
}
diff --git a/packages/contracts/src/framework/dao/DAORegistry.sol b/packages/contracts/src/framework/dao/DAORegistry.sol
index 14e3b5d70..98fe6019b 100644
--- a/packages/contracts/src/framework/dao/DAORegistry.sol
+++ b/packages/contracts/src/framework/dao/DAORegistry.sol
@@ -9,7 +9,7 @@ import {isSubdomainValid} from "../utils/RegistryUtils.sol";
/// @title Register your unique DAO subdomain
/// @author Aragon Association - 2022-2023
-/// @notice This contract provides the possiblity to register a DAO.
+/// @notice This contract provides the possibility to register a DAO.
contract DAORegistry is InterfaceBasedRegistry {
/// @notice The ID of the permission required to call the `register` function.
bytes32 public constant REGISTER_DAO_PERMISSION_ID = keccak256("REGISTER_DAO_PERMISSION");
@@ -69,6 +69,6 @@ contract DAORegistry is InterfaceBasedRegistry {
emit DAORegistered(daoAddr, creator, subdomain);
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol b/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol
index 9b1636691..db5ebeaab 100644
--- a/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol
+++ b/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol
@@ -6,7 +6,7 @@ pragma solidity 0.8.17;
/// @author Aragon Association - 2022-2023
/// @notice The interface required for a plugin repository.
interface IPluginRepo {
- /// @notice Update the metadata for release with content `@fromHex(_releaseMetadata)`.
+ /// @notice Updates the metadata for release with content `@fromHex(_releaseMetadata)`.
/// @param _release The release number.
/// @param _releaseMetadata The release metadata URI.
function updateReleaseMetadata(uint8 _release, bytes calldata _releaseMetadata) external;
diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepo.sol b/packages/contracts/src/framework/plugin/repo/PluginRepo.sol
index 6dc2c8b49..655b8ebf5 100644
--- a/packages/contracts/src/framework/plugin/repo/PluginRepo.sol
+++ b/packages/contracts/src/framework/plugin/repo/PluginRepo.sol
@@ -252,7 +252,7 @@ contract PluginRepo is
return keccak256(abi.encodePacked(_tag.release, _tag.build));
}
- /// @notice Internal method authorizing the upgrade of the contract via the [upgradeabilty mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
+ /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
/// @dev The caller must have the `UPGRADE_REPO_PERMISSION_ID` permission.
function _authorizeUpgrade(
address
diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol b/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol
index 1559f5445..4a666b0ac 100644
--- a/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol
+++ b/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol
@@ -9,12 +9,12 @@ import {PluginRepo} from "./PluginRepo.sol";
/// @title PluginRepoFactory
/// @author Aragon Association - 2022-2023
-/// @notice This contract creates `PluginRepo` proxies and registers them on an `PluginRepoRegistry` contract.
+/// @notice This contract creates `PluginRepo` proxies and registers them on a `PluginRepoRegistry` contract.
contract PluginRepoFactory {
/// @notice The Aragon plugin registry contract.
PluginRepoRegistry public pluginRepoRegistry;
- /// @notice The address of the `PluginRepo` base contract.
+ /// @notice The address of the `PluginRepo` base contract to proxy to..
address public pluginRepoBase;
/// @notice Initializes the addresses of the Aragon plugin registry and `PluginRepo` base contract to proxy to.
diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol b/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol
index c07f494b2..92d61fb16 100644
--- a/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol
+++ b/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol
@@ -10,7 +10,7 @@ import {IPluginRepo} from "./IPluginRepo.sol";
/// @title PluginRepoRegistry
/// @author Aragon Association - 2022-2023
-/// @notice This contract maintains an address-based registery of plugin repositories in the Aragon App DAO framework.
+/// @notice This contract maintains an address-based registry of plugin repositories in the Aragon App DAO framework.
contract PluginRepoRegistry is InterfaceBasedRegistry {
/// @notice The ID of the permission required to call the `register` function.
bytes32 public constant REGISTER_PLUGIN_REPO_PERMISSION_ID =
@@ -68,6 +68,6 @@ contract PluginRepoRegistry is InterfaceBasedRegistry {
emit PluginRepoRegistered(subdomain, pluginRepo);
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[49] private __gap;
}
diff --git a/packages/contracts/src/framework/plugin/setup/IPluginSetup.sol b/packages/contracts/src/framework/plugin/setup/IPluginSetup.sol
index cd2b5c19e..02b592c57 100644
--- a/packages/contracts/src/framework/plugin/setup/IPluginSetup.sol
+++ b/packages/contracts/src/framework/plugin/setup/IPluginSetup.sol
@@ -40,7 +40,7 @@ interface IPluginSetup {
/// @notice Prepares the update of a plugin.
/// @param _dao The address of the updating DAO.
/// @param _currentBuild The build number of the plugin to update from.
- /// @param _payload The relevant data necessary for the `prepareUpdate`. see above.
+ /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.
/// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.
/// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.
function prepareUpdate(
@@ -51,7 +51,7 @@ interface IPluginSetup {
/// @notice Prepares the uninstallation of a plugin.
/// @param _dao The address of the uninstalling DAO.
- /// @param _payload The relevant data necessary for the `prepareUninstallation`. see above.
+ /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.
/// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.
function prepareUninstallation(
address _dao,
diff --git a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol
index 41f68e50c..0fb0c8322 100644
--- a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol
+++ b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol
@@ -151,7 +151,7 @@ contract PluginSetupProcessor {
/// @notice Thrown if a plugin repository does not exist on the plugin repo registry.
error PluginRepoNonexistent();
- /// @notice Thrown if a plugin setup was already prepared inidcated by the prepared setup ID.
+ /// @notice Thrown if a plugin setup was already prepared indicated by the prepared setup ID.
/// @param preparedSetupId The prepared setup ID.
error SetupAlreadyPrepared(bytes32 preparedSetupId);
@@ -545,7 +545,7 @@ contract PluginSetupProcessor {
}
/// @notice Prepares the uninstallation of a plugin.
- /// @param _dao The address of the installing DAO.
+ /// @param _dao The address of the uninstalling DAO.
/// @param _params The struct containing the parameters for the `prepareUninstallation` function.
/// @return permissions The list of multi-targeted permission operations to be applied to the uninstalling DAO.
/// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.
@@ -606,7 +606,7 @@ contract PluginSetupProcessor {
/// @notice Applies the permissions of a prepared uninstallation to a DAO.
/// @param _dao The address of the DAO.
- /// @param _dao The address of the installing DAO.
+ /// @param _dao The address of the uninstalling DAO.
/// @param _params The struct containing the parameters for the `applyUninstallation` function.
/// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.
function applyUninstallation(
diff --git a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol
index a01a144f4..686bdff7b 100644
--- a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol
+++ b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol
@@ -6,7 +6,7 @@ import {PermissionLib} from "../../../core/permission/PermissionLib.sol";
import {PluginRepo} from "../repo/PluginRepo.sol";
import {PluginSetup} from "./PluginSetup.sol";
-/// @notice The struct containin a reference to a plugin setup by specifying the containing plugin repository and the associated version tag.
+/// @notice The struct containing a reference to a plugin setup by specifying the containing plugin repository and the associated version tag.
/// @param versionTag The tag associated with the plugin setup version.
/// @param pluginSetupRepo The plugin setup repository.
struct PluginSetupRef {
diff --git a/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol b/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol
index c8aabda92..2e6c6c42d 100644
--- a/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol
+++ b/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol
@@ -21,7 +21,7 @@ abstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgr
/// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID that the target contracts being registered must support.
bytes4 public targetInterfaceId;
- /// @notice The mapping containing the registry entries returning true for registererd contract addresses.
+ /// @notice The mapping containing the registry entries returning true for registered contract addresses.
mapping(address => bool) public entries;
/// @notice Thrown if the contract is already registered.
@@ -32,7 +32,7 @@ abstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgr
/// @param registrant The address of the contract to be registered.
error ContractInterfaceInvalid(address registrant);
- /// @notice Thrown if the contract do not support ERC165.
+ /// @notice Thrown if the contract does not support ERC165.
/// @param registrant The address of the contract.
error ContractERC165SupportInvalid(address registrant);
@@ -49,7 +49,7 @@ abstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgr
targetInterfaceId = _targetInterfaceId;
}
- /// @notice Internal method authorizing the upgrade of the contract via the [upgradeabilty mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
+ /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
/// @dev The caller must have the `UPGRADE_REGISTRY_PERMISSION_ID` permission.
function _authorizeUpgrade(
address
@@ -71,6 +71,6 @@ abstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgr
entries[_registrant] = true;
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[48] private __gap;
}
diff --git a/packages/contracts/src/framework/utils/TokenFactory.sol b/packages/contracts/src/framework/utils/TokenFactory.sol
index 381e74576..746707972 100644
--- a/packages/contracts/src/framework/utils/TokenFactory.sol
+++ b/packages/contracts/src/framework/utils/TokenFactory.sol
@@ -71,7 +71,7 @@ contract TokenFactory {
/// @notice Creates a new `GovernanceERC20` token or a `GovernanceWrappedERC20` from an existing [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token depending on the address used in the `TokenConfig` provided.
/// @param _managingDao The address of the DAO managing the token.
- /// @param _tokenConfig The token configuration struct containing the name, and symbol of the token to be create, but also an address. For `address(0)`, a new governance token is created. For any other address pointing to an [ERC-20](https://eips.ethereum.org/EIPS/eip-20)-compatible contract, a wrapped governance token is created.
+ /// @param _tokenConfig The token configuration struct containing the name, and symbol of the token to be created, but also an address. For `address(0)`, a new governance token is created. For any other address pointing to an [ERC-20](https://eips.ethereum.org/EIPS/eip-20)-compatible contract, a wrapped governance token is created.
/// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.
/// @return The created `ERC20VotesUpgradeable` compatible token contract.
/// @return The created `MerkleMinter` contract used to mint the `ERC20VotesUpgradeable` tokens or `address(0)` if an existing token was provided.
@@ -130,7 +130,7 @@ contract TokenFactory {
bytes32 tokenMintPermission = GovernanceERC20(token).MINT_PERMISSION_ID();
bytes32 merkleMintPermission = MerkleMinter(merkleMinter).MERKLE_MINT_PERMISSION_ID();
- // Grant the managing DAO permission to directly mint tokens to an receiving address.
+ // Grant the managing DAO permission to directly mint tokens to a receiving address.
_managingDao.grant(token, address(_managingDao), tokenMintPermission);
// Grant the managing DAO permission to mint tokens via the `MerkleMinter` that are claimable on a merkle tree.
diff --git a/packages/contracts/src/framework/utils/ens/ENSMigration.sol b/packages/contracts/src/framework/utils/ens/ENSMigration.sol
index ffe15e6d7..b1de22296 100644
--- a/packages/contracts/src/framework/utils/ens/ENSMigration.sol
+++ b/packages/contracts/src/framework/utils/ens/ENSMigration.sol
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
-// This is a migration file as suggested here https://docs.ens.domains/deploying-ens-on-a-private-chain#migration-file-example
-// to compile the contracts and make their artifacts available in our tests.
+// This is a migration file as suggested here https://docs.ens.domains/deploying-ens-on-a-private-chain#migration-file-example to compile the contracts and make their artifacts available in our tests.
pragma solidity 0.8.17;
diff --git a/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol b/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol
index 0d5ea5ed9..e9f8bd38b 100644
--- a/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol
+++ b/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol
@@ -69,7 +69,7 @@ contract ENSSubdomainRegistrar is UUPSUpgradeable, DaoAuthorizableUpgradeable {
resolver = nodeResolver;
}
- /// @notice Internal method authorizing the upgrade of the contract via the [upgradeabilty mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
+ /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).
/// @dev The caller must have the `UPGRADE_REGISTRAR_PERMISSION_ID` permission.
function _authorizeUpgrade(
address
@@ -107,6 +107,6 @@ contract ENSSubdomainRegistrar is UUPSUpgradeable, DaoAuthorizableUpgradeable {
resolver = _resolver;
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[47] private __gap;
}
diff --git a/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol b/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol
index 12bc6d156..3434d1f2b 100644
--- a/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol
+++ b/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol
@@ -12,7 +12,7 @@ contract MultiplyHelper is PluginUUPSUpgradeable {
bytes32 public constant MULTIPLY_PERMISSION_ID = keccak256("MULTIPLY_PERMISSION");
/// @notice Multiplies the count with a number.
- /// @param _a The number to multiply the coun with.
+ /// @param _a The number to multiply the count with.
function multiply(
uint256 _a,
uint256 _b
diff --git a/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol b/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol
index 0371c9192..73fcc03a7 100644
--- a/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol
+++ b/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol
@@ -13,7 +13,7 @@ contract CounterV1 is PluginUUPSUpgradeable {
/// @notice The ID of the permission required to call the `multiply` function.
bytes32 public constant MULTIPLY_PERMISSION_ID = keccak256("MULTIPLY_PERMISSION");
- /// @notice A counter varaible.
+ /// @notice A counter variable.
uint256 public count;
/// @notice A helper contract associated with the plugin.
@@ -22,7 +22,7 @@ contract CounterV1 is PluginUUPSUpgradeable {
/// @notice Initializes the plugin.
/// @param _dao The contract of the associated DAO.
/// @param _multiplyHelper The helper contract associated with the plugin to multiply numbers.
- /// @param _count The inital value of the counter.
+ /// @param _count The initial value of the counter.
function initialize(
IDAO _dao,
MultiplyHelper _multiplyHelper,
@@ -35,7 +35,7 @@ contract CounterV1 is PluginUUPSUpgradeable {
}
/// @notice Multiplies the count with a number.
- /// @param _a The number to multiply the coun with.
+ /// @param _a The number to multiply the count with.
function multiply(uint256 _a) public view auth(MULTIPLY_PERMISSION_ID) returns (uint256) {
return multiplyHelper.multiply(count, _a);
}
@@ -46,6 +46,6 @@ contract CounterV1 is PluginUUPSUpgradeable {
//dao.execute(...)
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[48] private __gap;
}
diff --git a/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol b/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol
index 023250413..225d6ec53 100644
--- a/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol
+++ b/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol
@@ -13,20 +13,20 @@ contract CounterV2 is PluginUUPSUpgradeable {
/// @notice The ID of the permission required to call the `multiply` function.
bytes32 public constant MULTIPLY_PERMISSION_ID = keccak256("MULTIPLY_PERMISSION");
- /// @notice A counter varaible.
+ /// @notice A counter variable.
uint256 public count;
/// @notice A helper contract associated with the plugin.
MultiplyHelper public multiplyHelper;
- /// @notice A new varaible added in V2.
+ /// @notice A new variable added in V2.
/// @dev By appending a new variable, the existing storage gets modified.
uint256 public newVariable;
/// @notice Initializes the plugin.
/// @param _dao The contract of the associated DAO.
/// @param _multiplyHelper The helper contract associated with the plugin to multiply numbers.
- /// @param _count The inital value of the counter.
+ /// @param _count The initial value of the counter.
/// @param _newVariable The new variable that was added with V2.
/// @dev This only gets called for daos that install it for the first time. The initializer modifier protects it from being called a second time for old proxies.
function initialize(
@@ -54,7 +54,7 @@ contract CounterV2 is PluginUUPSUpgradeable {
}
/// @notice Multiplies the count with a number.
- /// @param _a The number to multiply the coun with.
+ /// @param _a The number to multiply the count with.
function multiply(uint256 _a) public view auth(MULTIPLY_PERMISSION_ID) returns (uint256) {
return multiplyHelper.multiply(count, _a);
}
@@ -65,6 +65,6 @@ contract CounterV2 is PluginUUPSUpgradeable {
//dao.execute(...)
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[47] private __gap;
}
diff --git a/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol b/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol
index 527074b35..890721e93 100644
--- a/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol
+++ b/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol
@@ -20,7 +20,7 @@ contract CounterV2PluginSetup is PluginSetup {
MultiplyHelper public multiplyHelperBase;
CounterV2 public counterBase;
- // MultiplyHelper doesn't change. so dev decides to pass the old one.
+ // MultiplyHelper doesn't change, so the developer decides to pass the old one.
constructor(MultiplyHelper _helper) {
multiplyHelperBase = _helper;
counterBase = new CounterV2();
diff --git a/packages/contracts/src/plugins/governance/admin/AdminSetup.sol b/packages/contracts/src/plugins/governance/admin/AdminSetup.sol
index ec7678dfa..3b7bc46cc 100644
--- a/packages/contracts/src/plugins/governance/admin/AdminSetup.sol
+++ b/packages/contracts/src/plugins/governance/admin/AdminSetup.sol
@@ -16,7 +16,7 @@ import {Admin} from "./Admin.sol";
contract AdminSetup is PluginSetup {
using Clones for address;
- /// @notice The address of `Admin` plugin logic contract to be cloned.
+ /// @notice The address of the `Admin` plugin logic contract to be cloned.
address private immutable implementation_;
/// @notice Thrown if the admin address is zero.
@@ -33,7 +33,7 @@ contract AdminSetup is PluginSetup {
address _dao,
bytes calldata _data
) external returns (address plugin, PreparedSetupData memory preparedSetupData) {
- // Decode `_data` to extract the params needed for cloning and initializing `Admin` plugin.
+ // Decode `_data` to extract the params needed for cloning and initializing the `Admin` plugin.
address admin = abi.decode(_data, (address));
if (admin == address(0)) {
@@ -50,7 +50,7 @@ contract AdminSetup is PluginSetup {
PermissionLib.MultiTargetPermission[]
memory permissions = new PermissionLib.MultiTargetPermission[](2);
- // Grant `ADMIN_EXECUTE_PERMISSION` of the Plugin to the admin.
+ // Grant `ADMIN_EXECUTE_PERMISSION` of the plugin to the admin.
permissions[0] = PermissionLib.MultiTargetPermission(
PermissionLib.Operation.Grant,
plugin,
diff --git a/packages/contracts/src/plugins/governance/majority-voting/IMajorityVoting.sol b/packages/contracts/src/plugins/governance/majority-voting/IMajorityVoting.sol
index 5e6397467..ec5147b66 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/IMajorityVoting.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/IMajorityVoting.sol
@@ -9,7 +9,7 @@ import {IDAO} from "../../../core/dao/IDAO.sol";
/// @notice The interface of majority voting plugin.
interface IMajorityVoting {
/// @notice Vote options that a voter can chose from.
- /// @param None The default option state of a voter indicating the absence of from the vote. This option neither influences support nor participation.
+ /// @param None The default option state of a voter indicating the absence from the vote. This option neither influences support nor participation.
/// @param Abstain This option does not influence the support but counts towards participation.
/// @param Yes This option increases the support and counts towards participation.
/// @param No This option decreases the support and counts towards participation.
@@ -52,7 +52,7 @@ interface IMajorityVoting {
/// @notice Checks if the participation value defined as $$\texttt{participation} = \frac{N_\text{yes}+N_\text{no}+N_\text{abstain}}{N_\text{total}}$$ for a proposal vote is greater or equal than the minimum participation value.
/// @param _proposalId The ID of the proposal.
- /// @return Returns `true` if the participation is greater than the minimum particpation and `false` otherwise.
+ /// @return Returns `true` if the participation is greater than the minimum participation and `false` otherwise.
function isMinParticipationReached(uint256 _proposalId) external view returns (bool);
/// @notice Checks if an account can participate on a proposal vote. This can be because the vote
diff --git a/packages/contracts/src/plugins/governance/majority-voting/MajorityVotingBase.sol b/packages/contracts/src/plugins/governance/majority-voting/MajorityVotingBase.sol
index 082bd8c82..7d38debfe 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/MajorityVotingBase.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/MajorityVotingBase.sol
@@ -105,7 +105,7 @@ abstract contract MajorityVotingBase is
/// @notice The different voting modes available.
/// @param Standard In standard mode, early execution and vote replacement are disabled.
/// @param EarlyExecution In early execution mode, a proposal can be executed early before the end date if the vote outcome cannot mathematically change by more voters voting.
- /// @param VoteReplacment In vote replacement mode, voters can change their vote multiple times and only the latest vote option is tallied.
+ /// @param VoteReplacement In vote replacement mode, voters can change their vote multiple times and only the latest vote option is tallied.
enum VotingMode {
Standard,
EarlyExecution,
@@ -363,7 +363,7 @@ abstract contract MajorityVotingBase is
return votingSettings.minDuration;
}
- /// @notice Returns the minimum voting power required to create a proposa stored in the voting settings.
+ /// @notice Returns the minimum voting power required to create a proposal stored in the voting settings.
/// @return The minimum voting power required to create a proposal.
function minProposerVotingPower() public view virtual returns (uint256) {
return votingSettings.minProposerVotingPower;
@@ -589,6 +589,6 @@ abstract contract MajorityVotingBase is
}
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[47] private __gap;
}
diff --git a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol
index 0ccd8a30d..1ca96245e 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol
@@ -14,7 +14,7 @@ import {MajorityVotingBase} from "../MajorityVotingBase.sol";
/// @title AddresslistVoting
/// @author Aragon Association - 2021-2023.
-/// @notice The majority voting implementation using an list of member addresses.
+/// @notice The majority voting implementation using a list of member addresses.
/// @dev This contract inherits from `MajorityVotingBase` and implements the `IMajorityVoting` interface.
contract AddresslistVoting is IMembership, Addresslist, MajorityVotingBase {
using SafeCastUpgradeable for uint256;
diff --git a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol
index cd00947ce..c0cdc7ba7 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol
@@ -16,7 +16,7 @@ contract AddresslistVotingSetup is PluginSetup {
/// @notice The address of `AddresslistVoting` plugin logic contract to be used in creating proxy contracts.
AddresslistVoting private immutable addresslistVotingBase;
- /// @notice The contract constructor, that deployes the `AddresslistVoting` plugin logic contract.
+ /// @notice The contract constructor, that deploys the `AddresslistVoting` plugin logic contract.
constructor() {
addresslistVotingBase = new AddresslistVoting();
}
@@ -46,7 +46,7 @@ contract AddresslistVotingSetup is PluginSetup {
memory permissions = new PermissionLib.MultiTargetPermission[](4);
// Set permissions to be granted.
- // Grant the list of prmissions of the plugin to the DAO.
+ // Grant the list of permissions of the plugin to the DAO.
permissions[0] = PermissionLib.MultiTargetPermission(
PermissionLib.Operation.Grant,
plugin,
diff --git a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol
index a3e26c36b..7b6c6089d 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol
@@ -13,7 +13,7 @@ import {IMajorityVoting} from "../IMajorityVoting.sol";
/// @title TokenVoting
/// @author Aragon Association - 2021-2023
-/// @notice The majority voting implementation using an [OpenZepplin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible governance token.
+/// @notice The majority voting implementation using an [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible governance token.
/// @dev This contract inherits from `MajorityVotingBase` and implements the `IMajorityVoting` interface.
contract TokenVoting is IMembership, MajorityVotingBase {
using SafeCastUpgradeable for uint256;
@@ -22,7 +22,7 @@ contract TokenVoting is IMembership, MajorityVotingBase {
bytes4 internal constant TOKEN_VOTING_INTERFACE_ID =
this.initialize.selector ^ this.getVotingToken.selector;
- /// @notice An [OpenZepplin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible contract referencing the token being used for voting.
+ /// @notice An [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible contract referencing the token being used for voting.
IVotesUpgradeable private votingToken;
/// @notice Thrown if the voting power is zero
diff --git a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol
index b7fc7c8e0..8bf2cee36 100644
--- a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol
+++ b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol
@@ -53,11 +53,11 @@ contract TokenVotingSetup is PluginSetup {
/// @param token The token address
error TokenNotERC20(address token);
- /// @notice Thrown if passed helpers array is of worng length.
+ /// @notice Thrown if passed helpers array is of wrong length.
/// @param length The array length of passed helpers.
error WrongHelpersArrayLength(uint256 length);
- /// @notice The contract constructor, that deployes the bases.
+ /// @notice The contract constructor, that deploys the bases.
constructor() {
governanceERC20Base = address(
new GovernanceERC20(
@@ -152,7 +152,7 @@ contract TokenVotingSetup is PluginSetup {
);
// Set plugin permissions to be granted.
- // Grant the list of prmissions of the plugin to the DAO.
+ // Grant the list of permissions of the plugin to the DAO.
permissions[0] = PermissionLib.MultiTargetPermission(
PermissionLib.Operation.Grant,
plugin,
diff --git a/packages/contracts/src/plugins/governance/multisig/IMultisig.sol b/packages/contracts/src/plugins/governance/multisig/IMultisig.sol
index 54e9ab133..e5ae07643 100644
--- a/packages/contracts/src/plugins/governance/multisig/IMultisig.sol
+++ b/packages/contracts/src/plugins/governance/multisig/IMultisig.sol
@@ -8,11 +8,11 @@ import {IDAO} from "../../../core/dao/IDAO.sol";
/// @author Aragon Association - 2023
/// @notice An interface for an on-chain multisig governance plugin in which a proposal passes if X out of Y approvals are met.
interface IMultisig {
- /// @notice Adds new members to the address list. Previously, it checks if the new addresslist length would be greater than `type(uint16).max`, the maximal number of approvals.
+ /// @notice Adds new members to the address list. Previously, it checks if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals.
/// @param _members The addresses of the members to be added.
function addAddresses(address[] calldata _members) external;
- /// @notice Removes existing members from the address list. Previously, it checks if the new addresslist length is at least as long as the minimum approvals parameter requires. Note that `minApprovals` is must be at least 1 so the address list cannot become empty.
+ /// @notice Removes existing members from the address list. Previously, it checks if the new address list length is at least as long as the minimum approvals parameter requires. Note that `minApprovals` is must be at least 1 so the address list cannot become empty.
/// @param _members The addresses of the members to be removed.
function removeAddresses(address[] calldata _members) external;
diff --git a/packages/contracts/src/plugins/governance/multisig/Multisig.sol b/packages/contracts/src/plugins/governance/multisig/Multisig.sol
index c08416e7b..2f3254153 100644
--- a/packages/contracts/src/plugins/governance/multisig/Multisig.sol
+++ b/packages/contracts/src/plugins/governance/multisig/Multisig.sol
@@ -85,7 +85,7 @@ contract Multisig is
/// @param sender The sender address.
error ProposalCreationForbidden(address sender);
- /// @notice Thrown if a approver is not allowed to cast an approve. This can be because the proposal
+ /// @notice Thrown if an approver is not allowed to cast an approve. This can be because the proposal
/// - is not open,
/// - was executed, or
/// - the approver is not on the address list
@@ -102,7 +102,7 @@ contract Multisig is
/// @param actual The actual value.
error MinApprovalsOutOfBounds(uint16 limit, uint16 actual);
- /// @notice Thrown if the addresslist length is out of bounds.
+ /// @notice Thrown if the address list length is out of bounds.
/// @param limit The limit value.
/// @param actual The actual value.
error AddresslistLengthOutOfBounds(uint16 limit, uint256 actual);
@@ -112,7 +112,7 @@ contract Multisig is
/// @param actual The actual value.
error DateOutOfBounds(uint64 limit, uint64 actual);
- /// @notice Emitted when an proposal is approve by an approver.
+ /// @notice Emitted when a proposal is approve by an approver.
/// @param proposalId The ID of the proposal.
/// @param approver The approver casting the approve.
event Approved(uint256 indexed proposalId, address indexed approver);
diff --git a/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol b/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol
index afc10c108..7201cb7e5 100644
--- a/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol
+++ b/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol
@@ -15,7 +15,7 @@ contract MultisigSetup is PluginSetup {
/// @notice The address of `Multisig` plugin logic contract to be used in creating proxy contracts.
Multisig private immutable multisigBase;
- /// @notice The contract constructor, that deployes the `Multisig` plugin logic contract.
+ /// @notice The contract constructor, that deploys the `Multisig` plugin logic contract.
constructor() {
multisigBase = new Multisig();
}
@@ -42,7 +42,7 @@ contract MultisigSetup is PluginSetup {
memory permissions = new PermissionLib.MultiTargetPermission[](3);
// Set permissions to be granted.
- // Grant the list of prmissions of the plugin to the DAO.
+ // Grant the list of permissions of the plugin to the DAO.
permissions[0] = PermissionLib.MultiTargetPermission(
PermissionLib.Operation.Grant,
plugin,
diff --git a/packages/contracts/src/plugins/token/IMerkleDistributor.sol b/packages/contracts/src/plugins/token/IMerkleDistributor.sol
index 15a266545..0c8177a2e 100644
--- a/packages/contracts/src/plugins/token/IMerkleDistributor.sol
+++ b/packages/contracts/src/plugins/token/IMerkleDistributor.sol
@@ -10,11 +10,11 @@ import {IDAO} from "../../core/dao/IDAO.sol";
interface IMerkleDistributor {
/// @notice Emitted when tokens are claimed from the distributor.
/// @param index The index in the balance tree that was claimed.
- /// @param to The address to which the tokens are send.
+ /// @param to The address to which the tokens are sent.
/// @param amount The claimed amount.
event Claimed(uint256 indexed index, address indexed to, uint256 amount);
- /// @notice The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token to be distributed.
+ /// @notice The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token being distributed.
function token() external returns (IERC20Upgradeable);
/// @notice The merkle root of the balance tree storing the claims.
diff --git a/packages/contracts/src/plugins/token/IMerkleMinter.sol b/packages/contracts/src/plugins/token/IMerkleMinter.sol
index 36f995bdc..d70b48c4b 100644
--- a/packages/contracts/src/plugins/token/IMerkleMinter.sol
+++ b/packages/contracts/src/plugins/token/IMerkleMinter.sol
@@ -23,14 +23,14 @@ interface IMerkleMinter {
bytes context
);
- /// @notice The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token to be distributed.
+ /// @notice The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token being distributed.
function token() external returns (IERC20MintableUpgradeable);
/// @notice The address of the `MerkleDistributor` to clone from.
function distributorBase() external returns (IMerkleDistributor);
- /// @notice changes the base distributor address
- /// @param _distributorBase the address of base distributor
+ /// @notice changes the base distributor address.
+ /// @param _distributorBase The address of the base distributor
function changeDistributorBase(IMerkleDistributor _distributorBase) external;
/// @notice Mints [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens and distributes them using a `MerkleDistributor`.
diff --git a/packages/contracts/src/plugins/token/MerkleDistributor.sol b/packages/contracts/src/plugins/token/MerkleDistributor.sol
index b00057785..9a7da686d 100644
--- a/packages/contracts/src/plugins/token/MerkleDistributor.sol
+++ b/packages/contracts/src/plugins/token/MerkleDistributor.sol
@@ -125,6 +125,6 @@ contract MerkleDistributor is IMerkleDistributor, PluginUUPSUpgradeable {
(1 << claimedBit_index);
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[47] private __gap;
}
diff --git a/packages/contracts/src/plugins/token/MerkleMinter.sol b/packages/contracts/src/plugins/token/MerkleMinter.sol
index fab895902..45744fde4 100644
--- a/packages/contracts/src/plugins/token/MerkleMinter.sol
+++ b/packages/contracts/src/plugins/token/MerkleMinter.sol
@@ -94,6 +94,6 @@ contract MerkleMinter is IMerkleMinter, PluginUUPSUpgradeable {
return IMerkleDistributor(distributorAddr);
}
- /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZepplins guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
+ /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).
uint256[48] private __gap;
}
diff --git a/packages/contracts/src/plugins/utils/Addresslist.sol b/packages/contracts/src/plugins/utils/Addresslist.sol
index 4299caac0..bbc86ad5e 100644
--- a/packages/contracts/src/plugins/utils/Addresslist.sol
+++ b/packages/contracts/src/plugins/utils/Addresslist.sol
@@ -8,7 +8,7 @@ import {_uncheckedAdd, _uncheckedSub} from "../../utils/UncheckedMath.sol";
/// @title Addresslist
/// @author Aragon Association - 2021-2023
-/// @notice The majority voting implementation using an list of member addresses.
+/// @notice The majority voting implementation using a list of member addresses.
/// @dev This contract inherits from `MajorityVotingBase` and implements the `IMajorityVoting` interface.
abstract contract Addresslist {
using CheckpointsUpgradeable for CheckpointsUpgradeable.History;
diff --git a/packages/contracts/src/test/permission/PermissionManagerTest.sol b/packages/contracts/src/test/permission/PermissionManagerTest.sol
index 7da90eb80..029a27cc7 100644
--- a/packages/contracts/src/test/permission/PermissionManagerTest.sol
+++ b/packages/contracts/src/test/permission/PermissionManagerTest.sol
@@ -7,7 +7,7 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../../core/permission/PermissionManager.sol";
contract PermissionManagerTest is PermissionManager {
- // Restricted permissionIds that shouldn't be allowed to grant for who = ANY_ADDR or where = ANY_ADDR
+ // Restricted permissionIds that shouldn't be allowed to grant for who == ANY_ADDR or where == ANY_ADDR
bytes32 public constant TEST_PERMISSION_1_ID = keccak256("TEST_PERMISSION_1");
bytes32 public constant TEST_PERMISSION_2_ID = keccak256("TEST_PERMISSION_2");
diff --git a/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol b/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol
index a2e5d80aa..1323cd8b7 100644
--- a/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol
+++ b/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol
@@ -16,7 +16,7 @@ import {IERC20MintableUpgradeable} from "../IERC20MintableUpgradeable.sol";
/// @title GovernanceERC20
/// @author Aragon Association
-/// @notice An [OpenZepplin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token that can be used for voting and is managed by a DAO.
+/// @notice An [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) compatible [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token that can be used for voting and is managed by a DAO.
contract GovernanceERC20 is
IERC20MintableUpgradeable,
Initializable,
@@ -44,7 +44,7 @@ contract GovernanceERC20 is
/// @notice Calls the initialize function.
/// @param _dao The managing DAO.
/// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
- /// @param _symbol The symbol fo the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
+ /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
/// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.
constructor(
IDAO _dao,
@@ -58,7 +58,7 @@ contract GovernanceERC20 is
/// @notice Initializes the contract and mints tokens to a list of receivers.
/// @param _dao The managing DAO.
/// @param _name The name of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
- /// @param _symbol The symbol fo the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
+ /// @param _symbol The symbol of the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) governance token.
/// @param _mintSettings The token mint settings struct containing the `receivers` and `amounts`.
function initialize(
IDAO _dao,
diff --git a/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol b/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol
index eb6003f07..96501c749 100644
--- a/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol
+++ b/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol
@@ -18,11 +18,11 @@ import {IGovernanceWrappedERC20} from "./IGovernanceWrappedERC20.sol";
/// @title GovernanceWrappedERC20
/// @author Aragon Association
-/// @notice Wraps an existing [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token by inheriting from `ERC20WrapperUpgradeable` and allows to use it for voting by inheriting from `ERC20VotesUpgradeable`. The latter is compatible with [OpenZepplin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) interface.
+/// @notice Wraps an existing [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token by inheriting from `ERC20WrapperUpgradeable` and allows to use it for voting by inheriting from `ERC20VotesUpgradeable`. The latter is compatible with [OpenZeppelin's `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) interface.
/// The contract also supports meta transactions. To use an `amount` of underlying tokens for voting, the token owner has to
/// 1. call `approve` for the tokens to be used by this contract
/// 2. call `depositFor` to wrap them, which safely transfers the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens to the contract and mints wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens.
-/// To get the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens back, the owner of the wrapped tokens can call `withdrawFor`, which burns the wrapped tokens [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens and safely transfers the underlying tokens back to the owner.
+/// To get the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens back, the owner of the wrapped tokens can call `withdrawFor`, which burns the wrapped [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens and safely transfers the underlying tokens back to the owner.
/// @dev This contract intentionally has no public mint functionality because this is the responsibility of the underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token contract.
contract GovernanceWrappedERC20 is
IGovernanceWrappedERC20,
@@ -34,7 +34,7 @@ contract GovernanceWrappedERC20 is
/// @notice Calls the initialize function.
/// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.
/// @param _name The name of the wrapped token.
- /// @param _symbol The symbol fo the wrapped token.
+ /// @param _symbol The symbol of the wrapped token.
constructor(IERC20Upgradeable _token, string memory _name, string memory _symbol) {
initialize(_token, _name, _symbol);
}
@@ -42,7 +42,7 @@ contract GovernanceWrappedERC20 is
/// @notice Initializes the contract.
/// @param _token The underlying [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token.
/// @param _name The name of the wrapped token.
- /// @param _symbol The symbol fo the wrapped token.
+ /// @param _symbol The symbol of the wrapped token.
function initialize(
IERC20Upgradeable _token,
string memory _name,
diff --git a/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol b/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol
index 9fc0e47fb..22febe664 100644
--- a/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol
+++ b/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol
@@ -7,13 +7,13 @@ import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/
import {ERC20WrapperUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol";
interface IGovernanceWrappedERC20 {
- /// @notice Deposits an amount of underlying token and mints the corresponding number of wrapped tokens for an receiving address.
+ /// @notice Deposits an amount of underlying token and mints the corresponding number of wrapped tokens for a receiving address.
/// @param account The address receiving the minted, wrapped tokens.
- /// @param amount The amount of tokens to be minted.
+ /// @param amount The amount of tokens to deposit.
function depositFor(address account, uint256 amount) external returns (bool);
- /// @notice Withdraws an amount of underlying tokens to an receiving address and burns the corresponding number of wrapped tokens.
+ /// @notice Withdraws an amount of underlying tokens to a receiving address and burns the corresponding number of wrapped tokens.
/// @param account The address receiving the withdrawn, underlying tokens.
- /// @param amount The amount of underlying tokens to be withdrawn.
+ /// @param amount The amount of underlying tokens to withdraw.
function withdrawTo(address account, uint256 amount) external returns (bool);
}
diff --git a/packages/contracts/src/utils/Proxy.sol b/packages/contracts/src/utils/Proxy.sol
index 1e8090215..45d7ccb12 100644
--- a/packages/contracts/src/utils/Proxy.sol
+++ b/packages/contracts/src/utils/Proxy.sol
@@ -8,7 +8,7 @@ import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
/// @param _logic The base contract address.
/// @param _data The constructor arguments for this contract.
/// @return The address of the proxy contract created.
-/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it’s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZepplin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).
+/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it’s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).
function createERC1967Proxy(address _logic, bytes memory _data) returns (address) {
return address(new ERC1967Proxy(_logic, _data));
}
diff --git a/packages/contracts/src/utils/UncheckedMath.sol b/packages/contracts/src/utils/UncheckedMath.sol
index 524578cfe..4f4eeb5dd 100644
--- a/packages/contracts/src/utils/UncheckedMath.sol
+++ b/packages/contracts/src/utils/UncheckedMath.sol
@@ -12,7 +12,7 @@ function _uncheckedIncrement(uint256 i) pure returns (uint256) {
return i;
}
-/// @notice Add two unsigned integers without checking the result for overflow errors (using safe math).
+/// @notice Adds two unsigned integers without checking the result for overflow errors (using safe math).
/// @param a The first summand.
/// @param b The second summand.
/// @return The sum.
diff --git a/packages/contracts/test/core/permission/permission-manager.ts b/packages/contracts/test/core/permission/permission-manager.ts
index 6e6fd1b4f..17b4e03be 100644
--- a/packages/contracts/test/core/permission/permission-manager.ts
+++ b/packages/contracts/test/core/permission/permission-manager.ts
@@ -93,13 +93,13 @@ describe('Core: PermissionManager', function () {
expect(permission).to.be.equal(ALLOW_FLAG);
});
- it('reverts if both `_who = ANY_ADDR` and `_where == ANY_ADDR', async () => {
+ it('reverts if both `_who == ANY_ADDR` and `_where == ANY_ADDR', async () => {
await expect(
pm.grant(ANY_ADDR, ANY_ADDR, ROOT_PERMISSION_ID)
).to.be.revertedWithCustomError(pm, 'AnyAddressDisallowedForWhoAndWhere');
});
- it('reverts if permissionId is restricted and `_who = ANY_ADDR` or `_where = ANY_ADDR`', async () => {
+ it('reverts if permissionId is restricted and `_who == ANY_ADDR` or `_where == ANY_ADDR`', async () => {
for (let i = 0; i < RESTRICTED_PERMISSIONS_FOR_ANY_ADDR.length; i++) {
await expect(
pm.grant(pm.address, ANY_ADDR, RESTRICTED_PERMISSIONS_FOR_ANY_ADDR[i])
@@ -116,7 +116,7 @@ describe('Core: PermissionManager', function () {
}
});
- it('reverts if permissionId is not restricted and`_who = ANY_ADDR` or `_where = ANY_ADDR` and condition is not present', async () => {
+ it('reverts if permissionId is not restricted and`_who == ANY_ADDR` or `_where == ANY_ADDR` and condition is not present', async () => {
await expect(
pm.grant(pm.address, ANY_ADDR, ADMIN_PERMISSION_ID)
).to.be.revertedWithCustomError(pm, 'ConditionNotPresentForAnyAddress');
@@ -188,7 +188,7 @@ describe('Core: PermissionManager', function () {
).to.emit(pm, 'Granted');
});
- it('should emit Granted when condition is present and `who = ANY_ADDR` or `where = ANY_ADDR`', async () => {
+ it('should emit Granted when condition is present and `who == ANY_ADDR` or `where == ANY_ADDR`', async () => {
await expect(
pm.grantWithCondition(
pm.address,
@@ -255,7 +255,7 @@ describe('Core: PermissionManager', function () {
);
});
- it('should revert when condition is not present for `who = ANY_ADDR` or `where = ANY_ADDR` and permissionId is not restricted', async () => {
+ it('should revert when condition is not present for `who == ANY_ADDR` or `where == ANY_ADDR` and permissionId is not restricted', async () => {
await expect(
pm.grantWithCondition(
pm.address,
diff --git a/packages/subgraph/src/utils/constants.ts b/packages/subgraph/src/utils/constants.ts
index d122f0c63..c3479202d 100644
--- a/packages/subgraph/src/utils/constants.ts
+++ b/packages/subgraph/src/utils/constants.ts
@@ -1,6 +1,6 @@
export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000';
-// AS do not support initializing Map with data, a chain of sets is used instead
+// AS does not support initializing Map with data, a chain of sets is used instead
export const VOTER_OPTIONS = new Map()
.set(0, 'None')
.set(1, 'Abstain')