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
Currently the ink! codegen does not implement SpreadAllocate for the #[ink(storage)] struct.
This leads to us having to implement it manually in the adjusted ERC-20 example contract here: #979
Since ink! codegen already by default produces implementations for SpreadLayout for the #[ink(storage)] struct it would be natural to produce a SpreadAllocate implementation as well.
The only downside is that while we enforce that all fields of the #[ink(storage)] struct implement SpreadLayout we cannot enforce the same for SpreadAllocate since that is more strict and not always needed for every ink! smart contract.
Therefore we need to only implement SpreadAllocate automatically if all fields of the #[ink(storage)] struct implement it.
This issue requires adjustments in the ink_lang_codegen module.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Currently the ink! codegen does not implement
SpreadAllocate
for the#[ink(storage)]
struct.This leads to us having to implement it manually in the adjusted ERC-20 example contract here: #979
Since ink! codegen already by default produces implementations for
SpreadLayout
for the#[ink(storage)]
struct it would be natural to produce aSpreadAllocate
implementation as well.The only downside is that while we enforce that all fields of the
#[ink(storage)]
struct implementSpreadLayout
we cannot enforce the same forSpreadAllocate
since that is more strict and not always needed for every ink! smart contract.Therefore we need to only implement
SpreadAllocate
automatically if all fields of the#[ink(storage)]
struct implement it.This issue requires adjustments in the
ink_lang_codegen
module.The text was updated successfully, but these errors were encountered: