Unverified Commit 23b3807e by Hadrien Croubois Committed by GitHub

Use private instead of immutable in ERC2771Context (#2754)

parent 15b92e40
# Changelog # 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) ## 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)) * `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))
......
...@@ -8,7 +8,7 @@ import "../utils/Context.sol"; ...@@ -8,7 +8,7 @@ import "../utils/Context.sol";
* @dev Context variant with ERC2771 support. * @dev Context variant with ERC2771 support.
*/ */
abstract contract ERC2771Context is Context { abstract contract ERC2771Context is Context {
address immutable _trustedForwarder; address private _trustedForwarder;
constructor(address trustedForwarder) { constructor(address trustedForwarder) {
_trustedForwarder = trustedForwarder; _trustedForwarder = trustedForwarder;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment