Skip to content

Commit

Permalink
chore: rename optimism to op-mainnet (#422)
Browse files Browse the repository at this point in the history
* chore: rename optimism to op-mainnet

* chore: rename urls optimism to op-mainnet

* formatting fix
  • Loading branch information
MuhtasimTanmoy authored Nov 20, 2024
1 parent 664745e commit 362e9c9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To run Helios on an OP Stack chain, run the command below, replacing `$ETH_RPC_U
helios opstack --network $NETWORK --execution-rpc $ETH_RPC_URL
```

Currently supported network values are `optimism` and `base`, with more to come soon.
Currently supported network values are `op-mainnet` and `base`, with more to come soon.

### Additional Ethereum CLI Options <a id="additional-cli-options"></a>

Expand Down Expand Up @@ -85,8 +85,8 @@ consensus_rpc = "https://ethereum.operationsolarstorm.org"
execution_rpc = "https://eth-mainnet.g.alchemy.com/v2/XXXXX"
checkpoint = "0x85e6151a246e8fdba36db27a0c7678a575346272fe978c9281e13a8b26cdfa68"

[optimism]
consensus_rpc = "https://optimism.operationsolarstorm.org"
[op-mainnet]
consensus_rpc = "https://op-mainnet.operationsolarstorm.org"
execution_rpc = "https://opt-mainnet.g.alchemy.com/v2/XXXXX"

[base]
Expand Down
12 changes: 6 additions & 6 deletions helios-ts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h2>Ethereum</h2>
</div>
</div>
<div class="panel" id="optimism-panel">
<h2>Optimism</h2>
<h2>OP Mainnet</h2>
<div class="blocks" id="optimism-blocks">
<pre class="block-info syncing" id="optimism-syncing">Syncing...</pre>
</div>
Expand Down Expand Up @@ -126,12 +126,12 @@ <h2>Base</h2>

let configOptimsim = {
executionRpc: "https://opt-mainnet.g.alchemy.com/v2/" + alcehmyKey,
network: "optimism",
network: "op-mainnet",
};

let optimismProvider = new helios.HeliosProvider(configOptimsim, "opstack");
optimismProvider .sync().then(() => {
window.heliosOptimism = new ethers.providers.Web3Provider(optimismProvider);
let opMainnetProvider = new helios.HeliosProvider(configOptimsim, "opstack");
opMainnetProvider .sync().then(() => {
window.heliosOpMainnet = new ethers.providers.Web3Provider(opMainnetProvider);
});

let configBase = {
Expand Down Expand Up @@ -191,7 +191,7 @@ <h2>Base</h2>
}

setInterval(async () => updateBlockInfo(window.heliosEthereum, "ethereum"), 1000);
setInterval(async () => updateBlockInfo(window.heliosOptimism, "optimism"), 1000);
setInterval(async () => updateBlockInfo(window.heliosOpMainnet, "op-mainnet"), 1000);
setInterval(async () => updateBlockInfo(window.heliosBase, "base"), 1000);
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion helios-ts/src/opstack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl OpStackClient {
console_error_panic_hook::set_once();

let network_config = match network.as_str() {
"optimism" => NetworkConfig::from(Network::Optimism),
"op-mainnet" => NetworkConfig::from(Network::OpMainnet),
"base" => NetworkConfig::from(Network::Base),
"worldchain" => NetworkConfig::from(Network::Worldchain),
"zora" => NetworkConfig::from(Network::Zora),
Expand Down
14 changes: 9 additions & 5 deletions opstack/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct NetworkConfig {

#[derive(Copy, Clone, Debug)]
pub enum Network {
Optimism,
OpMainnet,
Base,
Worldchain,
Zora,
Expand All @@ -43,7 +43,7 @@ pub enum Network {
impl Display for Network {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Optimism => f.write_str("optimism"),
Self::OpMainnet => f.write_str("op-mainnet"),
Self::Base => f.write_str("base"),
Self::Worldchain => f.write_str("worldchain"),
Self::Zora => f.write_str("zora"),
Expand All @@ -56,7 +56,7 @@ impl FromStr for Network {

fn from_str(s: &str) -> Result<Self> {
match s {
"optimism" => Ok(Self::Optimism),
"op-mainnet" => Ok(Self::OpMainnet),
"base" => Ok(Self::Base),
"worldchain" => Ok(Self::Worldchain),
"zora" => Ok(Self::Zora),
Expand All @@ -68,8 +68,12 @@ impl FromStr for Network {
impl From<Network> for NetworkConfig {
fn from(value: Network) -> Self {
match value {
Network::Optimism => NetworkConfig {
consensus_rpc: Some("https://optimism.operationsolarstorm.org".parse().unwrap()),
Network::OpMainnet => NetworkConfig {
consensus_rpc: Some(
"https://op-mainnet.operationsolarstorm.org"
.parse()
.unwrap(),
),
chain: ChainConfig {
chain_id: 10,
unsafe_signer: address!("AAAA45d9549EDA09E70937013520214382Ffc4A2"),
Expand Down
2 changes: 1 addition & 1 deletion opstack/src/server/net/bootnodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::str::FromStr;

use discv5::enr::{CombinedKey, Enr};

/// Default bootnodes to use. Currently consists of 2 Base bootnodes & 1 Optimism bootnode.
/// Default bootnodes to use. Currently consists of 2 Base bootnodes & 1 Op Mainnet bootnode.
pub fn bootnodes() -> Vec<Enr<CombinedKey>> {
let bootnodes = [
"enr:-J64QBbwPjPLZ6IOOToOLsSjtFUjjzN66qmBZdUexpO32Klrc458Q24kbty2PdRaLacHM5z-cZQr8mjeQu3pik6jPSOGAYYFIqBfgmlkgnY0gmlwhDaRWFWHb3BzdGFja4SzlAUAiXNlY3AyNTZrMaECmeSnJh7zjKrDSPoNMGXoopeDF4hhpj5I0OsQUUt4u8uDdGNwgiQGg3VkcIIkBg",
Expand Down

0 comments on commit 362e9c9

Please sign in to comment.