diff --git a/README.md b/README.md index 246739e..58c2539 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ There's an optional feature, where a predefined address can execute the actions ### Emitting content and managing subspaces 1. When a proposal regarding the space is passed, the `MainVotingPlugin` will call `execute()` on the DAO -2. The actions from the proposal will target the `processGeoProposal()`, `acceptSubspace()` or `removeSubspace()` functions on the `SpacePlugin`. +2. The actions from the proposal will target the `publishEdits()`, `acceptSubspace()` or `removeSubspace()` functions on the `SpacePlugin`. 3. The `SpacePlugin` will be called by the DAO and emit the corresponding events 4. An external indexer will fetch all these events and update the current state of this specific space @@ -256,7 +256,7 @@ This plugin is upgradeable. ```solidity function initialize(IDAO _dao, string _firstBlockContentUri, address predecessorSpace); -function processGeoProposal(uint32 _blockIndex, uint32 _itemIndex, string _contentUri); +function publishEdits(uint32 _blockIndex, uint32 _itemIndex, string _contentUri); function acceptSubspace(address _dao); @@ -282,7 +282,7 @@ function implementation() returns (address); #### Events ```solidity -event GeoProposalProcessed(uint32 blockIndex, uint32 itemIndex, string contentUri); +event EditsPublished(uint32 blockIndex, uint32 itemIndex, string contentUri); event SuccessorSpaceCreated(address predecessorSpace); event SubspaceAccepted(address dao); event SubspaceRemoved(address dao); @@ -290,7 +290,7 @@ event SubspaceRemoved(address dao); #### Permissions -- The DAO can call `processGeoProposal()` on the plugin +- The DAO can call `publishEdits()` on the plugin - The DAO can accept/remove a subspace on the plugin - The DAO can upgrade the plugin - See [Plugin upgrader](#plugin-upgrader) (optional) diff --git a/packages/contracts/src/common.sol b/packages/contracts/src/common.sol deleted file mode 100644 index a1f8fe8..0000000 --- a/packages/contracts/src/common.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later - -pragma solidity ^0.8.8; - -/// @notice Contains the content required to invoke processGeoProposal on the SpacePlugin -/// @param blockIndex The block of content to target -/// @param itemIndex The item within the block to target -/// @param contentUri The IPFS URI where the content is pinned -struct ProposalContentItem { - uint32 blockIndex; - uint32 itemIndex; - string contentUri; -} diff --git a/packages/contracts/src/governance/MainVotingPlugin.sol b/packages/contracts/src/governance/MainVotingPlugin.sol index c7ba0fd..5de1083 100644 --- a/packages/contracts/src/governance/MainVotingPlugin.sol +++ b/packages/contracts/src/governance/MainVotingPlugin.sol @@ -11,12 +11,11 @@ import {IMembers} from "./base/IMembers.sol"; import {IEditors} from "./base/IEditors.sol"; import {Addresslist} from "./base/Addresslist.sol"; import {SpacePlugin} from "../space/SpacePlugin.sol"; -import {ProposalContentItem} from "../common.sol"; // The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract. bytes4 constant MAIN_SPACE_VOTING_INTERFACE_ID = MainVotingPlugin.initialize.selector ^ MainVotingPlugin.createProposal.selector ^ - MainVotingPlugin.proposeData.selector ^ + MainVotingPlugin.proposeEdits.selector ^ MainVotingPlugin.proposeAcceptSubspace.selector ^ MainVotingPlugin.proposeRemoveSubspace.selector ^ MainVotingPlugin.addEditor.selector ^ @@ -64,8 +63,8 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers error EmptyContent(); modifier onlyMembers() { - if (!isMember(_msgSender())) { - revert NotAMember(_msgSender()); + if (!isMember(msg.sender)) { + revert NotAMember(msg.sender); } _; } @@ -172,7 +171,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers uint64 _startDate = block.timestamp.toUint64(); proposalId = _createProposal({ - _creator: _msgSender(), + _creator: msg.sender, _metadata: _metadata, _startDate: _startDate, _endDate: _startDate + duration(), @@ -192,7 +191,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers totalVotingPower(snapshotBlock), minParticipation() ); - proposalCreators[proposalId] = _msgSender(); + proposalCreators[proposalId] = msg.sender; // Reduce costs if (_allowFailureMap != 0) { @@ -212,13 +211,10 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers } /// @notice Creates and executes a proposal that makes the DAO emit new content on the given space. - /// @param _proposalContentItem A list with the content changes to emit + /// @param _contentUri The URI of the IPFS content to publish /// @param _spacePlugin The address of the space plugin where changes will be executed - function proposeData( - ProposalContentItem[] calldata _proposalContentItem, - address _spacePlugin - ) public onlyMembers { - if (_proposalContentItem.length == 0 || _spacePlugin == address(0)) { + function proposeEdits(string memory _contentUri, address _spacePlugin) public onlyMembers { + if (_spacePlugin == address(0)) { revert EmptyContent(); } @@ -242,26 +238,15 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers totalVotingPower(snapshotBlock), minParticipation() ); - for (uint256 i; i < _proposalContentItem.length; ) { - IDAO.Action memory _action = IDAO.Action({ + proposal_.actions.push( + IDAO.Action({ to: _spacePlugin, value: 0, - data: abi.encodeCall( - SpacePlugin.processGeoProposal, - ( - _proposalContentItem[i].blockIndex, - _proposalContentItem[i].itemIndex, - _proposalContentItem[i].contentUri - ) - ) - }); - proposal_.actions.push(_action); - unchecked { - ++i; - } - } + data: abi.encodeCall(SpacePlugin.publishEdits, (_contentUri)) + }) + ); - proposalCreators[proposalId] = _msgSender(); + proposalCreators[proposalId] = msg.sender; emit ProposalCreated({ proposalId: proposalId, @@ -308,7 +293,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers }); proposal_.actions.push(_action); - proposalCreators[proposalId] = _msgSender(); + proposalCreators[proposalId] = msg.sender; emit ProposalCreated({ proposalId: proposalId, @@ -360,7 +345,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers }); proposal_.actions.push(_action); - proposalCreators[proposalId] = _msgSender(); + proposalCreators[proposalId] = msg.sender; emit ProposalCreated({ proposalId: proposalId, @@ -418,7 +403,7 @@ contract MainVotingPlugin is Addresslist, MajorityVotingBase, IEditors, IMembers /// @notice Cancels the given proposal. It can only be called by the creator and the proposal must have not ended. function cancelProposal(uint256 _proposalId) external { - if (proposalCreators[_proposalId] != _msgSender()) { + if (proposalCreators[_proposalId] != msg.sender) { revert OnlyCreatorCanCancel(); } Proposal storage proposal_ = proposals[_proposalId]; diff --git a/packages/contracts/src/governance/MemberAccessPlugin.sol b/packages/contracts/src/governance/MemberAccessPlugin.sol index 6b52d0f..a0a03b3 100644 --- a/packages/contracts/src/governance/MemberAccessPlugin.sol +++ b/packages/contracts/src/governance/MemberAccessPlugin.sol @@ -174,7 +174,7 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade // Revert if the settings have been changed in the same block as this proposal should be created in. // This prevents a malicious party from voting with previous addresses and the new settings. if (lastMultisigSettingsChange > snapshotBlock) { - revert ProposalCreationForbidden(_msgSender()); + revert ProposalCreationForbidden(msg.sender); } uint64 _startDate = block.timestamp.toUint64(); @@ -184,7 +184,7 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade emit ProposalCreated({ proposalId: proposalId, - creator: _msgSender(), + creator: msg.sender, metadata: _metadata, startDate: _startDate, endDate: _endDate, @@ -206,7 +206,7 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade } } - if (isEditor(_msgSender())) { + if (isEditor(msg.sender)) { if (multisigSettings.mainVotingPlugin.addresslistLength() < 2) { proposal_.parameters.minApprovals = MIN_APPROVALS_WHEN_CREATED_BY_SINGLE_EDITOR; } else { @@ -271,9 +271,8 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade /// @inheritdoc IMultisig /// @dev The second parameter is left empty to keep compatibility with the existing multisig interface function approve(uint256 _proposalId) public { - address sender = _msgSender(); - if (!_canApprove(_proposalId, sender)) { - revert ApprovalCastForbidden(_proposalId, sender); + if (!_canApprove(_proposalId, msg.sender)) { + revert ApprovalCastForbidden(_proposalId, msg.sender); } Proposal storage proposal_ = proposals[_proposalId]; @@ -284,9 +283,9 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade proposal_.approvals += 1; } - proposal_.approvers[sender] = true; + proposal_.approvers[msg.sender] = true; - emit Approved({proposalId: _proposalId, editor: sender}); + emit Approved({proposalId: _proposalId, editor: msg.sender}); if (_canExecute(_proposalId)) { _execute(_proposalId); @@ -295,9 +294,8 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade /// @notice Rejects the given proposal immediately. function reject(uint256 _proposalId) public { - address sender = _msgSender(); - if (!_canApprove(_proposalId, sender)) { - revert ApprovalCastForbidden(_proposalId, sender); + if (!_canApprove(_proposalId, msg.sender)) { + revert ApprovalCastForbidden(_proposalId, msg.sender); } Proposal storage proposal_ = proposals[_proposalId]; @@ -305,7 +303,7 @@ contract MemberAccessPlugin is IMultisig, PluginUUPSUpgradeable, ProposalUpgrade // Prevent any further approvals, expire it proposal_.parameters.endDate = block.timestamp.toUint64(); - emit Rejected({proposalId: _proposalId, editor: sender}); + emit Rejected({proposalId: _proposalId, editor: msg.sender}); } /// @inheritdoc IMultisig diff --git a/packages/contracts/src/governance/base/MajorityVotingBase.sol b/packages/contracts/src/governance/base/MajorityVotingBase.sol index be9301c..49d6b93 100644 --- a/packages/contracts/src/governance/base/MajorityVotingBase.sol +++ b/packages/contracts/src/governance/base/MajorityVotingBase.sol @@ -262,16 +262,14 @@ abstract contract MajorityVotingBase is VoteOption _voteOption, bool _tryEarlyExecution ) public virtual { - address account = _msgSender(); - - if (!_canVote(_proposalId, account, _voteOption)) { + if (!_canVote(_proposalId, msg.sender, _voteOption)) { revert VoteCastForbidden({ proposalId: _proposalId, - account: account, + account: msg.sender, voteOption: _voteOption }); } - _vote(_proposalId, _voteOption, account, _tryEarlyExecution); + _vote(_proposalId, _voteOption, msg.sender, _tryEarlyExecution); } /// @inheritdoc IMajorityVoting diff --git a/packages/contracts/src/personal/PersonalSpaceAdminPlugin.sol b/packages/contracts/src/personal/PersonalSpaceAdminPlugin.sol index 83df7d3..27492cf 100644 --- a/packages/contracts/src/personal/PersonalSpaceAdminPlugin.sol +++ b/packages/contracts/src/personal/PersonalSpaceAdminPlugin.sol @@ -8,7 +8,6 @@ import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; import {PermissionManager} from "@aragon/osx/core/permission/PermissionManager.sol"; import {SpacePlugin} from "../space/SpacePlugin.sol"; import {EDITOR_PERMISSION_ID, MEMBER_PERMISSION_ID} from "../constants.sol"; -import {ProposalContentItem} from "../common.sol"; /// @title PersonalSpaceAdminPlugin /// @author Aragon - 2023 @@ -22,7 +21,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { this.isMember.selector ^ this.isEditor.selector ^ this.executeProposal.selector ^ - this.submitData.selector ^ + this.submitEdits.selector ^ this.submitAcceptSubspace.selector ^ this.submitRemoveSubspace.selector ^ this.submitNewMember.selector ^ @@ -71,7 +70,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { uint64 _currentTimestamp64 = block.timestamp.toUint64(); uint256 _proposalId = _createProposal({ - _creator: _msgSender(), + _creator: msg.sender, _metadata: _metadata, _startDate: _currentTimestamp64, _endDate: _currentTimestamp64, @@ -82,30 +81,18 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { } /// @notice Creates and executes a proposal that makes the DAO emit new content on the given space. - /// @param _proposalContentItems A list with the content changes to emit + /// @param _contentUri The URI of the IPFS content to publish /// @param _spacePlugin The address of the space plugin where changes will be executed - function submitData( - ProposalContentItem[] calldata _proposalContentItems, + function submitEdits( + string memory _contentUri, address _spacePlugin ) public auth(MEMBER_PERMISSION_ID) { - IDAO.Action[] memory _actions = new IDAO.Action[](_proposalContentItems.length); - - for (uint i = 0; i < _proposalContentItems.length; ) { - _actions[i].to = _spacePlugin; - _actions[i].data = abi.encodeCall( - SpacePlugin.processGeoProposal, - ( - _proposalContentItems[i].blockIndex, - _proposalContentItems[i].itemIndex, - _proposalContentItems[i].contentUri - ) - ); - unchecked { - i++; - } - } - - uint256 _proposalId = _createProposal(_msgSender(), _actions); + IDAO.Action[] memory _actions = new IDAO.Action[](1); + + _actions[0].to = _spacePlugin; + _actions[0].data = abi.encodeCall(SpacePlugin.publishEdits, (_contentUri)); + + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -121,7 +108,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { _actions[0].to = _spacePlugin; _actions[0].data = abi.encodeCall(SpacePlugin.acceptSubspace, (address(_subspaceDao))); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -137,7 +124,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { _actions[0].to = _spacePlugin; _actions[0].data = abi.encodeCall(SpacePlugin.removeSubspace, (address(_subspaceDao))); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -152,7 +139,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { (address(this), _newMember, MEMBER_PERMISSION_ID) ); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -167,7 +154,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { (address(this), _member, MEMBER_PERMISSION_ID) ); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -182,7 +169,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { (address(this), _newEditor, EDITOR_PERMISSION_ID) ); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } @@ -197,7 +184,7 @@ contract PersonalSpaceAdminPlugin is PluginCloneable, ProposalUpgradeable { (address(this), _editor, EDITOR_PERMISSION_ID) ); - uint256 _proposalId = _createProposal(_msgSender(), _actions); + uint256 _proposalId = _createProposal(msg.sender, _actions); dao().execute(bytes32(_proposalId), _actions, 0); } diff --git a/packages/contracts/src/space/SpacePlugin.sol b/packages/contracts/src/space/SpacePlugin.sol index 36cceae..d3a049c 100644 --- a/packages/contracts/src/space/SpacePlugin.sol +++ b/packages/contracts/src/space/SpacePlugin.sol @@ -5,7 +5,7 @@ import {IDAO, PluginUUPSUpgradeable} from "@aragon/osx/core/plugin/PluginUUPSUpg import {CONTENT_PERMISSION_ID, SUBSPACE_PERMISSION_ID} from "../constants.sol"; bytes4 constant SPACE_INTERFACE_ID = SpacePlugin.initialize.selector ^ - SpacePlugin.processGeoProposal.selector ^ + SpacePlugin.publishEdits.selector ^ SpacePlugin.acceptSubspace.selector ^ SpacePlugin.removeSubspace.selector; @@ -14,10 +14,8 @@ bytes4 constant SPACE_INTERFACE_ID = SpacePlugin.initialize.selector ^ contract SpacePlugin is PluginUUPSUpgradeable { /// @notice Emitted when the contents of a space change. /// @param dao The address of the DAO where this proposal was executed. - /// @param blockIndex The index of the block whose items have new contents. - /// @param itemIndex The index of the item that has new contents. /// @param contentUri An IPFS URI pointing to the new contents behind the block's item. - event GeoProposalProcessed(address dao, uint32 blockIndex, uint32 itemIndex, string contentUri); + event EditsPublished(address dao, string contentUri); /// @notice Announces that the current space plugin is the successor of an already existing Space /// @param predecessorSpace The address of the space contract that the plugin will replace @@ -35,11 +33,11 @@ contract SpacePlugin is PluginUUPSUpgradeable { /// @notice Initializes the plugin when build 1 is installed. /// @param _dao The address of the DAO to read the permissions from. - /// @param _firstBlockContentUri A IPFS URI pointing to the contents of the first block's item (title). + /// @param _firstContentUri A IPFS URI pointing to the contents of the first block's item (title). /// @param _predecessorSpace Optionally, the address of the space contract preceding this one function initialize( IDAO _dao, - string memory _firstBlockContentUri, + string memory _firstContentUri, address _predecessorSpace ) external initializer { __PluginUUPSUpgradeable_init(_dao); @@ -47,12 +45,7 @@ contract SpacePlugin is PluginUUPSUpgradeable { if (_predecessorSpace != address(0)) { emit SuccessorSpaceCreated(_predecessorSpace); } - emit GeoProposalProcessed({ - dao: address(dao()), - blockIndex: 0, - itemIndex: 0, - contentUri: _firstBlockContentUri - }); + emit EditsPublished({dao: address(dao()), contentUri: _firstContentUri}); } /// @notice Checks if this or the parent contract supports an interface by its ID. @@ -65,20 +58,9 @@ contract SpacePlugin is PluginUUPSUpgradeable { } /// @notice Emits an event with new contents for the given block index. Caller needs CONTENT_PERMISSION. - /// @param _blockIndex The index of the block whose items have new contents. - /// @param _itemIndex The index of the item that has new contents. /// @param _contentUri An IPFS URI pointing to the new contents behind the block's item. - function processGeoProposal( - uint32 _blockIndex, - uint32 _itemIndex, - string memory _contentUri - ) external auth(CONTENT_PERMISSION_ID) { - emit GeoProposalProcessed({ - dao: address(dao()), - blockIndex: _blockIndex, - itemIndex: _itemIndex, - contentUri: _contentUri - }); + function publishEdits(string memory _contentUri) external auth(CONTENT_PERMISSION_ID) { + emit EditsPublished({dao: address(dao()), contentUri: _contentUri}); } /// @notice Emits an event accepting another DAO as a subspace. Caller needs CONTENT_PERMISSION. diff --git a/packages/contracts/test/unit-testing/personal-space-admin-plugin.ts b/packages/contracts/test/unit-testing/personal-space-admin-plugin.ts index ed5783e..1822e96 100644 --- a/packages/contracts/test/unit-testing/personal-space-admin-plugin.ts +++ b/packages/contracts/test/unit-testing/personal-space-admin-plugin.ts @@ -228,8 +228,8 @@ describe('Personal Space Admin Plugin', function () { it('Executed content proposals emit an event', async () => { // Encode an action to change some content const data = SpacePlugin__factory.createInterface().encodeFunctionData( - 'processGeoProposal', - [1, 2, '0x'] + 'publishEdits', + ['0x'] ); const actions = [ { @@ -258,8 +258,8 @@ describe('Personal Space Admin Plugin', function () { .connect(alice) .executeProposal('0x', actions, 0) ) - .to.emit(spacePlugin, 'GeoProposalProcessed') - .withArgs(1, 2, '0x'); + .to.emit(spacePlugin, 'EditsPublished') + .withArgs('0x'); }); it('Approved subspaces emit an event', async () => { diff --git a/packages/contracts/test/unit-testing/space-plugin.ts b/packages/contracts/test/unit-testing/space-plugin.ts index 7f4d156..b352399 100644 --- a/packages/contracts/test/unit-testing/space-plugin.ts +++ b/packages/contracts/test/unit-testing/space-plugin.ts @@ -70,8 +70,8 @@ describe('Space Plugin', function () { ADDRESS_ZERO ) ) - .to.emit(spacePlugin, 'GeoProposalProcessed') - .withArgs(dao.address, 0, 0, defaultInput.contentUri); + .to.emit(spacePlugin, 'EditsPublished') + .withArgs(dao.address, defaultInput.contentUri); }); it('Should emit a successor space event', async () => { @@ -109,7 +109,7 @@ describe('Space Plugin', function () { it('The Space plugin emits an event when new content is published', async () => { // Fails by default - await expect(spacePlugin.connect(alice).processGeoProposal(1, 2, 'hello')) + await expect(spacePlugin.connect(alice).publishEdits('hello')) .to.be.revertedWithCustomError(spacePlugin, 'DaoUnauthorized') .withArgs( dao.address, @@ -122,9 +122,9 @@ describe('Space Plugin', function () { await dao.grant(spacePlugin.address, alice.address, CONTENT_PERMISSION_ID); // Set content - await expect(spacePlugin.connect(alice).processGeoProposal(1, 2, 'hello')) - .to.emit(spacePlugin, 'GeoProposalProcessed') - .withArgs(dao.address, 1, 2, 'hello'); + await expect(spacePlugin.connect(alice).publishEdits('hello')) + .to.emit(spacePlugin, 'EditsPublished') + .withArgs(dao.address, 'hello'); }); it('The Space plugin emits an event when a subspace is accepted', async () => { @@ -185,17 +185,12 @@ describe('Space Plugin', function () { it('Only the DAO can emit content on the space plugin', async () => { // They cannot await expect( - spacePlugin - .connect(alice) - .processGeoProposal(1, 2, toHex('ipfs://1234')) + spacePlugin.connect(alice).publishEdits(toHex('ipfs://1234')) ).to.be.reverted; + await expect(spacePlugin.connect(bob).publishEdits(toHex('ipfs://1234'))) + .to.be.reverted; await expect( - spacePlugin.connect(bob).processGeoProposal(1, 2, toHex('ipfs://1234')) - ).to.be.reverted; - await expect( - spacePlugin - .connect(carol) - .processGeoProposal(1, 2, toHex('ipfs://1234')) + spacePlugin.connect(carol).publishEdits(toHex('ipfs://1234')) ).to.be.reverted; // The DAO can @@ -204,15 +199,15 @@ describe('Space Plugin', function () { to: spacePlugin.address, value: 0, data: SpacePlugin__factory.createInterface().encodeFunctionData( - 'processGeoProposal', - [1, 2, toHex('ipfs://1234')] + 'publishEdits', + [toHex('ipfs://1234')] ), }, ]; await expect(dao.execute(ZERO_BYTES32, actions, 0)) - .to.emit(spacePlugin, 'GeoProposalProcessed') - .withArgs(dao.address, 1, 2, toHex('ipfs://1234')); + .to.emit(spacePlugin, 'EditsPublished') + .withArgs(dao.address, toHex('ipfs://1234')); }); it('Only the DAO can accept subspaces', async () => {