I am trying to read the content of the input from a TopDecode, but erdpy contract report
reports has-allocator
equals true.
Below is my current snippet.
impl<M: ManagedTypeApi> TopDecode for PenguinAttributes<M> {
fn top_decode<I: elrond_codec::TopDecodeInput>(input: I) -> Result<Self, DecodeError> {
let boxed_bytes = input.into_boxed_slice_u8();
return Result::Ok(PenguinAttributes::empty());
}
}
I have commented the boxed_bytes method, and has-allocator now equals false.
But how can I read the content of input withouting using allocator please ?
I am using elrond-wasm 0.29.3 and erdpy 1.2.3.
Thank you
An example of my input Hat:unequipped;Beak:Golden Beak (BEAK-a1a1a1-05)
.
I achieve this by loading my bytes in an array of 512. Then, I read the array from 0 to managed_buffer.length.