-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: support ovm in ChainSpecificUtil (#10757)
* feature: support ovm in ChainSpecificUtil So far ChainSpecificUtil.sol has only supported arbitrum. This change adds support for OVM/OP stack blockchains by using the OVM_GasPriceOracle predeploy. * feature: support OP L1 data fees * Update chain-specific util with optimism fees and optimism tests * Fix scripts * Fix wrappers after merge * Reduce upgraded version contract size --------- Co-authored-by: Chris <[email protected]>
- Loading branch information
Showing
16 changed files
with
657 additions
and
114 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
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
23 changes: 23 additions & 0 deletions
23
contracts/src/v0.8/vrf/testhelpers/ChainSpecificUtilHelper.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,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "../../ChainSpecificUtil.sol"; | ||
|
||
/// @dev A helper contract that exposes ChainSpecificUtil methods for testing | ||
contract ChainSpecificUtilHelper { | ||
function getBlockhash(uint64 blockNumber) external view returns (bytes32) { | ||
return ChainSpecificUtil.getBlockhash(blockNumber); | ||
} | ||
|
||
function getBlockNumber() external view returns (uint256) { | ||
return ChainSpecificUtil.getBlockNumber(); | ||
} | ||
|
||
function getCurrentTxL1GasFees(string memory txCallData) external view returns (uint256) { | ||
return ChainSpecificUtil.getCurrentTxL1GasFees(bytes(txCallData)); | ||
} | ||
|
||
function getL1CalldataGasCost(uint256 calldataSize) external view returns (uint256) { | ||
return ChainSpecificUtil.getL1CalldataGasCost(calldataSize); | ||
} | ||
} |
Oops, something went wrong.