Commit 2924ea3b by github-actions

Transpile a99cff49

parent c923fcf6
......@@ -10,6 +10,7 @@
* `ERC721`: improved revert reason when transferring from wrong owner. ([#2975](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2975))
* `Votes`: Added a base contract for vote tracking with delegation. ([#2944](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2944))
* `ERC721Votes`: Added an extension of ERC721 enabled with vote tracking and delegation. ([#2944](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2944))
* `ERC2771Context`: use immutable storage to store the forwarder address, no longer an issue since Solidity >=0.8.8 allows reading immutable variables in the constructor. ([#2917](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2917))
## 4.4.1 (2021-12-14)
......
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (metatx/ERC2771Context.sol)
pragma solidity ^0.8.0;
pragma solidity ^0.8.9;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
......@@ -10,14 +10,11 @@ import "../proxy/utils/Initializable.sol";
* @dev Context variant with ERC2771 support.
*/
abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable {
address private _trustedForwarder;
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable _trustedForwarder;
function __ERC2771Context_init(address trustedForwarder) internal onlyInitializing {
__Context_init_unchained();
__ERC2771Context_init_unchained(trustedForwarder);
}
/// @custom:oz-upgrades-unsafe-allow constructor
function __ERC2771Context_init_unchained(address trustedForwarder) internal onlyInitializing {
_trustedForwarder = trustedForwarder;
}
......@@ -43,5 +40,5 @@ abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable
return super._msgData();
}
}
uint256[49] private __gap;
uint256[50] private __gap;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.9;
import "./ContextMockUpgradeable.sol";
import "../metatx/ERC2771ContextUpgradeable.sol";
......@@ -11,11 +11,12 @@ contract ERC2771ContextMockUpgradeable is Initializable, ContextMockUpgradeable,
function __ERC2771ContextMock_init(address trustedForwarder) internal onlyInitializing {
__Context_init_unchained();
__ContextMock_init_unchained();
__ERC2771Context_init_unchained(trustedForwarder);
__ERC2771ContextMock_init_unchained(trustedForwarder);
}
function __ERC2771ContextMock_init_unchained(address trustedForwarder) internal onlyInitializing {}
function __ERC2771ContextMock_init_unchained(address trustedForwarder) internal onlyInitializing {
emit Sender(_msgSender()); // _msgSender() should be accessible during construction
}
function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address) {
return ERC2771ContextUpgradeable._msgSender();
......
......@@ -3,7 +3,7 @@
// - COVERAGE: enable coverage report
// - ENABLE_GAS_REPORT: enable gas report
// - COMPILE_MODE: production modes enables optimizations (default: development)
// - COMPILE_VERSION: compiler version (default: 0.8.3)
// - COMPILE_VERSION: compiler version (default: 0.8.9)
// - COINMARKETCAP: coinmarkercat api key for USD value in gas report
const fs = require('fs');
......@@ -33,7 +33,7 @@ const argv = require('yargs/yargs')()
compiler: {
alias: 'compileVersion',
type: 'string',
default: '0.8.3',
default: '0.8.9',
},
coinmarketcap: {
alias: 'coinmarketcapApiKey',
......
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