I have a counter in a Solidity contract:
uint8 public transactionCounter;
function ContractConstructor() public {
transactionCounter = 0;
}
function getTransactionCounter() returns (uint8) {
return transactionCounter;
}
function trns() {
transactionCounter += 1;
}
When interacting with the contract, i get back the transactionCounter
App.contract.XYContract.deployed()then(function(instance){
return instance.getTransactionCounter.call();
}).then(function(counter) {
console.log(counter);
});
In the JavaScript console, I get:
e {s: 1, e: 0, c: Array(1)}
What are s, e and c and where is it documented?
result: http://truffleframework.com/docs/getting_started/contracts#processing-transaction-results – TMOTTM Jan 17 '18 at 20:52.toString()on it.) – user19510 Jan 17 '18 at 21:27.toString()it, it gave me[Object object]on the console. – TMOTTM Jan 17 '18 at 22:24web3.jsitself returnsBigNumberobjects when the return value is numeric, and what you pasted certainly looks like one. – user19510 Jan 17 '18 at 22:37.toString)? – user19510 Jan 17 '18 at 22:39