use alloc::string::String;
use alloy_primitives::Address;
use hashbrown::HashMap;
pub type Implementations = HashMap<String, ContractImplementations>;
pub type AddressSet = HashMap<String, Address>;
#[derive(Debug, Default, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(default))]
pub struct ContractImplementations {
pub l1_cross_domain_messenger: AddressSet,
pub l1_erc721_bridge: AddressSet,
pub l1_standard_bridge: AddressSet,
pub l2_output_oracle: AddressSet,
pub optimism_mintable_erc20_factory: AddressSet,
pub optimism_portal: AddressSet,
pub system_config: AddressSet,
pub anchor_state_registry: AddressSet,
pub delayed_weth: AddressSet,
pub dispute_game_factory: AddressSet,
pub fault_dispute_game: AddressSet,
pub mips: AddressSet,
pub permissioned_dispute_game: AddressSet,
pub preimage_oracle: AddressSet,
}
impl ContractImplementations {
pub fn merge(&mut self, other: Self) {
self.l1_cross_domain_messenger
.extend(other.l1_cross_domain_messenger);
self.l1_erc721_bridge.extend(other.l1_erc721_bridge);
self.l1_standard_bridge.extend(other.l1_standard_bridge);
self.l2_output_oracle.extend(other.l2_output_oracle);
self.optimism_mintable_erc20_factory
.extend(other.optimism_mintable_erc20_factory);
self.optimism_portal.extend(other.optimism_portal);
self.system_config.extend(other.system_config);
self.anchor_state_registry
.extend(other.anchor_state_registry);
self.delayed_weth.extend(other.delayed_weth);
self.dispute_game_factory.extend(other.dispute_game_factory);
self.fault_dispute_game.extend(other.fault_dispute_game);
self.mips.extend(other.mips);
self.permissioned_dispute_game
.extend(other.permissioned_dispute_game);
self.preimage_oracle.extend(other.preimage_oracle);
}
}