Skip to content

Commit

Permalink
doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Mar 27, 2024
1 parent a0beddf commit 8a0c266
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
12 changes: 8 additions & 4 deletions framework/base/src/types/interaction/tx_call_deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ where
/// Backwards compatibility, immitates the old API.
///
/// Note that the data type (the `DeployCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we do the Apime here.
/// For clarity, we don't want it set twice.
/// This is because the old API was passing it as paramter, so we use it from the `code` argument.
///
/// Also note that the code metadata is taken from the `code_metadata` argument.
/// If another one was previously set in the `Tx` object, that one will be ignored.
pub fn deploy_contract<RequestedResult>(
self,
code: &ManagedBuffer<Api>,
Expand All @@ -181,8 +183,10 @@ where
/// Backwards compatibility, immitates the old API.
///
/// Note that the data type (the `DeployCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we do the Apime here.
/// For clarity, we don't want it set twice.
/// This is because the old API was passing it as paramter, so we use it from the `code` argument.
///
/// Also note that the code metadata is taken from the `code_metadata` argument.
/// If another one was previously set in the `Tx` object, that one will be ignored.
pub fn deploy_from_source<RequestedResult>(
self,
source_address: &ManagedAddress<Api>,
Expand Down
16 changes: 10 additions & 6 deletions framework/base/src/types/interaction/tx_call_upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ where
{
/// Backwards compatibility, immitates the old API.
///
/// Note that the data type (the `DeployCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we do the Apime here.
/// For clarity, we don't want it set twice.
/// Note that the data type (the `UpgradeCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we use it from the `code` argument.
///
/// Also note that the code metadata is taken from the `code_metadata` argument.
/// If another one was previously set in the `Tx` object, that one will be ignored.
pub fn upgrade_contract(self, code: &ManagedBuffer<Api>, code_metadata: CodeMetadata) {
let gas = self.gas.explicit_or_gas_left(&self.env);
self.payment.with_egld_value(|egld_value| {
Expand All @@ -110,9 +112,11 @@ where

/// Backwards compatibility, immitates the old API.
///
/// Note that the data type (the `DeployCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we do the Apime here.
/// For clarity, we don't want it set twice.
/// Note that the data type (the `UpgradeCall`) doesn't have the code set.
/// This is because the old API was passing it as paramter, so we use it from the `code` argument.
///
/// Also note that the code metadata is taken from the `code_metadata` argument.
/// If another one was previously set in the `Tx` object, that one will be ignored.
pub fn upgrade_from_source(
self,
source_address: &ManagedAddress<Api>,
Expand Down

0 comments on commit 8a0c266

Please sign in to comment.