Contract code:
function rand( uint256 seedB ) returns (uint256){
//define seedA variable
uint256 seedA = 1;
uint amount = 1 finney;
if (seedA == seedB) {
msg.sender.send(amount);
}
return seedA + seedB;
}
https://gist.github.com/anonymous/e210a052b6b4c86337c2
Basically, if SeedA
(which equals 1) equals SeedB
it sends amount
to msg.sender.
Why does this not work, when I am calling the function using:
random.rand.sendTransaction(1,
{from: eth.accounts[0],
value: web3.toWei(.0001, 'ether'),
to: '0x4abc14efad9a7a84a0a9ef6e1a782c43a9e3f550',
gas: 500000, data: web3.fromAscii('message')})
Here is the contract address: https://www.etherchain.org/account/0x4abc14efad9a7a84a0a9ef6e1a782c43a9e3f550
Am I invoking the contract improperly in the sendTransaction? I am invoking it from inside my local geth client.
How do I ensure my parameter (1) is passed into the contract function rand
via sendTransaction?