I am working on a private test net. I have deployed a contract using Ethereum wallet. And in the contract I have a function to transfer coins from one account to other.
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
}
I am able to transfer coins using Ethereum wallet but didn't know how to do the same using geth console.
Then I came accross eth.contract(ABI).at(Address);
which was a solution to my problem. But while using:
var cont=eth.contract(ABI).at(Address);
cont.transfer("0x506B2FAcCC8fF7f1F9633491985E0b997c6F5Fc7", 100)
I am getting errors:
invalid address
at web3.js:3887:15
at web3.js:3713:20
at web3.js:4939:28
at web3.js:4938:12
at web3.js:4964:18
at web3.js:4989:23
at web3.js:4055:16
at web3.js:4141:16
at <anonymous>:1:1.
I am beginner to Ethereum. Don't know even if I am going right?