Skip to content

Commit f55babc

Browse files
Transpile a83918df
1 parent 5bc5999 commit f55babc

File tree

165 files changed

+272
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+272
-195
lines changed

.github/actions/setup/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
steps:
66
- uses: actions/setup-node@v3
77
with:
8-
node-version: 14.x
8+
node-version: 16.x
99
- uses: actions/cache@v3
1010
id: cache
1111
with:

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

33

4+
## 4.9.4 (2023-12-07)
5+
6+
- `ERC2771Context` and `Context`: Introduce a `_contextPrefixLength()` getter, used to trim extra information appended to `msg.data`.
7+
- `Multicall`: Make aware of non-canonical context (i.e. `msg.sender` is not `_msgSender()`), allowing compatibility with `ERC2771Context`.
8+
49
## 4.9.3 (2023-07-28)
510

611
- `ERC2771Context`: Return the forwarder address whenever the `msg.data` of a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. `msg.data.length` is less than 20 bytes), as specified by ERC-2771. ([#4481](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481))

contracts/access/AccessControlCrossChainUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
55

66
import "./AccessControlUpgradeable.sol";
77
import "../crosschain/CrossChainEnabledUpgradeable.sol";
8-
import "../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev An extension to {AccessControl} with support for cross-chain access management.

contracts/access/AccessControlDefaultAdminRulesUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "./AccessControlUpgradeable.sol";
77
import "./IAccessControlDefaultAdminRulesUpgradeable.sol";
88
import "../utils/math/SafeCastUpgradeable.sol";
99
import "../interfaces/IERC5313Upgradeable.sol";
10-
import "../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../proxy/utils/Initializable.sol";
1111

1212
/**
1313
* @dev Extension of {AccessControl} that allows specifying special rules to manage

contracts/access/AccessControlEnumerableUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
66
import "./IAccessControlEnumerableUpgradeable.sol";
77
import "./AccessControlUpgradeable.sol";
88
import "../utils/structs/EnumerableSetUpgradeable.sol";
9-
import "../proxy/utils/Initializable.sol";
9+
import {Initializable} from "../proxy/utils/Initializable.sol";
1010

1111
/**
1212
* @dev Extension of {AccessControl} that allows enumerating the members of each role.

contracts/access/AccessControlUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "./IAccessControlUpgradeable.sol";
77
import "../utils/ContextUpgradeable.sol";
88
import "../utils/StringsUpgradeable.sol";
99
import "../utils/introspection/ERC165Upgradeable.sol";
10-
import "../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../proxy/utils/Initializable.sol";
1111

1212
/**
1313
* @dev Contract module that allows children to implement role-based access

contracts/access/Ownable2StepUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "./OwnableUpgradeable.sol";
7-
import "../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Contract module which provides access control mechanism, where

contracts/access/OwnableUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../utils/ContextUpgradeable.sol";
7-
import "../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Contract module which provides a basic access control mechanism, where

contracts/crosschain/CrossChainEnabledUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.4;
55

66
import "./errorsUpgradeable.sol";
7-
import "../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Provides information for building cross-chain aware contracts. This

contracts/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
55

66
import "../CrossChainEnabledUpgradeable.sol";
77
import "./LibAMBUpgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB]

contracts/crosschain/amb/LibAMBUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pragma solidity ^0.8.4;
55

6-
import { IAMBUpgradeable as AMB_Bridge } from "../../vendor/amb/IAMBUpgradeable.sol";
6+
import {IAMBUpgradeable as AMB_Bridge} from "../../vendor/amb/IAMBUpgradeable.sol";
77
import "../errorsUpgradeable.sol";
88

99
/**

contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
55

66
import "../CrossChainEnabledUpgradeable.sol";
77
import "./LibArbitrumL1Upgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev https://arbitrum.io/[Arbitrum] specialization or the

contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
55

66
import "../CrossChainEnabledUpgradeable.sol";
77
import "./LibArbitrumL2Upgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev https://arbitrum.io/[Arbitrum] specialization or the

contracts/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
pragma solidity ^0.8.4;
55

6-
import { IBridgeUpgradeable as ArbitrumL1_Bridge } from "../../vendor/arbitrum/IBridgeUpgradeable.sol";
7-
import { IOutboxUpgradeable as ArbitrumL1_Outbox } from "../../vendor/arbitrum/IOutboxUpgradeable.sol";
6+
import {IBridgeUpgradeable as ArbitrumL1_Bridge} from "../../vendor/arbitrum/IBridgeUpgradeable.sol";
7+
import {IOutboxUpgradeable as ArbitrumL1_Outbox} from "../../vendor/arbitrum/IOutboxUpgradeable.sol";
88
import "../errorsUpgradeable.sol";
99

1010
/**

contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pragma solidity ^0.8.4;
55

6-
import { IArbSysUpgradeable as ArbitrumL2_Bridge } from "../../vendor/arbitrum/IArbSysUpgradeable.sol";
6+
import {IArbSysUpgradeable as ArbitrumL2_Bridge} from "../../vendor/arbitrum/IArbSysUpgradeable.sol";
77
import "../errorsUpgradeable.sol";
88

99
/**

contracts/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
55

66
import "../CrossChainEnabledUpgradeable.sol";
77
import "./LibOptimismUpgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev https://www.optimism.io/[Optimism] specialization or the

contracts/crosschain/optimism/LibOptimismUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pragma solidity ^0.8.4;
55

6-
import { ICrossDomainMessengerUpgradeable as Optimism_Bridge } from "../../vendor/optimism/ICrossDomainMessengerUpgradeable.sol";
6+
import {ICrossDomainMessengerUpgradeable as Optimism_Bridge} from "../../vendor/optimism/ICrossDomainMessengerUpgradeable.sol";
77
import "../errorsUpgradeable.sol";
88

99
/**

contracts/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "../CrossChainEnabledUpgradeable.sol";
77
import "../../security/ReentrancyGuardUpgradeable.sol";
88
import "../../utils/AddressUpgradeable.sol";
99
import "../../vendor/polygon/IFxMessageProcessorUpgradeable.sol";
10-
import "../../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1111

1212
address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD;
1313

contracts/finance/PaymentSplitterUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
66
import "../token/ERC20/utils/SafeERC20Upgradeable.sol";
77
import "../utils/AddressUpgradeable.sol";
88
import "../utils/ContextUpgradeable.sol";
9-
import "../proxy/utils/Initializable.sol";
9+
import {Initializable} from "../proxy/utils/Initializable.sol";
1010

1111
/**
1212
* @title PaymentSplitter

contracts/finance/VestingWalletUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55
import "../token/ERC20/utils/SafeERC20Upgradeable.sol";
66
import "../utils/AddressUpgradeable.sol";
77
import "../utils/ContextUpgradeable.sol";
8-
import "../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @title VestingWallet

contracts/governance/GovernorUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import "../utils/structs/DoubleEndedQueueUpgradeable.sol";
1313
import "../utils/AddressUpgradeable.sol";
1414
import "../utils/ContextUpgradeable.sol";
1515
import "./IGovernorUpgradeable.sol";
16-
import "../proxy/utils/Initializable.sol";
16+
import {Initializable} from "../proxy/utils/Initializable.sol";
1717

1818
/**
1919
* @dev Core of the governance system, designed to be extended though various modules.

contracts/governance/IGovernorUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55

66
import "../interfaces/IERC165Upgradeable.sol";
77
import "../interfaces/IERC6372Upgradeable.sol";
8-
import "../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev Interface of the {Governor} core.

contracts/governance/TimelockControllerUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
66
import "../access/AccessControlUpgradeable.sol";
77
import "../token/ERC721/IERC721ReceiverUpgradeable.sol";
88
import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol";
9-
import "../proxy/utils/Initializable.sol";
9+
import {Initializable} from "../proxy/utils/Initializable.sol";
1010

1111
/**
1212
* @dev Contract module which acts as a timelocked controller. When set as the

contracts/governance/TimelockControllerWith46MigrationUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "./TimelockControllerUpgradeable.sol";
7-
import "../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Extension of the TimelockController that includes an additional

contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "../../utils/math/SafeCastUpgradeable.sol";
77
import "../extensions/IGovernorTimelockUpgradeable.sol";
88
import "../GovernorUpgradeable.sol";
99
import "./IGovernorCompatibilityBravoUpgradeable.sol";
10-
import "../../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1111

1212
/**
1313
* @dev Compatibility layer that implements GovernorBravo compatibility on top of {Governor}.

contracts/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../IGovernorUpgradeable.sol";
7-
import "../../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.

contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
7-
import "../../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Extension of {Governor} for simple, 3 options, vote counting.

contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
77
import "../../utils/math/MathUpgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev A module that ensures there is a minimum voting period after quorum is reached. This prevents a large voter from

contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
7-
import "../../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance.

contracts/governance/extensions/GovernorSettingsUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
7-
import "../../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Extension of {Governor} for settings updatable through governance.

contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "./IGovernorTimelockUpgradeable.sol";
77
import "../GovernorUpgradeable.sol";
88
import "../../utils/math/SafeCastUpgradeable.sol";
99
import "../../vendor/compound/ICompoundTimelockUpgradeable.sol";
10-
import "../../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1111

1212
/**
1313
* @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by

contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
66
import "./IGovernorTimelockUpgradeable.sol";
77
import "../GovernorUpgradeable.sol";
88
import "../TimelockControllerUpgradeable.sol";
9-
import "../../proxy/utils/Initializable.sol";
9+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1010

1111
/**
1212
* @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a

contracts/governance/extensions/GovernorVotesCompUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
77
import "../../token/ERC20/extensions/ERC20VotesCompUpgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev Extension of {Governor} for voting weight extraction from a Comp token.

contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
66
import "./GovernorVotesUpgradeable.sol";
77
import "../../utils/CheckpointsUpgradeable.sol";
88
import "../../utils/math/SafeCastUpgradeable.sol";
9-
import "../../proxy/utils/Initializable.sol";
9+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1010

1111
/**
1212
* @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a

contracts/governance/extensions/GovernorVotesUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55

66
import "../GovernorUpgradeable.sol";
77
import "../../interfaces/IERC5805Upgradeable.sol";
8-
import "../../proxy/utils/Initializable.sol";
8+
import {Initializable} from "../../proxy/utils/Initializable.sol";
99

1010
/**
1111
* @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token.

contracts/governance/extensions/IGovernorTimelockUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pragma solidity ^0.8.0;
55

66
import "../IGovernorUpgradeable.sol";
7-
import "../../proxy/utils/Initializable.sol";
7+
import {Initializable} from "../../proxy/utils/Initializable.sol";
88

99
/**
1010
* @dev Extension of the {IGovernor} for timelock supporting modules.

contracts/governance/utils/VotesUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "../../utils/ContextUpgradeable.sol";
77
import "../../utils/CountersUpgradeable.sol";
88
import "../../utils/CheckpointsUpgradeable.sol";
99
import "../../utils/cryptography/EIP712Upgradeable.sol";
10-
import "../../proxy/utils/Initializable.sol";
10+
import {Initializable} from "../../proxy/utils/Initializable.sol";
1111

1212
/**
1313
* @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be

0 commit comments

Comments
 (0)