I'm beginera beginner.
pragma solidity ^0.4.0;
contract Coin {
// The keyword "public" makes those variables
// readable from outside.
address public minter;
mapping (address => uint) public balances;
// Events allow light clients to react on
// changes efficiently.
event Sent(address from, address to, uint amount);
// This is the constructor whose code is
// run only when the contract is created.
function Coin() {
minter = msg.sender;
}
function mint(address receiver, uint amount) {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Sent(msg.sender, receiver, amount);
}
}
I runran on local console : testrpc -u 0 -u 1testrpc -u 0 -u 1
I runran on Chrome console (result of compilation with https://ethereum.github.io/browser-solidity/)
And i try I tried:
But nothing appendappends :'(
And iI have no idea of why !?
Work This works!! (Return @account[0])
Could someone write me the lines to copy paste into the console to execute an ether transfer with this smart-contract contract?