[ address[] bytes[] ] to bytes memory calldata? #2496
-
Discussed in #2493Originally posted by Madeindreams January 4, 2022 Example; I have addresses and signed transaction.
Right now what I do a simple transaction
How do I create and array of bytes[] and addresses[] that can be passed as one single bytes argument to be decoded later in the call.
I need to turn these 2 arrays into a single bytes argument to this function
this other contract would come back in with the call data
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can use: Let me know if that helps. :) |
Beta Was this translation helpful? Give feedback.
-
Well I could get it to work but only by storing the calldata in the memory while the call is executed Sequencer is a library that contains my struct.
The decoding part isn't working after that
Maybe I should decode twice?? First
Second
Thanks for your help @ricmoo |
Beta Was this translation helpful? Give feedback.
You can use:
utils.defaultAbiCoder.encode([ "address[]", "bytes[]" ], [ [ addr1, addr2 ], [ bytes1, bytes2 ] ])
Let me know if that helps. :)