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
Right now delegate calls can't work as they were before due to latest ink! changes.
As was mentioned in this issue, the problem is in initializing storage, so, we have the following possible options of making everything work:
Using an empty ink(storage) struct and wrapping the main storage into another structure with initializing in Storable::decode method
We can implement custom Storable::decode method, so every struct will be extracted from storage by it's own storage key and initialized if it is not, like it was implemented here, but we have a problem, that we can reimplement encode method for structs to be set to storage by theirs storage key by default, so we will need to manually flush every such struct in storage.
Using Lazy for every such struct, but the downsides of this approach is that it will change the approach of working with any contract a lot
The best solution for this problem will be implementing something like this in ink! itself.
The text was updated successfully, but these errors were encountered:
Right now delegate calls can't work as they were before due to latest ink! changes.
As was mentioned in this issue, the problem is in initializing storage, so, we have the following possible options of making everything work:
Storable::decode
methodStorable::decode
method, so every struct will be extracted from storage by it's own storage key and initialized if it is not, like it was implemented here, but we have a problem, that we can reimplementencode
method for structs to be set to storage by theirs storage key by default, so we will need to manually flush every such struct in storage.Lazy
for every such struct, but the downsides of this approach is that it will change the approach of working with any contract a lotThe best solution for this problem will be implementing something like this in ink! itself.
The text was updated successfully, but these errors were encountered: