From 6d53b51f8d0f714561b6e7f23f130dbfbfb3db59 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Wed, 3 Jul 2024 18:17:18 +0530 Subject: [PATCH] feat : updated enum --- crates/l2/starkgate-manager-client/src/lib.rs | 2 +- crates/l2/starkgate-registry-client/src/lib.rs | 2 +- crates/l2/starknet-core-contract-client/src/lib.rs | 4 ++-- crates/l2/starknet-eth-bridge-client/src/lib.rs | 2 +- crates/l2/starknet-proxy-client/src/deploy.rs | 8 ++++---- crates/l2/starknet-token-bridge-client/src/lib.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/l2/starkgate-manager-client/src/lib.rs b/crates/l2/starkgate-manager-client/src/lib.rs index 3558591..4390499 100644 --- a/crates/l2/starkgate-manager-client/src/lib.rs +++ b/crates/l2/starkgate-manager-client/src/lib.rs @@ -35,7 +35,7 @@ pub async fn deploy_starkgate_manager_behind_safe_proxy( client.clone(), STARKGATE_MANAGER, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxyLatest, + ProxyVersion::SafeProxy5_0_0, ) .await?; diff --git a/crates/l2/starkgate-registry-client/src/lib.rs b/crates/l2/starkgate-registry-client/src/lib.rs index 28bb98f..fd8148d 100644 --- a/crates/l2/starkgate-registry-client/src/lib.rs +++ b/crates/l2/starkgate-registry-client/src/lib.rs @@ -36,7 +36,7 @@ pub async fn deploy_starkgate_registry_behind_safe_proxy( client.clone(), STARKGATE_REGISTRY, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxyLatest, + ProxyVersion::SafeProxy5_0_0, ) .await?; diff --git a/crates/l2/starknet-core-contract-client/src/lib.rs b/crates/l2/starknet-core-contract-client/src/lib.rs index 976cc5b..9841d83 100644 --- a/crates/l2/starknet-core-contract-client/src/lib.rs +++ b/crates/l2/starknet-core-contract-client/src/lib.rs @@ -42,7 +42,7 @@ pub async fn deploy_starknet_sovereign_behind_safe_proxy( client.clone(), STARKNET_SOVEREIGN, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxy, + ProxyVersion::SafeProxy3_0_2, ) .await?; @@ -84,7 +84,7 @@ pub async fn deploy_starknet_validity_behind_safe_proxy( client.clone(), STARKNET, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxy, + ProxyVersion::SafeProxy3_0_2, ) .await?; diff --git a/crates/l2/starknet-eth-bridge-client/src/lib.rs b/crates/l2/starknet-eth-bridge-client/src/lib.rs index eb6abdd..1a6b079 100644 --- a/crates/l2/starknet-eth-bridge-client/src/lib.rs +++ b/crates/l2/starknet-eth-bridge-client/src/lib.rs @@ -35,7 +35,7 @@ pub async fn deploy_starknet_eth_bridge_behind_safe_proxy( client.clone(), STARKNET_ETH_BRIDGE, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxy, + ProxyVersion::SafeProxy3_0_2, ) .await?; diff --git a/crates/l2/starknet-proxy-client/src/deploy.rs b/crates/l2/starknet-proxy-client/src/deploy.rs index 938e449..3ead66b 100644 --- a/crates/l2/starknet-proxy-client/src/deploy.rs +++ b/crates/l2/starknet-proxy-client/src/deploy.rs @@ -36,9 +36,9 @@ pub enum ProxyVersion { /// deploys unsafe proxy. UnsafeProxy, /// deploys safe proxy (starknet proxy version 3.0.2) - SafeProxy, + SafeProxy3_0_2, /// deploys safe proxy (starknet proxy version 5.0.0) - SafeProxyLatest, + SafeProxy5_0_0, } pub async fn deploy_contract_behind_proxy( @@ -58,8 +58,8 @@ pub async fn deploy_contract_behind_proxy( log::debug!("ℹ️ Contract deployed : {:?}", contract.address().clone()); let type_of_proxy = match proxy_type { - ProxyVersion::SafeProxy => SAFE_PROXY_3_0_2, - ProxyVersion::SafeProxyLatest => SAFE_PROXY_5_0_0, + ProxyVersion::SafeProxy3_0_2 => SAFE_PROXY_3_0_2, + ProxyVersion::SafeProxy5_0_0 => SAFE_PROXY_5_0_0, ProxyVersion::UnsafeProxy => UNSAFE_PROXY, }; diff --git a/crates/l2/starknet-token-bridge-client/src/lib.rs b/crates/l2/starknet-token-bridge-client/src/lib.rs index b0be912..c585bae 100644 --- a/crates/l2/starknet-token-bridge-client/src/lib.rs +++ b/crates/l2/starknet-token-bridge-client/src/lib.rs @@ -37,7 +37,7 @@ pub async fn deploy_starknet_token_bridge_behind_safe_proxy( client.clone(), STARKNET_TOKEN_BRIDGE, NO_CONSTRUCTOR_ARG, - ProxyVersion::SafeProxyLatest, + ProxyVersion::SafeProxy5_0_0, ) .await?;