Understanding the Required Input Formats for Read/Write Contract Tab

On Etherscan, the utilization of tuples in the context of Solidity contracts is common. When engaging with the Read or/and Write Contract functionalities on Etherscan, tuple values may appear in the input and output fields of the contract. There are two formats for inputting tuple values into the input fields.

To access this feature, navigate to any verified contract page on Etherscan and proceed to the Read and Write Contract tab located in the Token Information section, as depicted below.

At this stage, a simplified version of the code will be visible under the Read and Write Contract tab. Further information on these functionalities is available here. In the example illustrated below, after expanding the function box, several input fields are visible in function 1 and one input field is present in section 3.

In essence, both of these are tuples, but 1) has only one level of tuple, while 2) supports one level of nested tuple in the input field. To execute the nested tuple, place it in a bracket.

For any word or sentence, ensure to enclose it in quotation marks to enable it to pass through as depicted below.

By doing so, nested tuple functionality can be achieved by adding brackets and quotation marks to the parameters.

For one level tuple, as illustrated in 1), input the value into the relevant field without any requirement for brackets or quotation marks. However, it is imperative to input the parameters into the specified fields, as exemplified.

Please refer to our glossary if you have any queries regarding the terminologies used in this article.

Faiz Adnan
Faiz Adnan
Last updated: