I'd like to set lots of arguments in solidity functions. I wonder how many arguments contracts can handle. Does it depend on number of arguments or data size?


Someone who is more familiar with the compiler may know otherwise, but at least from looking at the code (libsolidity) that deals with parsing .sol contract code into the compiler, there doesn't appear to be a limit.

(I'm specifically looking at parseFunctionCallListArguments and parseFunctionCallArguments in Parser.cpp.)


It looks like in order to avoid the Stack too deep, although function argument can take 16 parameters, the safest way is to avoid exceeding the 16 parameter number else you run into a Stack too deep error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.