mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added space to example code
This commit is contained in:
parent
d4ad3231a2
commit
ff26ea6c08
@ -20,9 +20,11 @@ Storage
|
|||||||
|
|
||||||
contract SimpleStorage {
|
contract SimpleStorage {
|
||||||
uint storedData;
|
uint storedData;
|
||||||
|
|
||||||
function set(uint x) {
|
function set(uint x) {
|
||||||
storedData = x;
|
storedData = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get() constant returns (uint retVal) {
|
function get() constant returns (uint retVal) {
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
@ -88,10 +90,12 @@ registering with username and password - all you need is an Ethereum keypair.
|
|||||||
function Coin() {
|
function Coin() {
|
||||||
minter = msg.sender;
|
minter = msg.sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mint(address receiver, uint amount) {
|
function mint(address receiver, uint amount) {
|
||||||
if (msg.sender != minter) return;
|
if (msg.sender != minter) return;
|
||||||
balances[receiver] += amount;
|
balances[receiver] += amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
function send(address receiver, uint amount) {
|
function send(address receiver, uint amount) {
|
||||||
if (balances[msg.sender] < amount) return;
|
if (balances[msg.sender] < amount) return;
|
||||||
balances[msg.sender] -= amount;
|
balances[msg.sender] -= amount;
|
||||||
|
Loading…
Reference in New Issue
Block a user