0

How to pass more than 20 parameters in solidity function? I have tried using array[] parameter that uses pragma ABIENCODERV2 experimental feature. But this feature cannot be used in production purpose.So is there any other way which passes 20 parameter to the solidity function at a time?

1
  • 20 parameters of the same type? Sure you can use an array without pragma ABIENCODERV2. Otherwise, you might wanna post your code here, so that others will be able to suggest alternatives. Commented Sep 23, 2019 at 7:22

1 Answer 1

1

I don't think so. So your options are:

1) Get by with less

2) Call separate functions to set more values. So in first function set 10 values and in another set another 10 values.

3) Combine data in different parameters into one by for example concatenating string. Note that it's expensive to split the string again into separate parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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