Use explicit imports (#4399)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
Francisco
2023-06-29 17:12:26 -03:00
committed by GitHub
parent d6a8b2ccd7
commit 874c2d3c02
176 changed files with 428 additions and 379 deletions

View File

@ -59,7 +59,7 @@ index ff596b0c..00000000
-<!-- Make sure that you have reviewed the OpenZeppelin Contracts Contributor Guidelines. -->
-<!-- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CONTRIBUTING.md -->
diff --git a/README.md b/README.md
index 9d1c405b..c264e29c 100644
index 27627f43..e42a66e8 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,9 @@
@ -94,8 +94,8 @@ index 9d1c405b..c264e29c 100644
```solidity
pragma solidity ^0.8.19;
-import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
+import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
-import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
+import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
-contract MyCollectible is ERC721 {
- constructor() ERC721("MyCollectible", "MCO") {
@ -106,10 +106,10 @@ index 9d1c405b..c264e29c 100644
}
```
diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol
index ebdf0a33..8888803e 100644
index f776a7ca..d7a7e0b0 100644
--- a/contracts/finance/VestingWallet.sol
+++ b/contracts/finance/VestingWallet.sol
@@ -18,6 +18,8 @@ import "../utils/Context.sol";
@@ -19,6 +19,8 @@ import {Context} from "../utils/Context.sol";
*
* By setting the duration to 0, one can configure this contract to behave like an asset timelock that hold tokens for
* a beneficiary until a specified time.
@ -119,10 +119,10 @@ index ebdf0a33..8888803e 100644
contract VestingWallet is Context {
event EtherReleased(uint256 amount);
diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol
index 5d8318f4..ef3cde55 100644
index bb14d7fd..0785ebbd 100644
--- a/contracts/governance/extensions/GovernorVotes.sol
+++ b/contracts/governance/extensions/GovernorVotes.sol
@@ -10,6 +10,8 @@ import "../../interfaces/IERC5805.sol";
@@ -12,6 +12,8 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
* @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token.
*
* _Available since v4.3._
@ -152,10 +152,10 @@ index df141192..1cf90ad1 100644
"keywords": [
"solidity",
diff --git a/contracts/token/ERC20/extensions/ERC20Capped.sol b/contracts/token/ERC20/extensions/ERC20Capped.sol
index 41e9ce5c..1d910dfa 100644
index 98ec7144..4992115b 100644
--- a/contracts/token/ERC20/extensions/ERC20Capped.sol
+++ b/contracts/token/ERC20/extensions/ERC20Capped.sol
@@ -7,6 +7,8 @@ import "../ERC20.sol";
@@ -7,6 +7,8 @@ import {ERC20} from "../ERC20.sol";
/**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
@ -165,10 +165,10 @@ index 41e9ce5c..1d910dfa 100644
abstract contract ERC20Capped is ERC20 {
uint256 private immutable _cap;
diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol
index 4378eb7c..1da9e731 100644
index 8778f4ba..825d4e16 100644
--- a/contracts/token/ERC20/extensions/ERC20Permit.sol
+++ b/contracts/token/ERC20/extensions/ERC20Permit.sol
@@ -18,6 +18,8 @@ import "../../../utils/Nonces.sol";
@@ -18,6 +18,8 @@ import {Nonces} from "../../../utils/Nonces.sol";
* need to send a transaction, and thus is not required to hold Ether at all.
*
* _Available since v3.4._
@ -178,10 +178,10 @@ index 4378eb7c..1da9e731 100644
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
// solhint-disable-next-line var-name-mixedcase
diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol
index 389965e9..66436b14 100644
index 2cbff622..97f43d7a 100644
--- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol
+++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol
@@ -14,6 +14,8 @@ import "../utils/SafeERC20.sol";
@@ -14,6 +14,8 @@ import {SafeERC20} from "../utils/SafeERC20.sol";
* wrapping of an existing "basic" ERC20 into a governance token.
*
* _Available since v4.2._
@ -191,18 +191,18 @@ index 389965e9..66436b14 100644
abstract contract ERC20Wrapper is ERC20 {
IERC20 private immutable _underlying;
diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol
index 2628014f..7d5193c8 100644
index d94e956a..86bb5713 100644
--- a/contracts/utils/cryptography/EIP712.sol
+++ b/contracts/utils/cryptography/EIP712.sol
@@ -4,7 +4,6 @@
pragma solidity ^0.8.19;
import "./ECDSA.sol";
-import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";
import {ECDSA} from "./ECDSA.sol";
-import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";
/**
@@ -30,27 +29,19 @@ import "../../interfaces/IERC5267.sol";
@@ -30,27 +29,19 @@ import {IERC5267} from "../../interfaces/IERC5267.sol";
*
* _Available since v3.4._
*
@ -361,7 +361,7 @@ index 2628014f..7d5193c8 100644
}
}
diff --git a/package.json b/package.json
index 37e8f871..d098669f 100644
index 9eae6732..b3a56366 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@