-
Notifications
You must be signed in to change notification settings - Fork 2
chore(constants): re-introduce pecorino #96
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#[cfg(any(test, feature = "test-utils"))] | ||
pub mod test_utils; | ||
|
||
pub mod pecorino; |
This file contains hidden or 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,100 @@ | ||
//! Constants for the Pecorino testnet. | ||
|
||
use crate::{ | ||
HostConstants, HostTokens, HostUsdRecord, RollupConstants, RollupTokens, SignetConstants, | ||
SignetEnvironmentConstants, SignetSystemConstants, UsdRecords, | ||
}; | ||
use alloy::primitives::{address, Address}; | ||
use std::borrow::Cow; | ||
|
||
/// Name for the host chain. | ||
pub const HOST_NAME: &str = "Pecorino Host"; | ||
/// Chain ID for the Pecorino testnet host chain. | ||
pub const HOST_CHAIN_ID: u64 = 3151908; | ||
/// Deployment height for the Pecorino testnet host chain. | ||
pub const DEPLOY_HEIGHT: u64 = 149984; | ||
/// `Zenith` contract address for the Pecorino testnet host chain. | ||
pub const HOST_ZENITH: Address = address!("0xbe45611502116387211D28cE493D6Fb3d192bc4E"); | ||
/// `Orders` contract address for the Pecorino testnet host chain. | ||
pub const HOST_ORDERS: Address = address!("0x4E8cC181805aFC307C83298242271142b8e2f249"); | ||
/// `Passage` contract address for the Pecorino testnet host chain. | ||
pub const HOST_PASSAGE: Address = address!("0xd553C4CA4792Af71F4B61231409eaB321c1Dd2Ce"); | ||
/// `Transactor` contract address for the Pecorino testnet host chain. | ||
pub const HOST_TRANSACTOR: Address = address!("0x1af3A16857C28917Ab2C4c78Be099fF251669200"); | ||
|
||
/// USDC token for the Pecorino testnet host chain. | ||
pub const HOST_USDC: Address = address!("0x885F8DB528dC8a38aA3DDad9D3F619746B4a6A81"); | ||
/// USDT token for the Pecorino testnet host chain. | ||
pub const HOST_USDT: Address = address!("0x7970D259D4a96764Fa9B23FF0715A35f06f52D1A"); | ||
/// WBTC token for the Pecorino testnet host chain. | ||
pub const HOST_WBTC: Address = address!("0x9aeDED4224f3dD31aD8A0B1FcD05E2d7829283a7"); | ||
/// WETH token for the Pecorino testnet host chain. | ||
pub const HOST_WETH: Address = address!("0x572C4d72080ed9E9997509b583a22B785B70cB3f"); | ||
|
||
/// USDC token record for the Pecorino testnet host chain. | ||
pub const HOST_USDC_RECORD: HostUsdRecord = HostUsdRecord::new(HOST_USDC, Cow::Borrowed("USDC"), 6); | ||
/// USDT token record for the Pecorino testnet host chain. | ||
pub const HOST_USDT_RECORD: HostUsdRecord = HostUsdRecord::new(HOST_USDT, Cow::Borrowed("USDT"), 6); | ||
/// Host USD records for the Pecorino testnet host chain. | ||
pub const HOST_USD_RECORDS: UsdRecords = { | ||
let mut records = UsdRecords::new(); | ||
records.push(HOST_USDC_RECORD); | ||
records.push(HOST_USDT_RECORD); | ||
records | ||
}; | ||
/// Host system tokens for Pecorino. | ||
pub const HOST_TOKENS: HostTokens = HostTokens::new(HOST_USD_RECORDS, HOST_WBTC, HOST_WETH); | ||
|
||
/// Host system constants for Pecorino. | ||
pub const HOST: HostConstants = crate::HostConstants::new( | ||
HOST_CHAIN_ID, | ||
DEPLOY_HEIGHT, | ||
HOST_ZENITH, | ||
HOST_ORDERS, | ||
HOST_PASSAGE, | ||
HOST_TRANSACTOR, | ||
HOST_TOKENS, | ||
); | ||
|
||
/// Name for the network. | ||
pub const RU_NAME: &str = "Pecorino"; | ||
/// Chain ID for the Pecorino testnet RU chain. | ||
pub const RU_CHAIN_ID: u64 = 14174; | ||
|
||
/// WETH token for the Pecorino testnet RU chain. | ||
pub const RU_WETH: Address = address!("0x0000000000000000007369676e65742d77657468"); | ||
/// WBTC token for the Pecorino testnet RU chain. | ||
pub const RU_WBTC: Address = address!("0x0000000000000000007369676e65742D77627463"); | ||
/// `Orders` contract address for the Pecorino testnet RU chain. | ||
pub const RU_ORDERS: Address = address!("0x000000000000007369676E65742D6f7264657273"); | ||
/// `Passage` contract address for the Pecorino testnet RU chain. | ||
/// This is currently a dummy value and will be replaced with the actual Passage contract address in the future. | ||
pub const RU_PASSAGE: Address = address!("0x0000000000007369676E65742D70617373616765"); | ||
/// The WETH9-based wrapped native USD token contract. | ||
/// This is signet's native token in wrapped form. | ||
pub const WRAPPED: Address = address!("0x0000000000000000007369676e65742D77757364"); | ||
Comment on lines
+65
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Manually verified updated rollup addresses |
||
/// RU pre-approved system tokens for Pecorino. | ||
pub const RU_TOKENS: RollupTokens = RollupTokens::new(RU_WBTC, RU_WETH); | ||
|
||
/// Base fee recipient address for the Pecorino testnet RU chain. | ||
pub const BASE_FEE_RECIPIENT: Address = address!("0xe0eDA3701D44511ce419344A4CeD30B52c9Ba231"); | ||
|
||
/// RU system constants for Pecorino. | ||
pub const ROLLUP: RollupConstants = | ||
crate::RollupConstants::new(RU_CHAIN_ID, RU_ORDERS, RU_PASSAGE, BASE_FEE_RECIPIENT, RU_TOKENS); | ||
|
||
/// Signet system constants for Pecorino. | ||
pub const PECORINO_SYS: SignetSystemConstants = crate::SignetSystemConstants::new(HOST, ROLLUP); | ||
|
||
/// Signet environment constants for Pecorino. | ||
pub const PECORINO_ENV: SignetEnvironmentConstants = SignetEnvironmentConstants::new( | ||
Cow::Borrowed(HOST_NAME), | ||
Cow::Borrowed(RU_NAME), | ||
Cow::Borrowed(TX_CACHE_URL), | ||
); | ||
|
||
/// Signet constants for Pecorino. | ||
pub const PECORINO: SignetConstants = SignetConstants::new(PECORINO_SYS, PECORINO_ENV); | ||
|
||
/// The URL of the Transaction Cache endpoint. | ||
pub const TX_CACHE_URL: &str = "https://transactions.pecorino.signet.sh"; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Manually verified updated host addresses