From a55fabc405982b07b91d5e665f49d9754f6d830f Mon Sep 17 00:00:00 2001 From: sudo rm -rf --no-preserve-root / Date: Thu, 23 Jan 2025 18:20:07 +0100 Subject: [PATCH] Remove Unnecessary Initialisation of `_paused` (#5448) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto GarcĂ­a --- .changeset/green-drinks-report.md | 5 +++++ contracts/utils/Pausable.sol | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 .changeset/green-drinks-report.md diff --git a/.changeset/green-drinks-report.md b/.changeset/green-drinks-report.md new file mode 100644 index 000000000..983062cbb --- /dev/null +++ b/.changeset/green-drinks-report.md @@ -0,0 +1,5 @@ +--- +"openzeppelin-solidity": minor +--- + +`Pausable`: Stop explicitly setting `paused` to `false` during construction. diff --git a/contracts/utils/Pausable.sol b/contracts/utils/Pausable.sol index 312f1cb90..ffeab759f 100644 --- a/contracts/utils/Pausable.sol +++ b/contracts/utils/Pausable.sol @@ -37,13 +37,6 @@ abstract contract Pausable is Context { */ error ExpectedPause(); - /** - * @dev Initializes the contract in unpaused state. - */ - constructor() { - _paused = false; - } - /** * @dev Modifier to make a function callable only when the contract is not paused. *