From 3b1b4935db8c8576647bd064bf9c9c2f8724721e Mon Sep 17 00:00:00 2001 From: Skima Harvey <64636974+skimaharvey@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:57:37 +0000 Subject: [PATCH 1/3] refactor: index selector over value in Executed event (#246) --- docs/ERC-725.md | 8 ++++---- implementations/constants.js | 8 ++++---- implementations/contracts/interfaces/IERC725X.sol | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/ERC-725.md b/docs/ERC-725.md index 45788246..a300bb3d 100644 --- a/docs/ERC-725.md +++ b/docs/ERC-725.md @@ -139,7 +139,7 @@ _Returns:_ `bytes[]` , array list of returned data of the called function, or th #### Executed ```solidity -event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 data); +event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector); ``` MUST be triggered when `execute` creates a new call using the `operationType` `0`, `3`, `4`. @@ -147,7 +147,7 @@ MUST be triggered when `execute` creates a new call using the `operationType` `0 #### ContractCreated ```solidity -event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt); +event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt); ``` MUST be triggered when `execute` creates a new contract using the `operationType` `1`, `2`. @@ -283,8 +283,8 @@ When using the operation type `4` for `delegatecall`, it is important to conside pragma solidity >=0.5.0 <0.7.0; interface IERC725X /* is ERC165, ERC173 */ { - event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt); - event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 data); + event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt); + event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector); function execute(uint256 operationType, address target, uint256 value, bytes memory data) external payable returns(bytes memory); diff --git a/implementations/constants.js b/implementations/constants.js index f0c2cac5..5edb6d2b 100644 --- a/implementations/constants.js +++ b/implementations/constants.js @@ -73,8 +73,8 @@ const EventSignatures = { * event ContractCreated( * uint256 indexed _operation, * address indexed _contractAddress, - * uint256 indexed _value - * bytes32 _salt + * uint256 _value + * bytes32 indexed _salt * ); * * signature = keccak256('ContractCreated(uint256,address,uint256,bytes32)') @@ -84,8 +84,8 @@ const EventSignatures = { * event Executed( * uint256 indexed _operation, * address indexed _to, - * uint256 indexed _value, - * bytes4 _data + * uint256 _value, + * bytes4 indexed _selector * ); * * signature = keccak256('Executed(uint256,address,uint256,bytes4)') diff --git a/implementations/contracts/interfaces/IERC725X.sol b/implementations/contracts/interfaces/IERC725X.sol index a65a9d27..e21b27c8 100644 --- a/implementations/contracts/interfaces/IERC725X.sol +++ b/implementations/contracts/interfaces/IERC725X.sol @@ -23,8 +23,8 @@ interface IERC725X is IERC165 { event ContractCreated( uint256 indexed operationType, address indexed contractAddress, - uint256 indexed value, - bytes32 salt + uint256 value, + bytes32 indexed salt ); /** @@ -38,8 +38,8 @@ interface IERC725X is IERC165 { event Executed( uint256 indexed operationType, address indexed target, - uint256 indexed value, - bytes4 selector + uint256 value, + bytes4 indexed selector ); /** From 2c984bfe4c71971d8af79682e23cfcd9e8e1e880 Mon Sep 17 00:00:00 2001 From: YamenMerhi Date: Mon, 27 Nov 2023 18:18:45 +0200 Subject: [PATCH 2/3] chore: prepare release 6.1.0 --- implementations/CHANGELOG.md | 7 +++++++ implementations/package-lock.json | 4 ++-- implementations/package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/implementations/CHANGELOG.md b/implementations/CHANGELOG.md index babfc387..042ee631 100644 --- a/implementations/CHANGELOG.md +++ b/implementations/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [6.1.0](https://github.com/ERC725Alliance/ERC725/compare/v6.0.0...v6.1.0) (2023-11-27) + +### Refactor + +- Update `Executed` event in ERC725X to index `selector` instead of `value` ([#246](https://github.com/ERC725Alliance/ERC725/pull/246)) +- Update `ContractCreated` event in ERC725X to index `salt` instead of `value` ([#246](https://github.com/ERC725Alliance/ERC725/pull/246)) + ## [6.0.0](https://github.com/ERC725Alliance/ERC725/compare/v5.2.0...v6.0.0) (2023-10-10) ### ⚠ BREAKING CHANGES diff --git a/implementations/package-lock.json b/implementations/package-lock.json index f9fcfb0a..3aa39ba8 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -1,12 +1,12 @@ { "name": "@erc725/smart-contracts", - "version": "6.0.0", + "version": "6.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@erc725/smart-contracts", - "version": "6.0.0", + "version": "6.1.0", "license": "Apache-2.0", "dependencies": { "@openzeppelin/contracts": "^4.9.3", diff --git a/implementations/package.json b/implementations/package.json index 471467e5..9814ff86 100644 --- a/implementations/package.json +++ b/implementations/package.json @@ -1,6 +1,6 @@ { "name": "@erc725/smart-contracts", - "version": "6.0.0", + "version": "6.1.0", "description": "ERC725 contract implementations", "homepage": "https://erc725alliance.org", "repository": { From efdb5d514f53f5c3a45928e725b27cbbff36fe5a Mon Sep 17 00:00:00 2001 From: YamenMerhi Date: Mon, 27 Nov 2023 18:46:16 +0200 Subject: [PATCH 3/3] build: bump version to 7.0.0 --- implementations/CHANGELOG.md | 4 +++- implementations/package-lock.json | 4 ++-- implementations/package.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/implementations/CHANGELOG.md b/implementations/CHANGELOG.md index 042ee631..688c0fb9 100644 --- a/implementations/CHANGELOG.md +++ b/implementations/CHANGELOG.md @@ -2,7 +2,9 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## [6.1.0](https://github.com/ERC725Alliance/ERC725/compare/v6.0.0...v6.1.0) (2023-11-27) +## [7.0.0](https://github.com/ERC725Alliance/ERC725/compare/v6.0.0...v7.0.0) (2023-11-27) + +### ⚠ BREAKING CHANGES ### Refactor diff --git a/implementations/package-lock.json b/implementations/package-lock.json index 3aa39ba8..e9da63bd 100644 --- a/implementations/package-lock.json +++ b/implementations/package-lock.json @@ -1,12 +1,12 @@ { "name": "@erc725/smart-contracts", - "version": "6.1.0", + "version": "7.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@erc725/smart-contracts", - "version": "6.1.0", + "version": "7.0.0", "license": "Apache-2.0", "dependencies": { "@openzeppelin/contracts": "^4.9.3", diff --git a/implementations/package.json b/implementations/package.json index 9814ff86..5f58a3f2 100644 --- a/implementations/package.json +++ b/implementations/package.json @@ -1,6 +1,6 @@ { "name": "@erc725/smart-contracts", - "version": "6.1.0", + "version": "7.0.0", "description": "ERC725 contract implementations", "homepage": "https://erc725alliance.org", "repository": {