I have a smart contract that is exposing a list of addresses:
contract AddressBook {
uint public val = 1000;
address[] public addresses;
}
Then I do truffle compile && truffle migrate --reset After that, I run truffle console.
In the console, I bind the contract to a variable:
AddressBook.deployed().then(function(i){ab=i})
Now when I run:
ab.val.call()
It gives me back the proper result.
But when I run:
ab.addresses.call()
It responds with:
Error: Invalid number of arguments to Solidity function
I don't know why. Please help.