Skip to content

Commit

Permalink
Added section Update on Correcting this Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoBeccar authored Nov 17, 2023
1 parent 477e0ea commit 6dbaa07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test-cases/code-hash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ if code_hash(foo) == "0xf00..."{
}
```
Option #2 supports both use cases, but it's more complex to implement and also slows down integration tests by requiring the full WASM compilation of the contract.
## Update on Correcting this Issue
We implemented the function in [PR #1988](https://github.com/paritytech/ink/pull/1988) so that it returns a value that is unique for the contract, but it does not emulate what would be returned on-chain. This value is a hash of a pointer to a function generated for each contract by the compiler. Therefore, this value is unique for each contract, which is the intended purpose of this function.

0 comments on commit 6dbaa07

Please sign in to comment.