I'm building a web interface for my dapp, but can't seem to retrieve individual struct
items from a public array.
I'm trying to retrieve a Proposal
struct from the proposals()
public function in my contract (I have a Proposal[] public proposals;
array).
So the user enters a particular proposalID
and they should be returned the Proposal
struct. The method works fine on Remix.
However, I'm getting this alert:
error BigNumber Error: new BigNumber() not a base 16 number
I've verified the ABI is correct when I initialize my JS myContract object.
What's causing this error? Here's the code that's resulting in an error:
myContract.proposals(propID, function(error, result) {
if(!error) {
alert("Result: " + result);
} else {
alert("There was a problem: " + error);
}
});
All the other functions work (ie. myContract.owner
etc).
internal
use...need to make an accessor method that returns the relevant parts.