How to pass a two-dimensional array as a function argument in Etherscan?

Viewed 526

I need to call a contract function from Etherscan that takes a 2d array as an argument, namely: foo (address[][]).

I have tried every thinkable way to call the function with no success. Etherscan displays error

expected array value (arg="foo", coderType="array", value="0xabscde1234567887654321abcde")

What is the correct way to call the function?

2 Answers

Try this statement to pass into a function an address multidimensional array:

[["ADDRESS_1","ADDRESS_2"]]

If you want to pass more address in a second index of matrix you can use this statement:

[["ADDRESS_1","ADDRESS_2"],["ADDRESS_1", "ADDRESS_2"]]

This works with Remix, but not etherscan. No quotes necessary. Should work for addresses too.

[[1,2],[6,9],[2323,10]]
Related