Skip to content

Commit e2bcd07

Browse files
Transpile e64bfd9
1 parent da834e3 commit e2bcd07

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 4.7.2
4+
5+
* `LibArbitrumL2`, `CrossChainEnabledArbitrumL2`: Fixed detection of cross-chain calls for EOAs. Previously, calls from EOAs would be classified as cross-chain calls. ([#3578](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3578))
6+
37
## 4.7.1 (2022-07-19)
48

59
* `SignatureChecker`: Fix an issue that causes `isValidSignatureNow` to revert when the target contract returns ill-encoded data. ([#3552](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552))

contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library LibArbitrumL2Upgradeable {
2121
address public constant ARBSYS = 0x0000000000000000000000000000000000000064;
2222

2323
function isCrossChain(address arbsys) internal view returns (bool) {
24-
return ArbitrumL2_Bridge(arbsys).isTopLevelCall();
24+
return ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased();
2525
}
2626

2727
/**
@@ -35,9 +35,6 @@ library LibArbitrumL2Upgradeable {
3535
function crossChainSender(address arbsys) internal view returns (address) {
3636
if (!isCrossChain(arbsys)) revert NotCrossChainCall();
3737

38-
return
39-
ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased()
40-
? ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing()
41-
: msg.sender;
38+
return ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing();
4239
}
4340
}

contracts/governance/GovernorUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC1
126126
/**
127127
* @dev See {IGovernor-hashProposal}.
128128
*
129-
* The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array
129+
* The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array
130130
* and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id
131131
* can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in
132132
* advance, before the proposal is submitted.

contracts/governance/IGovernorUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ abstract contract IGovernorUpgradeable is Initializable, IERC165Upgradeable {
147147
/**
148148
* @notice module:user-config
149149
* @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to
150-
* leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.
150+
* leave time for users to buy voting power, or delegate it, before the voting of a proposal starts.
151151
*/
152152
function votingDelay() public view virtual returns (uint256);
153153

contracts/mocks/crosschain/bridgesUpgradeable.sol

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,10 @@ contract BridgeArbitrumL2MockUpgradeable is Initializable, BaseRelayMockUpgradea
136136

137137
function __BridgeArbitrumL2Mock_init_unchained() internal onlyInitializing {
138138
}
139-
function isTopLevelCall() public view returns (bool) {
139+
function wasMyCallersAddressAliased() public view returns (bool) {
140140
return _currentSender != address(0);
141141
}
142142

143-
function wasMyCallersAddressAliased() public pure returns (bool) {
144-
return true;
145-
}
146-
147143
function myCallersAddressWithoutAliasing() public view returns (address) {
148144
return _currentSender;
149145
}

0 commit comments

Comments
 (0)