{ likes[_friend]++; } Functions and Modifiers modifier onlyOwner { if (msg.sender != owner) throw; _; } function makeAdmin(_candidate) public onlyOwner { admin = _candidate; } The rest of the function goes here Looks pretty much like a JS function.
Automatically creates accessor. 2.private a. Only visible in current contract Remember, on blockchain, all data is publicly viewable! also internal and external.
putting up equivalent SGD collateral. b. SGDT <==> SGD exchanger & guarantor. 2. User a. Able to freely transact SGDT. 3.Authority a. Grant license to issuers. http://bit.ly/SGDT-sol
of the token */ uint8 public decimals = 2; uint public totalSupply = 0; address public authority; /* This creates an array with all balances */ mapping (address => uint) public balanceOf; mapping (address => uint) public issuedBy; mapping (address => bool) public isIssuer; } Define state variables http://bit.ly/SGDT-sol
_value) public { if (balanceOf[msg.sender] < _value) { throw; // Check if the sender has enough } balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient // Notify anyone listening that this transfer took place Transfer(msg.sender, _to, _value); } http://bit.ly/SGDT-sol