5

I'm trying to pass the format of array of structs as argument on smart contract write function on etherscan,

This is solidity example:

Info[] public info;

struct Info { 
    address userAddress;
    uint256 amount;   
    bool active; 
} 

enter image description here Javascript example:

const data = [{0x0000, 10000000000, false},{0x11111, 20000000000, true}]

Can anyone convert this data example to tuple[] and provide it? Thanks in advance

Giorgiu
  • 199
  • 1
  • 3
  • 10

1 Answers1

4

You must add the value in Etherscan input like this:

[["0x0000", "10000000000", false],["0x11111", "20000000000", true]]
Criticus
  • 101
  • 2
  • I have a struct struct PricingOption { uint208 price; uint40 numberOfEntries; } I tried to pass params the same way as you wrote and it didn't work for me: invalid tuple value – GorgeousPuree Aug 10 '23 at 22:23