From 9ca4948d6aca230d524882bbcabd1d4230a3ad23 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Fri, 19 Aug 2016 10:51:40 -0400 Subject: CoinAdd .sol prefix to files --- std/StandardToken | 55 --------------------------------------------------- std/StandardToken.sol | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ std/Token | 11 ----------- std/Token.sol | 11 +++++++++++ std/mortal | 8 -------- std/mortal.sol | 8 ++++++++ std/owned | 13 ------------ std/owned.sol | 13 ++++++++++++ std/std | 4 ---- std/std.sol | 4 ++++ 10 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 std/StandardToken create mode 100644 std/StandardToken.sol delete mode 100644 std/Token create mode 100644 std/Token.sol delete mode 100644 std/mortal create mode 100644 std/mortal.sol delete mode 100644 std/owned create mode 100644 std/owned.sol delete mode 100644 std/std create mode 100644 std/std.sol diff --git a/std/StandardToken b/std/StandardToken deleted file mode 100644 index a83b599f..00000000 --- a/std/StandardToken +++ /dev/null @@ -1,55 +0,0 @@ -import "./Token"; - -contract StandardToken is Token { - uint256 tokenSupply; - mapping (address => uint256) balances; - mapping (address => - mapping (address => uint256)) approvedTransfers; - - function StandardToken(address _initialOwner, uint256 _supply) { - tokenSupply = _supply; - balances[_initialOwner] = _supply; - } - - function totalSupply() constant returns (uint256 supply) { - return tokenSupply; - } - - function balanceOf(address _owner) constant returns (uint256 balance) { - return balances[_owner]; - } - - function transfer(address _to, uint256 _value) returns (bool success) { - if (balances[msg.sender] >= _value) { - balances[msg.sender] -= _value; - balances[_to] += _value; - Transfer(msg.sender, _to, _value); - return true; - } - else { - return false; - } - } - - function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { - if (approvedTransfers[_from][msg.sender] >= _value) { - approvedTransfers[_from][msg.sender] -= _value; - balances[_to] += _value; - Transfer(_from, _to, _value); - return true; - } - else { - return false; - } - } - - function approve(address _spender, uint256 _value) returns (bool success) { - approvedTransfers[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); - return true; - } - - function allowance(address _owner, address _spender) constant returns (uint256 remaining) { - return approvedTransfers[_owner][_spender]; - } -} diff --git a/std/StandardToken.sol b/std/StandardToken.sol new file mode 100644 index 00000000..25d0bd38 --- /dev/null +++ b/std/StandardToken.sol @@ -0,0 +1,55 @@ +import "./Token.sol"; + +contract StandardToken is Token { + uint256 tokenSupply; + mapping (address => uint256) balances; + mapping (address => + mapping (address => uint256)) approvedTransfers; + + function StandardToken(address _initialOwner, uint256 _supply) { + tokenSupply = _supply; + balances[_initialOwner] = _supply; + } + + function totalSupply() constant returns (uint256 supply) { + return tokenSupply; + } + + function balanceOf(address _owner) constant returns (uint256 balance) { + return balances[_owner]; + } + + function transfer(address _to, uint256 _value) returns (bool success) { + if (balances[msg.sender] >= _value) { + balances[msg.sender] -= _value; + balances[_to] += _value; + Transfer(msg.sender, _to, _value); + return true; + } + else { + return false; + } + } + + function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { + if (approvedTransfers[_from][msg.sender] >= _value) { + approvedTransfers[_from][msg.sender] -= _value; + balances[_to] += _value; + Transfer(_from, _to, _value); + return true; + } + else { + return false; + } + } + + function approve(address _spender, uint256 _value) returns (bool success) { + approvedTransfers[msg.sender][_spender] = _value; + Approval(msg.sender, _spender, _value); + return true; + } + + function allowance(address _owner, address _spender) constant returns (uint256 remaining) { + return approvedTransfers[_owner][_spender]; + } +} diff --git a/std/Token b/std/Token deleted file mode 100644 index 50d9ab7a..00000000 --- a/std/Token +++ /dev/null @@ -1,11 +0,0 @@ -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) {} -} diff --git a/std/Token.sol b/std/Token.sol new file mode 100644 index 00000000..50d9ab7a --- /dev/null +++ b/std/Token.sol @@ -0,0 +1,11 @@ +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) {} +} diff --git a/std/mortal b/std/mortal deleted file mode 100644 index b32e8a34..00000000 --- a/std/mortal +++ /dev/null @@ -1,8 +0,0 @@ -import "./owned"; - -contract mortal is owned { - function kill() { - if (msg.sender == owner) - selfdestruct(owner); - } -} diff --git a/std/mortal.sol b/std/mortal.sol new file mode 100644 index 00000000..8de019ab --- /dev/null +++ b/std/mortal.sol @@ -0,0 +1,8 @@ +import "./owned.sol"; + +contract mortal is owned { + function kill() { + if (msg.sender == owner) + selfdestruct(owner); + } +} diff --git a/std/owned b/std/owned deleted file mode 100644 index 37f0ecb9..00000000 --- a/std/owned +++ /dev/null @@ -1,13 +0,0 @@ -contract owned { - address owner; - - modifier onlyowner() { - if (msg.sender == owner) { - _ - } - } - - function owned() { - owner = msg.sender; - } -} diff --git a/std/owned.sol b/std/owned.sol new file mode 100644 index 00000000..37f0ecb9 --- /dev/null +++ b/std/owned.sol @@ -0,0 +1,13 @@ +contract owned { + address owner; + + modifier onlyowner() { + if (msg.sender == owner) { + _ + } + } + + function owned() { + owner = msg.sender; + } +} diff --git a/std/std b/std/std deleted file mode 100644 index d5ce157e..00000000 --- a/std/std +++ /dev/null @@ -1,4 +0,0 @@ -import "./owned"; -import "./mortal"; -import "./Token"; -import "./StandardToken"; diff --git a/std/std.sol b/std/std.sol new file mode 100644 index 00000000..c3f66b1b --- /dev/null +++ b/std/std.sol @@ -0,0 +1,4 @@ +import "./owned.sol"; +import "./mortal.sol"; +import "./Token.sol"; +import "./StandardToken.sol"; -- cgit