File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -515,19 +515,27 @@ where
515
515
}
516
516
517
517
/// Retrieves the code hash of the contract at the specified account id.
518
+ ///
519
+ /// # Errors
520
+ ///
521
+ /// If no code hash found for the specified account id.
518
522
pub fn code_hash < E > ( account : & E :: AccountId ) -> Result < E :: Hash >
519
523
where
520
524
E : Environment ,
521
525
{
522
- <EnvInstance as OnInstance >:: on_instance ( |instance| instance. code_hash :: < E > ( account) )
526
+ <EnvInstance as OnInstance >:: on_instance ( |instance| {
527
+ TypedEnvBackend :: code_hash :: < E > ( instance, account)
528
+ } )
523
529
}
524
530
525
531
/// Retrieves the code hash of the currently executing contract.
526
532
pub fn own_code_hash < E > ( ) -> Result < E :: Hash >
527
533
where
528
534
E : Environment ,
529
535
{
530
- <EnvInstance as OnInstance >:: on_instance ( |instance| instance. own_code_hash :: < E > ( ) )
536
+ <EnvInstance as OnInstance >:: on_instance ( |instance| {
537
+ TypedEnvBackend :: own_code_hash :: < E > ( instance)
538
+ } )
531
539
}
532
540
533
541
/// Checks whether the caller of the current contract is the origin of the whole call stack.
You can’t perform that action at this time.
0 commit comments