-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pragma to most restrictive dependency or feature #1461
Update pragma to most restrictive dependency or feature #1461
Conversation
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.0; | |||
pragma solidity ^0.8.20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnumerableMap
is ^0.8.20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh that's not great. Requiring 0.8.20 feels restrictive. Can we downgrade OZ to 4.8.3 for the examples?
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.0; | |||
pragma solidity 0.8.24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Router
is 0.8.24
. This could be left open by switching to IRouter
(which should be the default approach in the future 🙂)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no ^?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has to be 0.8.24
bc Router
is fixed at 0.8.24
. It would compile if the made the pragma less restrictive but it would only ever be able to use sol 0.8.24
so there's no reason to open the pragma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is fine to be at 24 as it's only used internally anyway
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: BUSL-1.1 | |||
pragma solidity ^0.8.0; | |||
pragma solidity 0.8.24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TokenPool
is 0.8.24
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.0; | |||
pragma solidity 0.8.24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BurnMintTokenPool
is 0.8.24
LCOV of commit
|
3ee66fe
to
2af21b5
Compare
Quality Gate passedIssues Measures |
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: UNLICENSED | |||
pragma solidity ^0.8.0; | |||
pragma solidity ^0.8.4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses OZ 5 so let's use 0.8.24? It's a test contract anyway. Can you also update the license
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good catch on OZ 5
Closing in favor of #1466 |
Motivation
We have several contracts using
^0.8.0
but also custom errors, or a child contract with custom errors. We also have several contracts at^0.8.0
but a dependency locked at0.8.24
.Solution
Update all pragmas to the pragma of the most restrictive dep or the minimum to enable custom errors (
0.8.4
)