-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Labels
A-ink_storage[ink_storage] Work Item[ink_storage] Work ItemB-enhancementNew feature or requestNew feature or requestP-highHigh priority issue.High priority issue.
Description
Below is a list of isolated actionable items that may reduce the Wasm file size of certain ink! smart contracts if applied correctly and thoroughly throughout the ink! codebase and codegen.
If you want to tackle one or multiple of these tasks please open a PR with a link to this issue and reply in this thread so that we can link back.
Todo List
- Retire
ToAccountId
and replace withAsRef<AccountId>
.- Returning a reference instead of a value type is important for
AccountId
types which are usually 256-bits in size
and therefore too big to be efficiently computed by a Wasm VM.
- Returning a reference instead of a value type is important for
- Make
EnvAccess
API use references as inputs to big environmental types such asAccountId
. - Make
ink_env::CallBuilder
API use references as inputs to big environmental types such asAccountId
. - Make it possible for collections such as
ink_storage::HashMap<(K1, K2), V>
to use theget
method using a key of type(&K1, &K2)
instead of&(K1, K2)
.- For this
parity-scale-codec
'sEncodeLike
trait might become very helpful to us: Documentation - First implemented in: Simple Mapping type improvements #979
- For this
- Make it possible to use references when emitting ink! events: Reduce Wasm code bloat of emitting ink! events #990
- Make it possible to accept references as inputs to ink! constructors and messages: Support ink! messages and constructors that take references as parameters #989
cmichi and HCastanoHCastano
Metadata
Metadata
Assignees
Labels
A-ink_storage[ink_storage] Work Item[ink_storage] Work ItemB-enhancementNew feature or requestNew feature or requestP-highHigh priority issue.High priority issue.