diff --git a/docs/src/deploying/index.md b/docs/src/deploying/index.md index d0a5f03b57..dd4bada780 100644 --- a/docs/src/deploying/index.md +++ b/docs/src/deploying/index.md @@ -26,7 +26,8 @@ Alternatively, you can use `LoadConfiguration` to configure how the contract is - Load the same contract binary with `Salt` to get a new `contract_id` - Change the contract's storage slots - Update the contract's configurables - > Note: The next section will give more information on how `configurables` can be used. + +> Note: The next section will give more information on how `configurables` can be used. Additionally, you can set custom `TxParameters` when deploying the loaded contract. @@ -39,3 +40,5 @@ After the contract is deployed, you can use the contract's methods like this: ```rust,ignore {{#include ../../../examples/contracts/src/lib.rs:use_deployed_contract}} ``` + +> Note: When redeploying an existing `Contract`, ensure that you initialize it with a unique salt to prevent deployment failures caused by a contract ID collision. To accomplish this, utilize the `with_salt` method to clone the existing `Contract` with a new salt. diff --git a/packages/fuels-programs/src/contract.rs b/packages/fuels-programs/src/contract.rs index 17bc43fbe8..cff1165884 100644 --- a/packages/fuels-programs/src/contract.rs +++ b/packages/fuels-programs/src/contract.rs @@ -239,7 +239,7 @@ impl LoadConfiguration { /// [`Contract`] is a struct to interface with a contract. That includes things such as /// compiling, deploying, and running transactions against a contract. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Contract { binary: Vec, salt: Salt,