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
515515}
516516
517517/// 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.
518522pub fn code_hash < E > ( account : & E :: AccountId ) -> Result < E :: Hash >
519523where
520524 E : Environment ,
521525{
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+ } )
523529}
524530
525531/// Retrieves the code hash of the currently executing contract.
526532pub fn own_code_hash < E > ( ) -> Result < E :: Hash >
527533where
528534 E : Environment ,
529535{
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+ } )
531539}
532540
533541/// 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