From 5dc8d1766c94c0a63b19821b05b7e4c4af1bd738 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 27 Jun 2022 16:03:30 +0200 Subject: [PATCH 1/3] fix: use new address-to-string function for _checkRole Signed-off-by: Pascal Marco Caversaccio --- contracts/access/AccessControl.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/access/AccessControl.sol b/contracts/access/AccessControl.sol index 2103be9144b..642d3a3b1d1 100644 --- a/contracts/access/AccessControl.sol +++ b/contracts/access/AccessControl.sol @@ -110,7 +110,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { string( abi.encodePacked( "AccessControl: account ", - Strings.toHexString(uint160(account), 20), + Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) From 14c3c57d1f4e3b81a3f8bead19f6a04761191b69 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 27 Jun 2022 16:17:18 +0200 Subject: [PATCH 2/3] changelog entry Signed-off-by: Pascal Marco Caversaccio --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ee50f71f81..01c162f536f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * `PaymentSplitter`: add `releasable` getters. ([#3350](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3350)) * `Initializable`: refactored implementation of modifiers for easier understanding. ([#3450](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3450)) * `Proxies`: remove runtime check of ERC1967 storage slots. ([#3455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3455)) + * `AccessControl`: refactor address-to-hex-string conversion in `_checkRole` function. ([#3509](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3509)) ### Breaking changes From a82e2a0066204ed708a41ef256866b0ca6b199df Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 27 Jun 2022 17:36:38 -0300 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c162f536f..1ee50f71f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ * `PaymentSplitter`: add `releasable` getters. ([#3350](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3350)) * `Initializable`: refactored implementation of modifiers for easier understanding. ([#3450](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3450)) * `Proxies`: remove runtime check of ERC1967 storage slots. ([#3455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3455)) - * `AccessControl`: refactor address-to-hex-string conversion in `_checkRole` function. ([#3509](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3509)) ### Breaking changes