I'm writing chain extensions for my pallets and I have a few functions that require dynamic sized types, for example
Vec<u8> for metadata and
Vec<u64> for a list of asset ids.
The way I am approaching this right now is to make an array filled with zeroes in the size of the boundaries set for those cases in the runtime and fill the beginning with the actual data in the contract, then send it to the chain extension like that and removing the trailing zeroes.
Sure this works, but it cannot be the best possible approach and I'm struggling to find any resource on chain extensions. There's a short documentation page and an example that shows the very minimum, only deals with a single function that has a single fixed size argument.
So yeah, what I'm looking for here is a better approach to dynamic sized types in chain extensions but I'd really appreciate any resources and actual code for me to take a look.