Skip to content

Add derive macro for SpreadAllocate trait #993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Robbepop opened this issue Oct 30, 2021 · 1 comment
Closed

Add derive macro for SpreadAllocate trait #993

Robbepop opened this issue Oct 30, 2021 · 1 comment
Labels
A-ink_storage [ink_storage] Work Item

Comments

@Robbepop
Copy link
Collaborator

Robbepop commented Oct 30, 2021

#978 has added a new SpreadAllocate trait which is useful for default initializing ink! contracts onto some storage region which was not really possible before.

This trait is very much needed for non-caching storage facilities and collections such as the Mapping type first introduced in #946 and refined in #979.

However, currently we are missing a simple way for users to derive the trait.
This issue is about implementing a derive macro for the new SpreadAllocate trait.
The where clause should make sure that it is only implemented on types where all fields are SpreadAllocate, too.

For this the ink_storage_derive crate has to be adjusted.

@Robbepop Robbepop added the A-ink_storage [ink_storage] Work Item label Oct 30, 2021
@HCastano
Copy link
Contributor

Closed by #995.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_storage [ink_storage] Work Item
Projects
None yet
Development

No branches or pull requests

2 participants