I'm declaring a public address array in my contract, but when I call it, I get an error saying it's expecting an argument. Can someone shine a light on what is happening here?
Contract.sol
uint public buyIn;
address[] public playersRegistered;
index.js
// this works
console.log(await contract.methods.buyIn.call());
// this throws an error
console.log(await contract.methods.playersRegistered.call());
Error message:
Unhandled Rejection (Error): The number of arguments is not matching the methods required number. You need to pass 1 arguments.