Skip to content

Commit 6b9807b

Browse files
Transpile ec1fcdd
1 parent 366f3da commit 6b9807b

File tree

62 files changed

+448
-342
lines changed

Some content is hidden

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

62 files changed

+448
-342
lines changed

CHANGELOG.md

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

3-
## 4.7.0
3+
## 4.7.0 (2022-06-29)
44

55
* `TimelockController`: Migrate `_call` to `_execute` and allow inheritance and overriding similar to `Governor`. ([#3317](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3317))
66
* `CrossChainEnabledPolygonChild`: replace the `require` statement with the custom error `NotCrossChainCall`. ([#3380](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3380))
77
* `ERC20FlashMint`: Add customizable flash fee receiver. ([#3327](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3327))
8-
* `ERC20TokenizedVault`: add an extension of `ERC20` that implements the ERC4626 Tokenized Vault Standard. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
8+
* `ERC4626`: add an extension of `ERC20` that implements the ERC4626 Tokenized Vault Standard. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
99
* `SafeERC20`: add `safePermit` as mitigation against phantom permit functions. ([#3280](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3280))
1010
* `Math`: add a `mulDiv` function that can round the result either up or down. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
1111
* `Math`: Add a `sqrt` function to compute square roots of integers, rounding either up or down. ([#3242](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3242))

contracts/access/AccessControlUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (access/AccessControl.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/access/OwnableUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (access/Ownable.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/amb/CrossChainEnabledAMB.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/amb/LibAMBUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/amb/LibAMB.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/LibArbitrumL1.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/LibArbitrumL1.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/LibArbitrumL2.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/LibArbitrumL2.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/optimism/CrossChainEnabledOptimism.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/optimism/LibOptimismUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/optimism/LibOptimism.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol)
33

44
pragma solidity ^0.8.4;
55

contracts/finance/PaymentSplitterUpgradeable.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (finance/PaymentSplitter.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol)
33

44
pragma solidity ^0.8.0;
55

@@ -15,7 +15,8 @@ import "../proxy/utils/Initializable.sol";
1515
*
1616
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
1717
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
18-
* an amount proportional to the percentage of total shares they were assigned.
18+
* an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
19+
* time of contract deployment and can't be updated thereafter.
1920
*
2021
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
2122
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}

contracts/finance/VestingWalletUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (finance/VestingWallet.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (finance/VestingWallet.sol)
33
pragma solidity ^0.8.0;
44

55
import "../token/ERC20/utils/SafeERC20Upgradeable.sol";

contracts/governance/GovernorUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/Governor.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (governance/Governor.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/governance/IGovernorUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/IGovernor.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (governance/IGovernor.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/governance/TimelockControllerUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/TimelockController.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (governance/TimelockController.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/interfaces/IERC3156FlashBorrowerUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (interfaces/IERC3156FlashBorrower.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/interfaces/IERC4626Upgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (interfaces/IERC4626.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/metatx/ERC2771ContextUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (metatx/ERC2771Context.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (metatx/ERC2771Context.sol)
33

44
pragma solidity ^0.8.9;
55

contracts/metatx/MinimalForwarderUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (metatx/MinimalForwarder.sol)
2+
// OpenZeppelin Contracts (last updated v4.7.0) (metatx/MinimalForwarder.sol)
33

44
pragma solidity ^0.8.0;
55

contracts/mocks/ERC20TokenizedVaultMockUpgradeable.sol renamed to contracts/mocks/ERC4626MockUpgradeable.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
pragma solidity ^0.8.0;
44

5-
import "../token/ERC20/extensions/ERC20TokenizedVaultUpgradeable.sol";
5+
import "../token/ERC20/extensions/ERC4626Upgradeable.sol";
66
import "../proxy/utils/Initializable.sol";
77

88
// mock class using ERC20
9-
contract ERC20TokenizedVaultMockUpgradeable is Initializable, ERC20TokenizedVaultUpgradeable {
10-
function __ERC20TokenizedVaultMock_init(
9+
contract ERC4626MockUpgradeable is Initializable, ERC4626Upgradeable {
10+
function __ERC4626Mock_init(
1111
IERC20MetadataUpgradeable asset,
1212
string memory name,
1313
string memory symbol
1414
) internal onlyInitializing {
1515
__ERC20_init_unchained(name, symbol);
16-
__ERC20TokenizedVault_init_unchained(asset);
16+
__ERC4626_init_unchained(asset);
1717
}
1818

19-
function __ERC20TokenizedVaultMock_init_unchained(
19+
function __ERC4626Mock_init_unchained(
2020
IERC20MetadataUpgradeable,
2121
string memory,
2222
string memory

contracts/mocks/MerkleProofWrapperUpgradeable.sol

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,37 @@ contract MerkleProofWrapperUpgradeable is Initializable {
3636
}
3737

3838
function multiProofVerify(
39+
bytes32[] memory proofs,
40+
bool[] memory proofFlag,
41+
bytes32 root,
42+
bytes32[] memory leaves
43+
) public pure returns (bool) {
44+
return MerkleProofUpgradeable.multiProofVerify(proofs, proofFlag, root, leaves);
45+
}
46+
47+
function multiProofVerifyCalldata(
3948
bytes32[] calldata proofs,
4049
bool[] calldata proofFlag,
4150
bytes32 root,
42-
bytes32[] calldata leaves
51+
bytes32[] memory leaves
4352
) public pure returns (bool) {
44-
return MerkleProofUpgradeable.multiProofVerify(proofs, proofFlag, root, leaves);
53+
return MerkleProofUpgradeable.multiProofVerifyCalldata(proofs, proofFlag, root, leaves);
4554
}
4655

4756
function processMultiProof(
57+
bytes32[] memory proofs,
58+
bool[] memory proofFlag,
59+
bytes32[] memory leaves
60+
) public pure returns (bytes32) {
61+
return MerkleProofUpgradeable.processMultiProof(proofs, proofFlag, leaves);
62+
}
63+
64+
function processMultiProofCalldata(
4865
bytes32[] calldata proofs,
4966
bool[] calldata proofFlag,
50-
bytes32[] calldata leaves
67+
bytes32[] memory leaves
5168
) public pure returns (bytes32) {
52-
return MerkleProofUpgradeable.processMultiProof(proofs, proofFlag, leaves);
69+
return MerkleProofUpgradeable.processMultiProofCalldata(proofs, proofFlag, leaves);
5370
}
5471

5572
/**

0 commit comments

Comments
 (0)