I'm writing a Dapp, which connect the ether web3 provided by metamask.
How should I handle the response from contract method? I mean some methods that doesn't need to send a transaction.
for example, In my contract there's a public uint field and a public address field.
the code to get the uint field
contractIns.uintField(function(err, result){
if(err){
//error
} else {
//the data is in result.c[0];
}
});
however, the code to get the address field
contractIns.addressField(function(err, result) {
if(err){
//error
} else {
//the result is the data itself
}
});
I mean, is there any documentation about the format of return value format?