Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 1.2 new changes #18

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open

Build 1.2 new changes #18

wants to merge 14 commits into from

Conversation

novaknole
Copy link

The PR introduces the several changes:

  • ADMIN_INTERFACE_ID changed as it no longer includes the initialize's selector.
  • Adheres to the new changes brought by osx-commons's IProposal.
  • Adheres to the new changes brought by PluginCloneable - i.e allowing targets to be set with either call or delegatecall operation types.
  • Note that plugin setup at the time of installation doesn't grant SET_TARGET_CONFIG_PERMISSION_ID to the dao to reduce gas costs. Most of the time, admin needs its target to be dao and stay that way.

Comment on lines 78 to 79
Action[] calldata _actions,
bytes memory _metadata
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for multisig
aragon#19 (comment)

@@ -20,8 +22,7 @@ contract Admin is IMembership, PluginCloneable, ProposalUpgradeable {
using SafeCastUpgradeable for uint256;

/// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract.
bytes4 internal constant ADMIN_INTERFACE_ID =
this.initialize.selector ^ this.executeProposal.selector;
bytes4 internal constant ADMIN_INTERFACE_ID = this.executeProposal.selector;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for multisig
aragon#19 (review)

This interface is now deprecated

}

/// @inheritdoc IProposal
/// @dev Admin doesn't allow creating a proposal, so we return empty string.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this applicable?

@@ -67,19 +118,33 @@ contract Admin is IMembership, PluginCloneable, ProposalUpgradeable {
// of 0 requires every action to not revert.
function executeProposal(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function executeProposal(
/// @dev This function is deprecated, as createProposal achieves the same effect
function executeProposal(

Comment on lines 42 to 45
(address admin, PluginCloneable.TargetConfig memory targetConfig) = abi.decode(
_data,
(address, PluginCloneable.TargetConfig)
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 33 to +38
/// @dev This method is required to support [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167).
function initialize(IDAO _dao) external initializer {
function initialize(IDAO _dao, TargetConfig calldata _targetConfig) external initializer {
__PluginCloneable_init(_dao);

_setTargetConfig(_targetConfig);

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use reintializer(n) here, and then create another function for initializing from other versions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admin is non-upgradeable but cloneable, so no..

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants