merkle_add

Function merkle_add 

Source
pub(crate) fn merkle_add(
    ctx: FunctionEnvMut<'_, Env>,
    ptr: WasmPtr<u8>,
    ptr_len: u32,
) -> i64
Expand description

Add data to an on-chain Merkle tree.

Expects:

  • db_info: Handle where the Merkle tree is stored
  • db_roots: Handle where all new Merkle roots are stored
  • root_key: Serialized key pointing to latest root in db_info
  • tree_key: Serialized key pointing to the Merkle tree in db_info
  • coins: Items we want to add to the Merkle tree

ยงPermissions

  • ContractSection::Update