Skip to content

Commit f05ea3d

Browse files
committed
Minimize changes to upgradeable-patch
1 parent 1b16790 commit f05ea3d

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

scripts/upgradeable/upgradeable.patch

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
22
deleted file mode 100644
3-
index 35ad097f..00000000
3+
index 35ad097ff..000000000
44
--- a/.github/ISSUE_TEMPLATE/bug_report.md
55
+++ /dev/null
66
@@ -1,21 +0,0 @@
@@ -26,7 +26,7 @@ index 35ad097f..00000000
2626
-
2727
-<!-- We will be able to better help if you provide a minimal example that triggers the bug. -->
2828
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
29-
index 4018cef2..d343a53d 100644
29+
index 4018cef29..d343a53d8 100644
3030
--- a/.github/ISSUE_TEMPLATE/config.yml
3131
+++ b/.github/ISSUE_TEMPLATE/config.yml
3232
@@ -1,4 +1,8 @@
@@ -40,7 +40,7 @@ index 4018cef2..d343a53d 100644
4040
about: Ask in the OpenZeppelin Forum
4141
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
4242
deleted file mode 100644
43-
index ff596b0c..00000000
43+
index ff596b0c3..000000000
4444
--- a/.github/ISSUE_TEMPLATE/feature_request.md
4545
+++ /dev/null
4646
@@ -1,14 +0,0 @@
@@ -59,48 +59,48 @@ index ff596b0c..00000000
5959
-<!-- Make sure that you have reviewed the OpenZeppelin Contracts Contributor Guidelines. -->
6060
-<!-- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CONTRIBUTING.md -->
6161
diff --git a/README.md b/README.md
62-
index 60d0a430..0e4f91a6 100644
62+
index 60d0a430a..0e4f91a6d 100644
6363
--- a/README.md
6464
+++ b/README.md
6565
@@ -19,6 +19,9 @@
6666
> [!IMPORTANT]
6767
> OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility).
68-
68+
6969
++> [!NOTE]
7070
++> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/upgradeable).
7171
++
7272
## Overview
73-
73+
7474
### Installation
7575
@@ -26,7 +29,7 @@
7676
#### Hardhat (npm)
77-
77+
7878
```
7979
-$ npm install @openzeppelin/contracts
8080
+$ npm install @openzeppelin/contracts-upgradeable
8181
```
82-
82+
8383
#### Foundry (git)
8484
@@ -38,10 +41,10 @@ $ npm install @openzeppelin/contracts
8585
> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
86-
86+
8787
```
8888
-$ forge install OpenZeppelin/openzeppelin-contracts
8989
+$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable
9090
```
91-
91+
9292
-Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt.`
9393
+Add `@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/` in `remappings.txt.`
94-
94+
9595
### Usage
96-
96+
9797
@@ -50,10 +53,11 @@ Once installed, you can use the contracts in the library by importing them:
9898
```solidity
9999
pragma solidity ^0.8.20;
100-
100+
101101
-import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
102102
+import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
103-
103+
104104
-contract MyCollectible is ERC721 {
105105
- constructor() ERC721("MyCollectible", "MCO") {
106106
+contract MyCollectible is ERC721Upgradeable {
@@ -110,7 +110,7 @@ index 60d0a430..0e4f91a6 100644
110110
}
111111
```
112112
diff --git a/contracts/package.json b/contracts/package.json
113-
index 70ae73bc..ef659873 100644
113+
index 70ae73bc2..ef659873f 100644
114114
--- a/contracts/package.json
115115
+++ b/contracts/package.json
116116
@@ -1,5 +1,5 @@
@@ -140,16 +140,16 @@ index 70ae73bc..ef659873 100644
140140
+ }
141141
}
142142
diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol
143-
index c39954e3..fe681f87 100644
143+
index c39954e35..fe681f87a 100644
144144
--- a/contracts/utils/cryptography/EIP712.sol
145145
+++ b/contracts/utils/cryptography/EIP712.sol
146146
@@ -4,7 +4,6 @@
147147
pragma solidity ^0.8.20;
148-
148+
149149
import {MessageHashUtils} from "./MessageHashUtils.sol";
150150
-import {ShortStrings, ShortString} from "../ShortStrings.sol";
151151
import {IERC5267} from "../../interfaces/IERC5267.sol";
152-
152+
153153
/**
154154
@@ -25,33 +24,20 @@ import {IERC5267} from "../../interfaces/IERC5267.sol";
155155
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
@@ -168,7 +168,7 @@ index c39954e3..fe681f87 100644
168168
-
169169
bytes32 private constant TYPE_HASH =
170170
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
171-
171+
172172
- // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
173173
- // invalidate the cached domain separator if the chain id changes.
174174
- bytes32 private immutable _cachedDomainSeparator;
@@ -179,7 +179,7 @@ index c39954e3..fe681f87 100644
179179
bytes32 private immutable _hashedName;
180180
+ /// @custom:oz-renamed-from _HASHED_VERSION
181181
bytes32 private immutable _hashedVersion;
182-
182+
183183
- ShortString private immutable _name;
184184
- ShortString private immutable _version;
185185
- // slither-disable-next-line constable-states
@@ -188,7 +188,7 @@ index c39954e3..fe681f87 100644
188188
- string private _versionFallback;
189189
+ string private _name;
190190
+ string private _version;
191-
191+
192192
/**
193193
* @dev Initializes the domain separator and parameter caches.
194194
@@ -66,29 +52,23 @@ abstract contract EIP712 is IERC5267 {
@@ -210,7 +210,7 @@ index c39954e3..fe681f87 100644
210210
+ _hashedName = 0;
211211
+ _hashedVersion = 0;
212212
}
213-
213+
214214
/**
215215
* @dev Returns the domain separator for the current chain.
216216
*/
@@ -222,12 +222,12 @@ index c39954e3..fe681f87 100644
222222
- }
223223
+ return _buildDomainSeparator();
224224
}
225-
225+
226226
function _buildDomainSeparator() private view returns (bytes32) {
227227
- return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
228228
+ return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));
229229
}
230-
230+
231231
/**
232232
@@ -125,6 +105,10 @@ abstract contract EIP712 is IERC5267 {
233233
uint256[] memory extensions
@@ -255,7 +255,7 @@ index c39954e3..fe681f87 100644
255255
+ function _EIP712Name() internal view virtual returns (string memory) {
256256
+ return _name;
257257
}
258-
258+
259259
/**
260260
* @dev The version parameter for the EIP712 domain.
261261
*
@@ -314,7 +314,7 @@ index c39954e3..fe681f87 100644
314314
}
315315
}
316316
diff --git a/package.json b/package.json
317-
index eeeaf0bc..65581c54 100644
317+
index eeeaf0bcd..65581c544 100644
318318
--- a/package.json
319319
+++ b/package.json
320320
@@ -34,7 +34,7 @@
@@ -327,15 +327,15 @@ index eeeaf0bc..65581c54 100644
327327
"keywords": [
328328
"solidity",
329329
diff --git a/remappings.txt b/remappings.txt
330-
index 304d1386..a1cd63be 100644
330+
index 304d1386a..a1cd63bee 100644
331331
--- a/remappings.txt
332332
+++ b/remappings.txt
333333
@@ -1 +1,2 @@
334334
-@openzeppelin/contracts/=contracts/
335335
+@openzeppelin/contracts-upgradeable/=contracts/
336336
+@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
337337
diff --git a/test/utils/cryptography/EIP712.test.js b/test/utils/cryptography/EIP712.test.js
338-
index 2b6e7fa9..268e0d29 100644
338+
index 2b6e7fa97..268e0d29d 100644
339339
--- a/test/utils/cryptography/EIP712.test.js
340340
+++ b/test/utils/cryptography/EIP712.test.js
341341
@@ -47,27 +47,6 @@ describe('EIP712', function () {
@@ -364,5 +364,5 @@ index 2b6e7fa9..268e0d29 100644
364364
- });
365365
- }
366366
});
367-
367+
368368
it('hash digest', async function () {

0 commit comments

Comments
 (0)