You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Key type here is ink::primitives::Key type (u32 alias) and defaults to 0. It could mean that if some other part of the contract, tries to store anything under that key (0) then it overwrites the instance.data(). Or vice versa - instance.data() may overwrite anything that was already stored there.
The text was updated successfully, but these errors were encountered:
Given the code https://github.com/Brushfam/openbrush-contracts/blob/main/contracts/src/security/reentrancy_guard/mod.rs#L56
I have the following questions:
Should we really require the whole
T: Storable
bound on:given that what we store is not
T
butData
:And secondly, is
Default::default()
key safe to use inKey
type here isink::primitives::Key
type (u32
alias) and defaults to0
. It could mean that if some other part of the contract, tries to store anything under that key (0
) then it overwrites theinstance.data()
. Or vice versa -instance.data()
may overwrite anything that was already stored there.The text was updated successfully, but these errors were encountered: