mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +00:00
c8fe8b5378
* Don't store the storage size offset in the contract itself. * Clean the AccountDb code a bit * Use `storage_size: 0` when creating AliveContractInfo * Count empty storage items. * Update frame/contracts/src/account_db.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Use more clear wording. Co-authored-by: Alexander Theißen <athei@users.noreply.github.com> * Change the order of decrement and increment for storage size Co-authored-by: Nikolay Volf <nikvolf@gmail.com> Co-authored-by: Alexander Theißen <athei@users.noreply.github.com>
16 lines
392 B
WebAssembly Text Format
16 lines
392 B
WebAssembly Text Format
;; This module stores a KV pair into the storage
|
|
(module
|
|
(import "env" "ext_set_storage" (func $ext_set_storage (param i32 i32 i32)))
|
|
(import "env" "memory" (memory 16 16))
|
|
|
|
(func (export "call")
|
|
)
|
|
(func (export "deploy")
|
|
(call $ext_set_storage
|
|
(i32.const 0) ;; Pointer to storage key
|
|
(i32.const 0) ;; Pointer to value
|
|
(i32.load (i32.const 0)) ;; Size of value
|
|
)
|
|
)
|
|
)
|