Skip to content

Commit

Permalink
chore: remove goerli support
Browse files Browse the repository at this point in the history
  • Loading branch information
Vid201 committed Sep 19, 2024
1 parent 73f78d3 commit f5f3f0d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 30 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@ Silius was tested on the following networks, and some public endpoints are avail
| Chain | Supported Status | Public RPC URL |
| :--------: | :-------: | :-------: |
| Ethereum | :heavy_check_mark:| <https://rpc.silius.xyz/api/v1/chain/ethereum-mainnet> |
| Ethereum Goerli | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/ethereum-goerli> |
| Ethereum Sepolia| :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/ethereum-sepolia> |
| Ethereum Holesky| :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/ethereum-holesky> |
| Polygon | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/polygon-mainnet> |
| Polygon Mumbai| :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/polygon-mumbai> |
| Linea | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/linea-mainnet> |
| Linea Goerli | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/linea-goerli> |
| Optimism | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/optimism-mainnet> |
| Optimism Sepolia | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/optimism-sepolia> |
| Arbitrum | :heavy_check_mark: | <https://rpc.silius.xyz/api/v1/chain/arbitrum-mainnet> |
Expand Down
7 changes: 2 additions & 5 deletions bin/silius/src/bundler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,15 @@ where
SendStrategy::Flashbots => {
let relay_endpoints: Vec<String> = match chain_conn
.named()
.expect("Flashbots is only supported on Mainnet, Goerli and Sepolia")
.expect("Flashbots is only supported on Mainnet and Sepolia")
{
NamedChain::Mainnet => {
vec![flashbots_relay_endpoints::FLASHBOTS.into()]
}
NamedChain::Goerli => {
vec![flashbots_relay_endpoints::FLASHBOTS_GOERLI.into()]
}
NamedChain::Sepolia => {
vec![flashbots_relay_endpoints::FLASHBOTS_SEPOLIA.into()]
}
_ => panic!("Flashbots is only supported on Mainnet, Goerli and Sepolia"),
_ => panic!("Flashbots is only supported on Mainnet and Sepolia"),
};

let client = Arc::new(FlashbotsClient::new(
Expand Down
8 changes: 4 additions & 4 deletions crates/bundler/tests/bundler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ async fn start_mock_server() -> eyre::Result<(ServerHandle, MockFlashbotsBlockBu

#[tokio::test]
#[ignore]
async fn test_simulate_bundle_flashbots_goerli() -> eyre::Result<()> {
async fn test_simulate_bundle_flashbots_sepolia() -> eyre::Result<()> {
dotenv::dotenv().ok();
let eth_client_address = std::env::var("WS_RPC_URL").expect("WS_RPC_URL env var not set");
let eth_client = Arc::new(Provider::<Ws>::connect(eth_client_address).await?);
let dir = format!(
"{}/.silius/0x129D197b2a989C6798601A49D89a4AEC822A17a3",
std::env::var("HOME").unwrap()
);
let wallet = Wallet::from_file(dir.into(), 5, true)?;
let wallet = Wallet::from_file(dir.into(), 11155111, true)?;

let client = FlashbotsClient::new(
eth_client.clone(),
Some(vec![flashbots_relay_endpoints::FLASHBOTS_GOERLI.into()]),
Some(vec![flashbots_relay_endpoints::FLASHBOTS_SEPOLIA.into()]),
wallet.clone(),
)?;

Expand All @@ -145,7 +145,7 @@ async fn test_simulate_bundle_flashbots_goerli() -> eyre::Result<()> {
)),
from: Some(address),
data: Some(approve_call_data.into()),
chain_id: Some(U64::from(5)),
chain_id: Some(U64::from(11155111)),
max_fee_per_gas: Some(max_fee_per_gas),
max_priority_fee_per_gas: Some(max_priority_fee),
gas: Some(U256::from(1000000u64)),
Expand Down
10 changes: 0 additions & 10 deletions crates/primitives/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ impl ChainSpec {
match chain_id {
1 => Self::mainnet(),
1337 => Self::dev(),
5 => Self::goerli(),
11155111 => Self::sepolia(),
137 => Self::polygon(),
80001 => Self::polygon_mumbai(),
Expand All @@ -47,15 +46,6 @@ impl ChainSpec {
}
}

/// 'ChainSpec' for goerli
pub fn goerli() -> Self {
Self {
chain: Chain::from(NamedChain::Goerli),
block_time: Duration::from_secs(12),
canonical_mempools: vec!["QmTmj4cizhWpEFCCqk5dP67yws7R2PPgCtb2bd2RgVPCbF".into()],
}
}

/// 'ChainSpec' for sepolia
pub fn sepolia() -> Self {
Self {
Expand Down
10 changes: 1 addition & 9 deletions crates/primitives/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ pub mod flashbots_relay_endpoints {
pub const RSYNC_BUILDER: &str = "https://rsync-builder.xyz/";
pub const LOKI_BUILDER: &str = "https://rpc.lokibuilder.xyz/";

// goerli
pub const FLASHBOTS_GOERLI: &str = "https://relay-goerli.flashbots.net";

// sepolia
pub const FLASHBOTS_SEPOLIA: &str = "https://relay-sepolia.flashbots.net";
}
Expand All @@ -95,20 +92,15 @@ pub mod fastlane_relay_endpoints {
pub mod supported_chains {
use alloy_chains::NamedChain;

pub const CHAINS: [NamedChain; 15] = [
pub const CHAINS: [NamedChain; 10] = [
NamedChain::Dev,
NamedChain::Mainnet,
NamedChain::Goerli,
NamedChain::Sepolia,
NamedChain::Holesky,
NamedChain::PolygonMumbai,
NamedChain::LineaGoerli,
NamedChain::OptimismGoerli,
NamedChain::OptimismSepolia,
NamedChain::ArbitrumGoerli,
NamedChain::ArbitrumSepolia,
NamedChain::BinanceSmartChainTestnet,
NamedChain::BaseGoerli,
NamedChain::BaseSepolia,
NamedChain::AvalancheFuji,
];
Expand Down

0 comments on commit f5f3f0d

Please sign in to comment.