Maya Preferred Token


#28

Token Information:

  1. Contract type: ERC-223 standard Token

  2. Environment: (Ethereum Classic Main platform)

  3. Contract Address: 0x36a4760522213ba634fac7297e09585e8cce99b4

  4. Address URL link: https://blockscout.com/etc/mainnet/address/0x36a4760522213ba634fac7297e09585e8cce99b4/transactions

  5. Token explorer: https://blockscout.com/etc/mainnet/tokens/0x36a4760522213ba634fac7297e09585e8cce99b4/token_transfers

  6. Verified Source code: https://blockscout.com/etc/mainnet/address/0x36a4760522213ba634fac7297e09585e8cce99b4/contracts

  7. Sent full tokens to your address proof: https://blockscout.com/etc/mainnet/tx/0x8cff0a6792e035c668285db3fb0f1f3f67191b23eb9884ede521e16964c1c81c/token_transfers

  8. You own full token (proof): https://blockscout.com/etc/mainnet/tokens/0x36a4760522213ba634fac7297e09585e8cce99b4/token_holders

Saturn network Technical Listing:

Trading URL:

https://www.saturn.network/exchange/ETC/create-order/0x36a4760522213ba634fac7297e09585e8cce99b4/0x0000000000000000000000000000000000000000

Basic Information:

Token name : Maya Preferred
Token symbol: MAYAP
Token decimal: 18
Token Total Supply: 250,000,000


#29
pragma solidity ^0.4.24;

/*
 * Maya Preferred Token ERC223 smart contract for ethereum classic blockchain
 */

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
contract SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}


contract ERC223 {
  uint public totalSupply;
  function balanceOf(address who) constant returns (uint);

  function name() constant returns (string _name);
  function symbol() constant returns (string _symbol);
  function decimals() constant returns (uint8 _decimals);
  function totalSupply() constant returns (uint256 _supply);

  function transfer(address to, uint value) returns (bool ok);
  function transfer(address to, uint value, bytes data) returns (bool ok);
  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event ERC223Transfer(address indexed _from, address indexed _to, uint256 _value, bytes _data);
}

contract ContractReceiver {
  function tokenFallback(address _from, uint _value, bytes _data);
}

contract ERC223Token is ERC223, SafeMath {

  mapping(address => uint) balances;

  string public name;
  string public symbol;
  uint8 public decimals;
  uint256 public totalSupply;


  // Function to access name of token .
  function name() constant returns (string _name) {
      return name;
  }
  // Function to access symbol of token .
  function symbol() constant returns (string _symbol) {
      return symbol;
  }
  // Function to access decimals of token .
  function decimals() constant returns (uint8 _decimals) {
      return decimals;
  }
  // Function to access total supply of tokens .
  function totalSupply() constant returns (uint256 _totalSupply) {
      return totalSupply;
  }

  // Function that is called when a user or another contract wants to transfer funds .
  function transfer(address _to, uint _value, bytes _data) returns (bool success) {
    if(isContract(_to)) {
        return transferToContract(_to, _value, _data);
    }
    else {
        return transferToAddress(_to, _value, _data);
    }
}

  // Standard function transfer similar to ERC20 transfer with no _data .
  // Added due to backwards compatibility reasons .
  function transfer(address _to, uint _value) returns (bool success) {

    //standard function transfer similar to ERC20 transfer with no _data
    //added due to backwards compatibility reasons
    bytes memory empty;
    if(isContract(_to)) {
        return transferToContract(_to, _value, empty);
    }
    else {
        return transferToAddress(_to, _value, empty);
    }
}

//assemble the given address bytecode. If bytecode exists then the _addr is a contract.
  function isContract(address _addr) private returns (bool is_contract) {
      uint length;
      assembly {
            //retrieve the size of the code on target address, this needs assembly
            length := extcodesize(_addr)
        }
        if(length>0) {
            return true;
        }
        else {
            return false;
        }
    }

  //function that is called when transaction target is an address
  function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
    if (balanceOf(msg.sender) < _value) revert();
    balances[msg.sender] = balanceOf(msg.sender).sub(_value);
    balances[_to] = balanceOf(_to).add(_value);
    Transfer(msg.sender, _to, _value);
    ERC223Transfer(msg.sender, _to, _value, _data);
    return true;
  }

  //function that is called when transaction target is a contract
  function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
    if (balanceOf(msg.sender) < _value) revert();
    balances[msg.sender] = balanceOf(msg.sender).sub(_value);
    balances[_to] = balanceOf(_to).add(_value);
    ContractReceiver reciever = ContractReceiver(_to);
    reciever.tokenFallback(msg.sender, _value, _data);
    Transfer(msg.sender, _to, _value);
    ERC223Transfer(msg.sender, _to, _value, _data);
    return true;
  }


  function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
  }
}



contract MAYAP is ERC223Token {
  using SafeMath for uint256;

  string public name = "Maya Preferred";
  string public symbol = "MAYAP";
  uint public decimals = 18;
  uint public totalSupply = 250000000 * (10**decimals);

  address private treasury = 0xbD279A79F5C6e084D498a6f445B691BFaF10b16c;
  uint256 private priceDiv = 600;
  
  event Purchase(address indexed purchaser, uint256 amount);

  constructor() public {
    balances[msg.sender] = 250000000 * (10**decimals);
    balances[0x0] = 0 * (10**decimals);
  }

  function () public payable {
    bytes memory empty;
    if (msg.value == 0) { revert(); }
    uint256 purchasedAmount = msg.value.div(priceDiv);
    if (purchasedAmount == 0) { revert(); } // not enough ETC sent
    if (purchasedAmount > balances[0x0]) { revert(); } // too much ETC sent

    treasury.transfer(msg.value);
    balances[0x0] = balances[0x0].sub(purchasedAmount);
    balances[msg.sender] = balances[msg.sender].add(purchasedAmount);

    emit Transfer(0x0, msg.sender, purchasedAmount);
    emit ERC223Transfer(0x0, msg.sender, purchasedAmount, empty);
    emit Purchase(msg.sender, purchasedAmount);
  }
}

#30

Created pull request to add token details

These are proof


#31

Please watch out for the upcoming Maya Preferred news. U. K. Financial Ltd, the Creator of Maya Preferred will be releasing news shortly. For now please go to our website at
www.MayaPreferred.io