Skip to content

Rename CODE_OF_CONDUCT.md to CODE UI - #664

Open
sardorbekmutalipov76-ship-ith wants to merge 1 commit into
github:mainfrom
sardorbekmutalipov76-ship-ith:patch-1
Open

sardorbekmutalipov76-ship-ith wants to merge 1 commit into
github:mainfrom
sardorbekmutalipov76-ship-ith:patch-1

Conversation

@sardorbekmutalipov76-ship-ith

Copy link
Copy Markdown

CODE

@Maritant

Maritant commented Nov 3, 2026

Copy link
Copy Markdown

pragma solidity ^0.4.18;

import './SafeMath.sol';

/**

  • @title ERC20Basic
  • @dev Simpler version of ERC20 interface
  • @dev see ERC: Simpler Token Standard ethereum/EIPs#179
    */
    contract ERC20Basic {
    function totalSupply() public constant returns (uint);
    function balanceOf(address who) public view returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    }

/**

  • @title Basic token
  • @dev Basic version of StandardToken, with no allowances.
    */
    contract BasicToken is ERC20Basic {
    using SafeMath for uint256;

mapping(address => uint256) balances;

/**

  • @dev transfer token for a specified address

  • @PARAM _to The address to transfer to.

  • @PARAM _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
    }

/**

  • @dev Gets the balance of the specified address.
  • @PARAM _owner The address to query the the balance of.
  • @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address _owner) public view returns (uint256 balance) {
    return balances[_owner];
    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants