Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
5 months ago
I have to extend my
modifier to support different number of input arguments. Modern languages as
varargs arguments, but I do not see any information about it in
Here is the ambiguous information regarding the stack for input parameters either not limited or limited up to 16 params.
Do you know more about this issue? Is it possible to define
varargs as an input parameter for a
Dec 14, 2022 at 9:33
412 4 4 silver badges 11 11 bronze badges
Solidity currently does not support defining
varargs as an input parameter for a function or modifier. However, there is a way to add anonymous params (e.g. with no name).
Dec 14, 2022 at 16:36
Yongjian P. Yongjian P.
3,890 1 1 gold badge 2 2 silver badges 8 8 bronze badges
In Solidty, codes convert to EVM bytecode in two different ways: directly from solidity code to EVM opcode ("old codegen") or intermediate representation (“IR”) in Yul (“new codegen”), if you have more than 16 variables in one function in old codegen you get "stack is too deep" error, for solving this problem you can pass variables in less than 16 variables packages or using turning on "viaIR" . viaIR lets you use more than 16 variables.
Dec 14, 2022 at 11:52
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only