ソースを参照

Update recommended Foundry remapping (#4468)

Co-authored-by: ernestognw <ernestognw@gmail.com>
Eric Lau 2 年 前
コミット
f347b410cf
2 ファイル変更10 行追加6 行削除
  1. 1 1
      README.md
  2. 9 5
      scripts/upgradeable/upgradeable.patch

+ 1 - 1
README.md

@@ -41,7 +41,7 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con
 $ forge install OpenZeppelin/openzeppelin-contracts
 ```
 
-Add `@openzeppelin/=lib/openzeppelin-contracts/` in `remappings.txt.` 
+Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt.` 
 
 ### Usage
 

+ 9 - 5
scripts/upgradeable/upgradeable.patch

@@ -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 27627f43..e42a66e8 100644
+index 38197f3a..bc934d1c 100644
 --- a/README.md
 +++ b/README.md
 @@ -19,6 +19,9 @@
@@ -81,7 +81,7 @@ index 27627f43..e42a66e8 100644
  ```
  
  OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version.
-@@ -38,7 +41,7 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con
+@@ -38,10 +41,10 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con
  > **Warning** Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
  
  ```
@@ -89,8 +89,12 @@ index 27627f43..e42a66e8 100644
 +$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable
  ```
  
+-Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt.` 
++Add `@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/` in `remappings.txt.` 
+ 
  ### Usage
-@@ -48,10 +51,11 @@ Once installed, you can use the contracts in the library by importing them:
+ 
+@@ -50,10 +53,11 @@ Once installed, you can use the contracts in the library by importing them:
  ```solidity
  pragma solidity ^0.8.19;
  
@@ -126,7 +130,7 @@ index df141192..1cf90ad1 100644
    "keywords": [
      "solidity",
 diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol
-index 36f076e5..90c1db78 100644
+index 3800804a..90c1db78 100644
 --- a/contracts/utils/cryptography/EIP712.sol
 +++ b/contracts/utils/cryptography/EIP712.sol
 @@ -4,7 +4,6 @@
@@ -293,7 +297,7 @@ index 36f076e5..90c1db78 100644
      }
  }
 diff --git a/package.json b/package.json
-index 9eae6732..b3a56366 100644
+index ffa868ac..e254d962 100644
 --- a/package.json
 +++ b/package.json
 @@ -33,7 +33,7 @@