Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Jun 5, 2023
1 parent b10c622 commit 7a18716
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions frame/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,13 +931,13 @@ pub mod pallet {
MigrationInProgress,
/// Migrate dispatch call was attempted but no migration was performed.
NoMigrationPerformed,
/// The contract has reached its maximum number of delegate_dependencies.
/// The contract has reached its maximum number of delegate dependencies.
MaxDelegateDependenciesReached,
/// The dependency was not found in the contract's delegate_dependencies.
/// The dependency was not found in the contract's delegate dependencies.
DelegateDependencyNotFound,
/// The contract already depends on the given dependency.
/// The contract already depends on the given delegate dependency.
DelegateDependencyAlreadyExists,
/// Can not add a dependency to the code hash of the contract itself.
/// Can not add a delegate dependency to the code hash of the contract itself.
CannotAddSelfAsDelegateDependency,
}

Expand Down
9 changes: 5 additions & 4 deletions frame/contracts/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ pub struct ContractInfo<T: Config> {
storage_base_deposit: BalanceOf<T>,
/// Map of code hashes and deposit balances.
///
/// Contracts added to the map can not be removed from the chain state and can be safely used
/// for delegate calls. The deposit is refunded on removal.
/// A Code hash of a delegate contracts dependencies added to the map can not be removed from
/// the chain state and can be safely used for delegate calls. The deposit is the deposit held
/// for adding the dependency, it is refunded on removal.
delegate_dependencies: BoundedBTreeMap<CodeHash<T>, BalanceOf<T>, T::MaxDelegateDependencies>,
}

Expand Down Expand Up @@ -132,12 +133,12 @@ impl<T: Config> ContractInfo<T> {
.saturating_sub(Pallet::<T>::min_balance())
}

/// Return the account that storage deposits should be deposited into.
/// Returns the account that storage deposits should be deposited into.
pub fn deposit_account(&self) -> &DepositAccount<T> {
&self.deposit_account
}

/// Return the storage base deposit of the contract.
/// Returns the storage base deposit of the contract.
pub fn storage_base_deposit(&self) -> BalanceOf<T> {
self.storage_base_deposit
}
Expand Down

0 comments on commit 7a18716

Please sign in to comment.