-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
set solc version of VRF V2 Plus related contracts to 0.8.19 #12479
Conversation
I see you updated files related to |
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.
Should we just change the pragma solidity 0.8.6
to pragma solidity ^0.8.6
or pragma solidity ^0.8.19
instead of a strict pragma solidity 0.8.19
. Just in case this happens again in the future, keep it more future proof.
...rc/v0.8/vendor/@eth-optimism/contracts/v0.8.6/contracts/L2/predeploys/OVM_GasPriceOracle.sol
Outdated
Show resolved
Hide resolved
|
||
import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; | ||
import {ChainSpecificUtil} from "./libraries/ChainSpecificUtil.sol"; |
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.
Why is this used instead of import {ChainSpecificUtil} from "../ChainSpecificUtil_v0_8_6.sol"
?
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.
The reasoning here is that ../ChainSpecificUtil_v0_8_6.sol
only works with 0.8.6 but here I am upgrading the version of blockhashstore to 0.8.19 which requires ./libraries/ChainSpecificUtil.sol
|
||
import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; | ||
import {ChainSpecificUtil} from "./libraries/ChainSpecificUtil.sol"; |
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.
Same question as for comment above.
@@ -4,7 +4,7 @@ pragma solidity ^0.8.4; | |||
import {BlockhashStoreInterface} from "../interfaces/BlockhashStoreInterface.sol"; | |||
import {VRF} from "../../vrf/VRF.sol"; | |||
import {VRFConsumerBaseV2Plus, IVRFMigratableConsumerV2Plus} from "./VRFConsumerBaseV2Plus.sol"; | |||
import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; | |||
import {ChainSpecificUtil} from "./libraries/ChainSpecificUtil.sol"; |
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.
I will not repeat the question but you got the idea :) It applies to every occurrence of the same line of code.
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.
yep :) let me know if the reasoning above makes sense
I think once we release v2.5, we will keep v2.5 at 0.8.19. Following the general guidelines here
|
Go solidity wrappers are out-of-date, regenerate them via the |
Go solidity wrappers are out-of-date, regenerate them via the |
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.
LGTM, all comments and concerns have been addressed.
|
||
import {ArbSys} from "./vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; | ||
import {ArbGasInfo} from "./vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; | ||
import {OVM_GasPriceOracle} from "./vendor/@eth-optimism/contracts/v0.8.6/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; | ||
import {OVM_GasPriceOracle} from "./vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; |
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.
Does this work with v0.8.19
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.
yes OVM_GasPriceOracle works with anything above v0.8.9
@@ -1,4 +1,4 @@ | |||
pragma solidity 0.8.6; | |||
pragma solidity 0.8.19; |
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.
Do these files need to be updated in this change?
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.
not necessary but automations team agreed to it . https://chainlink-core.slack.com/archives/C033D4HSSQJ/p1710877172545099
Quality Gate passedIssues Measures |
* set solc version of VRF V2 Plus related contracts to 0.8.19 * bump solc version in hardhat config for v2.5 coordinator * fix failing tests due to gas change * auto detect solc version for vrf contracts * upgrade mercury registry * add missing file * make generate
ChainSpecificUtil.sol
that works with 0.8.19. The existing one only works with 0.8.6 and has been renamed accordingly.avg: 28367 median: 33044 max: 37844
->avg: 28329 median: 32997 max: 37797
avg: 127324 median: 97286 max: 231262
->avg: 127173 median: 97062 max: 231146