Skip to content
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

Added Base Sepolia to ChainUtils #13216

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-islands-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Added Base Sepolia to ChainUtils #changed
5 changes: 5 additions & 0 deletions contracts/.changeset/smart-rules-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

Added Base Sepolia to ChainUtils #changed
6 changes: 4 additions & 2 deletions contracts/src/v0.8/ChainSpecificUtil.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ library ChainSpecificUtil {
/// @dev Base is a OP stack based rollup and follows the same L1 pricing logic as Optimism.
uint256 private constant BASE_MAINNET_CHAIN_ID = 8453;
uint256 private constant BASE_GOERLI_CHAIN_ID = 84531;
uint256 private constant BASE_SEPOLIA_CHAIN_ID = 84532;

// ------------ End Optimism Constants ------------

Expand Down Expand Up @@ -125,15 +126,16 @@ library ChainSpecificUtil {

/**
* @notice Return true if and only if the provided chain ID is an Optimism chain ID.
* @notice Note that optimism chain id's are also OP stack chain id's.
* @notice Note that optimism chain id's are also OP stack chain id's (e.g. Base).
*/
function _isOptimismChainId(uint256 chainId) internal pure returns (bool) {
return
chainId == OP_MAINNET_CHAIN_ID ||
chainId == OP_GOERLI_CHAIN_ID ||
chainId == OP_SEPOLIA_CHAIN_ID ||
chainId == BASE_MAINNET_CHAIN_ID ||
chainId == BASE_GOERLI_CHAIN_ID;
chainId == BASE_GOERLI_CHAIN_ID ||
chainId == BASE_SEPOLIA_CHAIN_ID;
}

function _calculateOptimismL1DataFee(uint256 calldataSizeBytes) internal view returns (uint256) {
Expand Down
6 changes: 4 additions & 2 deletions contracts/src/v0.8/ChainSpecificUtil_v0_8_6.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ library ChainSpecificUtil {
/// @dev Base is a OP stack based rollup and follows the same L1 pricing logic as Optimism.
uint256 private constant BASE_MAINNET_CHAIN_ID = 8453;
uint256 private constant BASE_GOERLI_CHAIN_ID = 84531;
uint256 private constant BASE_SEPOLIA_CHAIN_ID = 84532;

// ------------ End Optimism Constants ------------

Expand Down Expand Up @@ -125,15 +126,16 @@ library ChainSpecificUtil {

/**
* @notice Return true if and only if the provided chain ID is an Optimism chain ID.
* @notice Note that optimism chain id's are also OP stack chain id's.
* @notice Note that optimism chain id's are also OP stack chain id's (e.g. Base).
*/
function _isOptimismChainId(uint256 chainId) internal pure returns (bool) {
return
chainId == OP_MAINNET_CHAIN_ID ||
chainId == OP_GOERLI_CHAIN_ID ||
chainId == OP_SEPOLIA_CHAIN_ID ||
chainId == BASE_MAINNET_CHAIN_ID ||
chainId == BASE_GOERLI_CHAIN_ID;
chainId == BASE_GOERLI_CHAIN_ID ||
chainId == BASE_SEPOLIA_CHAIN_ID;
}

function _calculateOptimismL1DataFee(uint256 calldataSizeBytes) internal view returns (uint256) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading