Closed DariuszDepta closed 9 months ago
It's worth that the multi-test API would simulate the real chain's behavior. When it comes to predictible address, there's a method in cosmwasm-std that produces the address based on:
checksum: &[u8],
creator: &CanonicalAddr,
salt: &[u8],
It means that we should not depend on instance
counter to produce the predictable address. Other than that we should allow to produce conflicting addresses if the contract feeds the method with the identical input twice. Perhaps the solution to avoid conflicting addresses would be to encourage users to use random salt in contracts implementations..
Based this simple predictable address generator on creator address and salt.
Improved default implementation of
AddressGenerator
. Now the predictable address is constructed using creator address and salt. Please note, that this default simplistic implementation does not simulate the real blockchain address generator. Please consult this article to learn about other possibilities.closes #122