0

Let's say I need a large array of items that are all the combinations of a number of arrays, eg:

['a','b','c','d'...
['1','2','3','4'...
['z','x','c','v'...
...

The resulting list would be something like:

['a1z', 'a1x', 'a1c'... 'b1z', 'b1x', 'b1c'...

Would it be cheaper to use a function that can just build this array at runtime or to store the entire array in the contract itself?

waffl
  • 101
  • 1
  • Are u sure that u can do the second alternative? – Majd TL Oct 25 '21 at 20:54
  • Yes it is possible, but I think I've generally found the answer to my question here: https://ethereum.stackexchange.com/questions/52885/view-pure-gas-usage-cost-gas-if-called-internally-by-another-function – waffl Oct 26 '21 at 09:42
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 26 '21 at 21:34

0 Answers0