Concordium / concordium-rust-smart-contracts

Libraries and tools for writing and testing smart contracts on Concordium
https://docs.rs/concordium-std/latest/concordium_std/
Mozilla Public License 2.0
57 stars 35 forks source link

Change to use type with no length prepended in the CCD receive hook mechanism #434

Closed DOBEN closed 4 months ago

DOBEN commented 5 months ago

Purpose

When a smart contract receives CCD via the receive hook mechanism from the smart contract wallet, we want to be able to represent any smart contract input parameter of the receiving smart contract. As such, it is problematic to use AdditionalData/ Vec<u8> types for the transfer since they all prepend the bytes with their length. The receiving smart contract input parameter might have no (or a different amount of) bytes prepended representing the length of the input parameter as such we send raw bytes now to be able to represent the input parameter of any receiving smart contract.

Changes

Send raw bytes in the CCD receive hook mechanism.