Pass large environmental ink! types by reference #949
Labels
A-ink_storage
[ink_storage] Work Item
B-enhancement
New feature or request
P-high
High priority issue.
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
ToAccountId
and replace withAsRef<AccountId>
.AccountId
types which are usually 256-bits in sizeand therefore too big to be efficiently computed by a Wasm VM.
EnvAccess
API use references as inputs to big environmental types such asAccountId
.ink_env::CallBuilder
API use references as inputs to big environmental types such asAccountId
.ink_storage::HashMap<(K1, K2), V>
to use theget
method using a key of type(&K1, &K2)
instead of&(K1, K2)
.parity-scale-codec
'sEncodeLike
trait might become very helpful to us: DocumentationThe text was updated successfully, but these errors were encountered: