aboutsummaryrefslogtreecommitdiffstats
path: root/std
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-15 21:36:05 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-14 22:58:04 +0800
commita02cf83d86489f5d9c9439c79e27fcecb5c5ddb4 (patch)
tree6b523be71cce64075a0f027ebe3c0764dceceb7b /std
parent5b5367dc1237634886a8ccf1029d95b83a0d8e63 (diff)
downloaddexon-solidity-a02cf83d86489f5d9c9439c79e27fcecb5c5ddb4.tar.gz
dexon-solidity-a02cf83d86489f5d9c9439c79e27fcecb5c5ddb4.tar.zst
dexon-solidity-a02cf83d86489f5d9c9439c79e27fcecb5c5ddb4.zip
Update std to contain visibility specifiers
Diffstat (limited to 'std')
-rw-r--r--std/StandardToken.sol14
-rw-r--r--std/Token.sol12
-rw-r--r--std/mortal.sol2
-rw-r--r--std/owned.sol2
4 files changed, 15 insertions, 15 deletions
diff --git a/std/StandardToken.sol b/std/StandardToken.sol
index 51f925e0..2986cb56 100644
--- a/std/StandardToken.sol
+++ b/std/StandardToken.sol
@@ -8,24 +8,24 @@ contract StandardToken is Token {
mapping (address =>
mapping (address => uint256)) m_allowance;
- function StandardToken(address _initialOwner, uint256 _supply) {
+ function StandardToken(address _initialOwner, uint256 _supply) public {
supply = _supply;
balance[_initialOwner] = _supply;
}
- function balanceOf(address _account) constant returns (uint) {
+ function balanceOf(address _account) constant public returns (uint) {
return balance[_account];
}
- function totalSupply() constant returns (uint) {
+ function totalSupply() constant public returns (uint) {
return supply;
}
- function transfer(address _to, uint256 _value) returns (bool success) {
+ function transfer(address _to, uint256 _value) public returns (bool success) {
return doTransfer(msg.sender, _to, _value);
}
- function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
+ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
if (m_allowance[_from][msg.sender] >= _value) {
if (doTransfer(_from, _to, _value)) {
m_allowance[_from][msg.sender] -= _value;
@@ -47,13 +47,13 @@ contract StandardToken is Token {
}
}
- function approve(address _spender, uint256 _value) returns (bool success) {
+ function approve(address _spender, uint256 _value) public returns (bool success) {
m_allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
- function allowance(address _owner, address _spender) constant returns (uint256) {
+ function allowance(address _owner, address _spender) constant public returns (uint256) {
return m_allowance[_owner][_spender];
}
}
diff --git a/std/Token.sol b/std/Token.sol
index 59566f26..4b4eb71e 100644
--- a/std/Token.sol
+++ b/std/Token.sol
@@ -4,10 +4,10 @@ contract Token {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
- function totalSupply() constant returns (uint256 supply);
- function balanceOf(address _owner) constant returns (uint256 balance);
- function transfer(address _to, uint256 _value) returns (bool success);
- function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
- function approve(address _spender, uint256 _value) returns (bool success);
- function allowance(address _owner, address _spender) constant returns (uint256 remaining);
+ function totalSupply() constant public returns (uint256 supply);
+ function balanceOf(address _owner) constant public returns (uint256 balance);
+ function transfer(address _to, uint256 _value) public returns (bool success);
+ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
+ function approve(address _spender, uint256 _value) public returns (bool success);
+ function allowance(address _owner, address _spender) constant public returns (uint256 remaining);
}
diff --git a/std/mortal.sol b/std/mortal.sol
index f0a6f4ce..c43f1e4f 100644
--- a/std/mortal.sol
+++ b/std/mortal.sol
@@ -3,7 +3,7 @@ pragma solidity ^0.4.0;
import "./owned.sol";
contract mortal is owned {
- function kill() {
+ function kill() public {
if (msg.sender == owner)
selfdestruct(owner);
}
diff --git a/std/owned.sol b/std/owned.sol
index bbb8d957..ee9860d3 100644
--- a/std/owned.sol
+++ b/std/owned.sol
@@ -9,7 +9,7 @@ contract owned {
}
}
- function owned() {
+ function owned() public {
owner = msg.sender;
}
}