Files
tycho-execution/src/encoding/evm/models.rs
Diana Carvalho 3dcb8aee7b chore: Use tycho_core::dto objects instead of tycho_core::models
--- don't change below this line ---
ENG-4169 Took 11 minutes
2025-02-05 10:10:43 +00:00

21 lines
407 B
Rust

use tycho_core::dto::Chain;
pub struct ChainId(u64);
impl ChainId {
pub fn id(&self) -> u64 {
self.0
}
}
impl From<Chain> for ChainId {
fn from(chain: Chain) -> Self {
match chain {
Chain::Ethereum => ChainId(1),
Chain::ZkSync => ChainId(324),
Chain::Arbitrum => ChainId(42161),
Chain::Starknet => ChainId(0),
}
}
}