Skip to content

Commit

Permalink
Transpile ec1fcdd
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 30, 2022
1 parent 366f3da commit 6b9807b
Show file tree
Hide file tree
Showing 62 changed files with 448 additions and 342 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Changelog

## 4.7.0
## 4.7.0 (2022-06-29)

* `TimelockController`: Migrate `_call` to `_execute` and allow inheritance and overriding similar to `Governor`. ([#3317](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3317))
* `CrossChainEnabledPolygonChild`: replace the `require` statement with the custom error `NotCrossChainCall`. ([#3380](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3380))
* `ERC20FlashMint`: Add customizable flash fee receiver. ([#3327](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3327))
* `ERC20TokenizedVault`: add an extension of `ERC20` that implements the ERC4626 Tokenized Vault Standard. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
* `ERC4626`: add an extension of `ERC20` that implements the ERC4626 Tokenized Vault Standard. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
* `SafeERC20`: add `safePermit` as mitigation against phantom permit functions. ([#3280](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3280))
* `Math`: add a `mulDiv` function that can round the result either up or down. ([#3171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171))
* `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))
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/AccessControlUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (access/AccessControl.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/access/OwnableUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (access/Ownable.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/amb/CrossChainEnabledAMB.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol)

pragma solidity ^0.8.4;

Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/amb/LibAMBUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/amb/LibAMB.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol)

pragma solidity ^0.8.4;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol)

pragma solidity ^0.8.4;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol)

pragma solidity ^0.8.4;

Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/LibArbitrumL1.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/LibArbitrumL1.sol)

pragma solidity ^0.8.4;

Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/arbitrum/LibArbitrumL2.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/LibArbitrumL2.sol)

pragma solidity ^0.8.4;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/optimism/CrossChainEnabledOptimism.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol)

pragma solidity ^0.8.4;

Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/optimism/LibOptimismUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/optimism/LibOptimism.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol)

pragma solidity ^0.8.4;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol)

pragma solidity ^0.8.4;

Expand Down
5 changes: 3 additions & 2 deletions contracts/finance/PaymentSplitterUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (finance/PaymentSplitter.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

Expand All @@ -15,7 +15,8 @@ import "../proxy/utils/Initializable.sol";
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
* an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
* time of contract deployment and can't be updated thereafter.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
Expand Down
2 changes: 1 addition & 1 deletion contracts/finance/VestingWalletUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (finance/VestingWallet.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (finance/VestingWallet.sol)
pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20Upgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/GovernorUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/Governor.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (governance/Governor.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/IGovernorUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/IGovernor.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (governance/IGovernor.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/TimelockControllerUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (governance/TimelockController.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (governance/TimelockController.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC3156FlashBorrowerUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (interfaces/IERC3156FlashBorrower.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC3156FlashBorrower.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC4626Upgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (interfaces/IERC4626.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/metatx/ERC2771ContextUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (metatx/ERC2771Context.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (metatx/ERC2771Context.sol)

pragma solidity ^0.8.9;

Expand Down
2 changes: 1 addition & 1 deletion contracts/metatx/MinimalForwarderUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0-rc.0) (metatx/MinimalForwarder.sol)
// OpenZeppelin Contracts (last updated v4.7.0) (metatx/MinimalForwarder.sol)

pragma solidity ^0.8.0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

pragma solidity ^0.8.0;

import "../token/ERC20/extensions/ERC20TokenizedVaultUpgradeable.sol";
import "../token/ERC20/extensions/ERC4626Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

// mock class using ERC20
contract ERC20TokenizedVaultMockUpgradeable is Initializable, ERC20TokenizedVaultUpgradeable {
function __ERC20TokenizedVaultMock_init(
contract ERC4626MockUpgradeable is Initializable, ERC4626Upgradeable {
function __ERC4626Mock_init(
IERC20MetadataUpgradeable asset,
string memory name,
string memory symbol
) internal onlyInitializing {
__ERC20_init_unchained(name, symbol);
__ERC20TokenizedVault_init_unchained(asset);
__ERC4626_init_unchained(asset);
}

function __ERC20TokenizedVaultMock_init_unchained(
function __ERC4626Mock_init_unchained(
IERC20MetadataUpgradeable,
string memory,
string memory
Expand Down
25 changes: 21 additions & 4 deletions contracts/mocks/MerkleProofWrapperUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,37 @@ contract MerkleProofWrapperUpgradeable is Initializable {
}

function multiProofVerify(
bytes32[] memory proofs,
bool[] memory proofFlag,
bytes32 root,
bytes32[] memory leaves
) public pure returns (bool) {
return MerkleProofUpgradeable.multiProofVerify(proofs, proofFlag, root, leaves);
}

function multiProofVerifyCalldata(
bytes32[] calldata proofs,
bool[] calldata proofFlag,
bytes32 root,
bytes32[] calldata leaves
bytes32[] memory leaves
) public pure returns (bool) {
return MerkleProofUpgradeable.multiProofVerify(proofs, proofFlag, root, leaves);
return MerkleProofUpgradeable.multiProofVerifyCalldata(proofs, proofFlag, root, leaves);
}

function processMultiProof(
bytes32[] memory proofs,
bool[] memory proofFlag,
bytes32[] memory leaves
) public pure returns (bytes32) {
return MerkleProofUpgradeable.processMultiProof(proofs, proofFlag, leaves);
}

function processMultiProofCalldata(
bytes32[] calldata proofs,
bool[] calldata proofFlag,
bytes32[] calldata leaves
bytes32[] memory leaves
) public pure returns (bytes32) {
return MerkleProofUpgradeable.processMultiProof(proofs, proofFlag, leaves);
return MerkleProofUpgradeable.processMultiProofCalldata(proofs, proofFlag, leaves);
}

/**
Expand Down
Loading

0 comments on commit 6b9807b

Please sign in to comment.