Hi everyone, i would like to create a function with elipsis ( undefined number of params without knowing the types ), i could maybe use msg.data with abi decode ? But since its not know by the abi i dont know how to solve this ?
Please any idea to save me ? <3
Jun 25, 2021, 3:05 PM
Any ways to use variadic params ?
Jun 25, 2021, 3:06 PM
I think what you meant is polymorphism and yeah solidity do support that
Jun 25, 2021, 3:19 PM
Nop ^^ its not what i mean, but i guess there is no way to do any form of variadic params, even with a byte array, there is a way with a byte array choosing how i serialise and deserialize but nevermind ill change my way
Jun 25, 2021, 3:21 PM
Polymorphism can be of help there. Define seperate functions with a single type dynamic array as input on each. You have to call the functions accordingly too, and it does looks complicated
Jun 25, 2021, 3:27 PM
Yes but i want override a function wich take only 1 param so your solution wont help me ^^
Jun 25, 2021, 3:29 PM