From 07f7524f3958d550761cac5757875e295c73f043 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Mon, 15 May 2023 14:07:44 -0500 Subject: [PATCH] Use BytesN<32> for the Salt (#941) ### What Fixes a bug mentioned in [Discord](https://discordapp.com/channels/897514728459468821/1105417525572948018/1105417525572948018). --- soroban-sdk/src/deploy.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/soroban-sdk/src/deploy.rs b/soroban-sdk/src/deploy.rs index 562d3e0ac..1ecec3552 100644 --- a/soroban-sdk/src/deploy.rs +++ b/soroban-sdk/src/deploy.rs @@ -37,7 +37,7 @@ //! # #[cfg(not(feature = "testutils"))] //! # fn main() { } //! ``` -use crate::{env::internal::Env as _, unwrap::UnwrapInfallible, Bytes, BytesN, Env, IntoVal}; +use crate::{env::internal::Env as _, unwrap::UnwrapInfallible, BytesN, Env, IntoVal}; /// Deployer provides access to deploying contracts. pub struct Deployer { @@ -57,7 +57,7 @@ impl Deployer { /// from the current contract and the provided salt. pub fn with_current_contract( &self, - salt: &impl IntoVal, + salt: &impl IntoVal>, ) -> DeployerWithCurrentContract { let env = self.env(); DeployerWithCurrentContract { @@ -72,7 +72,7 @@ impl Deployer { pub fn with_other_contract( &self, contract_id: &impl IntoVal>, - salt: &impl IntoVal, + salt: &impl IntoVal>, ) -> DeployerWithOtherContract { let env = self.env(); DeployerWithOtherContract { @@ -87,7 +87,7 @@ impl Deployer { /// contract ID and the provided salt. pub struct DeployerWithCurrentContract { env: Env, - salt: Bytes, + salt: BytesN<32>, } impl DeployerWithCurrentContract { @@ -125,7 +125,7 @@ impl DeployerWithCurrentContract { pub struct DeployerWithOtherContract { env: Env, contract_id: BytesN<32>, - salt: Bytes, + salt: BytesN<32>, } impl DeployerWithOtherContract {