aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/zeppelin/token/StandardToken.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-24 20:51:37 +0800
committerchriseth <chris@ethereum.org>2018-10-24 20:52:55 +0800
commiteded236e67d714802e62365381c6aa2588a091c5 (patch)
tree8213d65d048e33743eaefef7ad1435f5071a6146 /test/compilationTests/zeppelin/token/StandardToken.sol
parentf5f977eaf5b57c5fbed99692eed1b6e3b0f5527f (diff)
downloaddexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.gz
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.bz2
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.lz
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.xz
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.zst
dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.zip
Only run zeppelin as external tests.
Diffstat (limited to 'test/compilationTests/zeppelin/token/StandardToken.sol')
-rw-r--r--test/compilationTests/zeppelin/token/StandardToken.sol65
1 files changed, 0 insertions, 65 deletions
diff --git a/test/compilationTests/zeppelin/token/StandardToken.sol b/test/compilationTests/zeppelin/token/StandardToken.sol
deleted file mode 100644
index 56f4a5f3..00000000
--- a/test/compilationTests/zeppelin/token/StandardToken.sol
+++ /dev/null
@@ -1,65 +0,0 @@
-pragma solidity ^0.4.11;
-
-
-import './BasicToken.sol';
-import './ERC20.sol';
-
-
-/**
- * @title Standard ERC20 token
- *
- * @dev Implementation of the basic standard token.
- * @dev https://github.com/ethereum/EIPs/issues/20
- * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
- */
-contract StandardToken is ERC20, BasicToken {
-
- mapping (address => mapping (address => uint256)) allowed;
-
-
- /**
- * @dev Transfer tokens from one address to another
- * @param _from address The address which you want to send tokens from
- * @param _to address The address which you want to transfer to
- * @param _value uint256 the amount of tokens to be transferred
- */
- function transferFrom(address _from, address _to, uint256 _value) public {
- uint256 _allowance = allowed[_from][msg.sender];
-
- // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
- // if (_value > _allowance) revert();
-
- balances[_to] = balances[_to].add(_value);
- balances[_from] = balances[_from].sub(_value);
- allowed[_from][msg.sender] = _allowance.sub(_value);
- emit Transfer(_from, _to, _value);
- }
-
- /**
- * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
- * @param _spender The address which will spend the funds.
- * @param _value The amount of tokens to be spent.
- */
- function approve(address _spender, uint256 _value) public {
-
- // To change the approve amount you first have to reduce the addresses`
- // allowance to zero by calling `approve(_spender, 0)` if it is not
- // already 0 to mitigate the race condition described here:
- // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
- if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) revert();
-
- allowed[msg.sender][_spender] = _value;
- emit Approval(msg.sender, _spender, _value);
- }
-
- /**
- * @dev Function to check the amount of tokens that an owner allowed to a spender.
- * @param _owner address The address which owns the funds.
- * @param _spender address The address which will spend the funds.
- * @return A uint256 specifying the amount of tokens still available for the spender.
- */
- function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
- return allowed[_owner][_spender];
- }
-
-}