Skip to content

Commit

Permalink
Use private instead of immutable in ERC2771Context (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jul 6, 2021
1 parent 15b92e4 commit 23b3807
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
2 changes: 1 addition & 1 deletion contracts/metatx/ERC2771Context.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 23b3807

Please sign in to comment.