For some reason all my functions are able to return my calls except this one particular function. I call it using Truffle.
async function asdf() {
let contractInstance = await MyContract.at('0x...')
let currentSupply = await contractInstance.getCurrentSupply()
console.log(`Current Supply: ${currentSupply}`);
}
When I return it, it doesn't show up as 0
. I put return 1
just to see if it would even return anything, but it's still returning 0
function getCurrentSupply() constant returns (uint256) {
return 1;
}
uint
is an alias foruint256
. And1
is definitely a valid value foruint256
. – user19510 Jan 11 '18 at 1:58