Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to upgrade the access control mechanism in various smart contracts and update dependencies in the
package.json
file. The most important changes include replacingAccessControl
withAccessControlUpgradeable
in multiple contracts and updating the OpenZeppelin contracts version.Use AccessControlUpgradeable (or similar *Upgradeable contracts) for upgradeable contracts to ensure compatibility and proper initialization. Using AccessControl in an upgradeable context will result in uninitialized state, potential security risks, and failure to follow upgradeability patterns.
Access Control Upgrades:
contracts/AgentRewardV2.sol
: ReplacedAccessControl
withAccessControlUpgradeable
to allow for upgradeable access control. [1] [2]contracts/AgentRewardV3.sol
: Updated to useAccessControlUpgradeable
instead ofAccessControl
. [1] [2]contracts/virtualPersona/AgentFactory.sol
: Switched fromAccessControl
toAccessControlUpgradeable
for upgradeable access control. [1] [2]contracts/virtualPersona/AgentFactoryV3.sol
: Changed to useAccessControlUpgradeable
in place ofAccessControl
. [1] [2]contracts/virtualPersona/AgentFactoryV4.sol
: Modified to useAccessControlUpgradeable
instead ofAccessControl
. [1] [2]Dependency Updates:
package.json
: Updated@openzeppelin/contracts
to version5.1.0
and@openzeppelin/contracts-upgradeable
to version5.1.0
.