Enable partial transpilation for upgradeable package (#4628)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>pull/4637/head
parent
970a7184ad
commit
58463a9823
@ -0,0 +1,5 @@ |
||||
--- |
||||
'openzeppelin-solidity': major |
||||
--- |
||||
|
||||
Upgradeable Contracts: No longer transpile interfaces, libraries, and stateless contracts. |
@ -0,0 +1,36 @@ |
||||
// SPDX-License-Identifier: MIT |
||||
|
||||
pragma solidity ^0.8.20; |
||||
|
||||
// We keep these imports and a dummy contract just to we can run the test suite after transpilation. |
||||
|
||||
import {Address} from "../utils/Address.sol"; |
||||
import {Arrays} from "../utils/Arrays.sol"; |
||||
import {AuthorityUtils} from "../access/manager/AuthorityUtils.sol"; |
||||
import {Base64} from "../utils/Base64.sol"; |
||||
import {BitMaps} from "../utils/structs/BitMaps.sol"; |
||||
import {Checkpoints} from "../utils/structs/Checkpoints.sol"; |
||||
import {Clones} from "../proxy/Clones.sol"; |
||||
import {Create2} from "../utils/Create2.sol"; |
||||
import {DoubleEndedQueue} from "../utils/structs/DoubleEndedQueue.sol"; |
||||
import {ECDSA} from "../utils/cryptography/ECDSA.sol"; |
||||
import {EnumerableMap} from "../utils/structs/EnumerableMap.sol"; |
||||
import {EnumerableSet} from "../utils/structs/EnumerableSet.sol"; |
||||
import {ERC1155Holder} from "../token/ERC1155/utils/ERC1155Holder.sol"; |
||||
import {ERC165} from "../utils/introspection/ERC165.sol"; |
||||
import {ERC165Checker} from "../utils/introspection/ERC165Checker.sol"; |
||||
import {ERC1967Utils} from "../proxy/ERC1967/ERC1967Utils.sol"; |
||||
import {ERC721Holder} from "../token/ERC721/utils/ERC721Holder.sol"; |
||||
import {Math} from "../utils/math/Math.sol"; |
||||
import {MerkleProof} from "../utils/cryptography/MerkleProof.sol"; |
||||
import {MessageHashUtils} from "../utils/cryptography/MessageHashUtils.sol"; |
||||
import {SafeCast} from "../utils/math/SafeCast.sol"; |
||||
import {SafeERC20} from "../token/ERC20/utils/SafeERC20.sol"; |
||||
import {ShortStrings} from "../utils/ShortStrings.sol"; |
||||
import {SignatureChecker} from "../utils/cryptography/SignatureChecker.sol"; |
||||
import {SignedMath} from "../utils/math/SignedMath.sol"; |
||||
import {StorageSlot} from "../utils/StorageSlot.sol"; |
||||
import {Strings} from "../utils/Strings.sol"; |
||||
import {Time} from "../utils/types/Time.sol"; |
||||
|
||||
contract Dummy1234 {} |
@ -1,15 +0,0 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# cd to the root of the repo |
||||
cd "$(git rev-parse --show-toplevel)" |
||||
|
||||
# avoids re-compilation during publishing of both packages |
||||
if [[ ! -v ALREADY_COMPILED ]]; then |
||||
npm run clean |
||||
npm run prepare |
||||
npm run prepack |
||||
fi |
||||
|
||||
cp README.md contracts/ |
||||
mkdir contracts/build contracts/build/contracts |
||||
cp -r build/contracts/*.json contracts/build/contracts |
@ -1,10 +0,0 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
set -euo pipefail |
||||
|
||||
if [ "${SKIP_COMPILE:-}" == true ]; then |
||||
exit |
||||
fi |
||||
|
||||
npm run clean |
||||
env COMPILE_MODE=production npm run compile |
Loading…
Reference in new issue