diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fad84159..67ae86dcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + + * `ERC2771Context`: use private variable from storage to store the forwarder address. Fixes issues where `_msgSender()` was not callable from constructors. ([#2754](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2754)) + ## 4.2.0 (2021-06-30) * `ERC20Votes`: add a new extension of the `ERC20` token with support for voting snapshots and delegation. ([#2632](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2632)) diff --git a/contracts/metatx/ERC2771Context.sol b/contracts/metatx/ERC2771Context.sol index 78890e494..a6e213239 100644 --- a/contracts/metatx/ERC2771Context.sol +++ b/contracts/metatx/ERC2771Context.sol @@ -8,7 +8,7 @@ import "../utils/Context.sol"; * @dev Context variant with ERC2771 support. */ abstract contract ERC2771Context is Context { - address immutable _trustedForwarder; + address private _trustedForwarder; constructor(address trustedForwarder) { _trustedForwarder = trustedForwarder;