mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
@@ -1031,6 +1031,11 @@ where
|
|||||||
T::AddressGenerator::generate_address(deploying_address, code_hash, salt)
|
T::AddressGenerator::generate_address(deploying_address, code_hash, salt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the code hash of the contract specified by `account` ID.
|
||||||
|
pub fn code_hash(account: &AccountIdOf<T>) -> Option<CodeHash<T>> {
|
||||||
|
Storage::<T>::code_hash(account)
|
||||||
|
}
|
||||||
|
|
||||||
/// Store code for benchmarks which does not check nor instrument the code.
|
/// Store code for benchmarks which does not check nor instrument the code.
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
fn store_code_raw(
|
fn store_code_raw(
|
||||||
|
|||||||
@@ -328,7 +328,6 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the code hash of the contract specified by `account` ID.
|
/// Returns the code hash of the contract specified by `account` ID.
|
||||||
#[cfg(test)]
|
|
||||||
pub fn code_hash(account: &AccountIdOf<T>) -> Option<CodeHash<T>> {
|
pub fn code_hash(account: &AccountIdOf<T>) -> Option<CodeHash<T>> {
|
||||||
<ContractInfoOf<T>>::get(account).map(|i| i.code_hash)
|
<ContractInfoOf<T>>::get(account).map(|i| i.code_hash)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user