-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Support
--exclude
option (#1065)
Co-authored-by: Hadrien Croubois <[email protected]>
- Loading branch information
Showing
20 changed files
with
449 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
abstract contract Abstract1 { | ||
uint256 public immutable x; | ||
|
||
constructor(uint256 _x) { | ||
x = _x; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
abstract contract Abstract2 { | ||
uint256 public immutable y; | ||
|
||
constructor(uint256 _y) { | ||
y = _y; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/core/contracts/test/cli/excludes/AbstractUUPS.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | ||
import {Abstract1} from "./Abstract1.sol"; | ||
import {Abstract2} from "./Abstract2.sol"; | ||
|
||
abstract contract AbstractUUPS is UUPSUpgradeable, Abstract1, Abstract2 { | ||
uint256 public immutable z; | ||
|
||
constructor(uint256 _x, uint256 _y, uint256 _z) Abstract1(_x) Abstract2(_y) { | ||
z = _z; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/core/contracts/test/cli/excludes/ImportVersionsAndBeacon.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "./V1.sol"; | ||
import "./V2Bad1.sol"; | ||
import "./V2Bad2.sol"; | ||
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; | ||
|
||
abstract contract Dummy { | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/core/contracts/test/cli/excludes/UsesAbstractUUPS.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
// This contract is for testing only, it is not safe for use in production. | ||
|
||
import {AbstractUUPS} from "./AbstractUUPS.sol"; | ||
|
||
contract UsesAbstractUUPS is AbstractUUPS { | ||
constructor(uint256 _x, uint256 _y, uint256 _z) AbstractUUPS(x, y, z) { | ||
} | ||
|
||
function _authorizeUpgrade(address newImplementation) internal pure override { | ||
revert("Upgrade disabled"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
contract V1 { | ||
uint256 public x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
/// @custom:oz-upgrades-from V1 | ||
contract V2Bad1 { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
/// @custom:oz-upgrades-from V1 | ||
contract V2Bad2 { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.