I read about using events from this source http://solidity.readthedocs.io/en/latest/contracts.html#events I used a simple multiply contract:
contract test1{
uint a;
event event_res(string msg,uint x);
function test1(){
a = 1;
}
function multiply (uint b){
a = a*b;
event_res("the value after multiplying is:",a);
}
function getval() returns(uint){
return a;
}
}
and executed sendtransaction as:
var testing = web3.eth.contract(interface).at(address);
var event = testing.event_res(function(error, result) {
if (!error)
console.log(result.args);
else
console.log(error);
});
var result = testing.multiply.sendTransaction(5,{from : web3.eth.coinbase},function(err,result){
if(err)
console.log(err);
});
I got multiple parameters as output in console as following:
{ msg: 'the value after multiplying is:',
x: { [String: '5'] s: 1, e: 0, c: [ 5 ] } }
Can anyone tell me what these parameters(s,e and c) are and what they mean?