ink
ink copied to clipboard
Allow Slices in Message Parameters
Recently I came across some places where I thought it would be nicer to have users provide &[T]
instead of Vec<T>
as arguments to my contract's messages. However, I ran into some gross looking lifetime issues that I'm pretty sure could not be solved without additional support from the Ink macros themselves.
From talking with @Robbepop it looks like this is doable, but "hardish". Noting it down in case a brave dev in the future comes along and decides to try implementing this 😄
From talking with @Robbepop it looks like this is doable, but "hardish". Noting it down in case a brave dev in the future comes along and decides to try implementing this smile
It might be doable to solve the heap memory allocation for n-ary parameters but I doubt that we will have lifetimes and slices as the solution in the end. But thanks for the issue, we can keep this for further discussion.
@HCastano Can you please let me know if the issue is still relevant?