diff --git a/e2e-tests-rust/tests/lib.rs b/e2e-tests-rust/tests/lib.rs index 57b2aab8..7212db1d 100644 --- a/e2e-tests-rust/tests/lib.rs +++ b/e2e-tests-rust/tests/lib.rs @@ -1,5 +1,6 @@ use alloy::network::ReceiptResponse; use alloy::providers::ext::AnvilApi; +use alloy::providers::Provider; use anvil_zksync_e2e_tests::{ init_testing_provider, AnvilZKsyncApi, ReceiptExt, ZksyncWalletProviderExt, DEFAULT_TX_VALUE, }; @@ -333,3 +334,15 @@ async fn cant_load_into_existing_state() -> anyhow::Result<()> { Ok(()) } + +#[tokio::test] +async fn set_chain_id() -> anyhow::Result<()> { + let provider = init_testing_provider(|node| node.block_time(3)).await?; + + let new_chain_id = 261; + provider.anvil_set_chain_id(new_chain_id).await?; + + assert_eq!(new_chain_id, provider.get_chain_id().await?); + + Ok(()) +}