ETH Price: $3,423.62 (+3.29%)

Token

Tria (TRIA)
 

Overview

Max Total Supply

276,000.802799488 TRIA

Holders

1,612

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 10 Decimals)

Balance
4.33005 TRIA

Value
$0.00
0xC59845DaB868C7C6e73b3a8edabE4DA28350C08E
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
TriaToken_v2

Compiler Version
v0.4.11+commit.68ef5810

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-10-26
*/

pragma solidity ^0.4.11;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
 library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant 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;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

/*
file:   ReentryProtection.sol
ver:    0.3.0
updated:6-April-2016
author: Darryl Morris
email:  o0ragman0o AT gmail.com

Mutex based reentry protection protect.

This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU lesser General Public License for more details.
<http://www.gnu.org/licenses/>.
*/

contract ReentryProtected
{
  // The reentry protection state mutex.
  bool __reMutex;

  // This modifier can be used on functions with external calls to
  // prevent reentry attacks.
  // Constraints:
  //   Protected functions must have only one point of exit.
  //   Protected functions cannot use the `return` keyword
  //   Protected functions return values must be through return parameters.
  modifier preventReentry() {
    require(!__reMutex);
    __reMutex = true;
    _;
    delete __reMutex;
    return;
  }

  // This modifier can be applied to public access state mutation functions
  // to protect against reentry if a `preventReentry` function has already
  // set the mutex. This prevents the contract from being reenter under a
  // different memory context which can break state variable integrity.
  modifier noReentry() {
    require(!__reMutex);
    _;
  }
}

/*
file:   ERC20.sol
ver:    0.4.4-o0ragman0o
updated:26-July-2017
author: Darryl Morris
email:  o0ragman0o AT gmail.com

An ERC20 compliant token with reentry protection and safe math.

This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See MIT Licence for further details.
<https://opensource.org/licenses/MIT>.

Release Notes
-------------
0.4.4-o0ragman0o
* removed state from interface
* added abstract functions of public state to interface.
* included state into contract implimentation
*/


// ERC20 Standard Token Interface with safe maths and reentry protection
contract ERC20Interface
{
  /* Structs */

  /* State Valiables */

  /* Events */
  // Triggered when tokens are transferred.
  event Transfer(
    address indexed _from,
    address indexed _to,
    uint256 _value);

  // Triggered whenever approve(address _spender, uint256 _value) is called.
  event Approval(
    address indexed _owner,
    address indexed _spender,
    uint256 _value);

  /* Modifiers */

  /* Function Abstracts */

  /// @return The total supply of tokens
  function totalSupply() public constant returns (uint256);

  /// @param _addr The address of a token holder
  /// @return The amount of tokens held by `_addr`
  function balanceOf(address _addr) public constant returns (uint256);

  /// @param _owner The address of a token holder
  /// @param _spender the address of a third-party
  /// @return The amount of tokens the `_spender` is allowed to transfer
  function allowance(address _owner, address _spender) public constant
  returns (uint256);

  /// @notice Send `_amount` of tokens from `msg.sender` to `_to`
  /// @param _to The address of the recipient
  /// @param _amount The amount of tokens to transfer
  function transfer(address _to, uint256 _amount) public returns (bool);

  /// @notice Send `_amount` of tokens from `_from` to `_to` on the condition
  /// it is approved by `_from`
  /// @param _from The address of the sender
  /// @param _to The address of the recipient
  /// @param _amount The amount of tokens to transfer
  function transferFrom(address _from, address _to, uint256 _amount)
  public returns (bool);

  /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
  /// its behalf
  /// @param _spender The address of the approved spender
  /// @param _amount The amount of tokens to transfer
  function approve(address _spender, uint256 _amount) public returns (bool);
}

contract ERC20Token is ReentryProtected, ERC20Interface
{

  using SafeMath for uint256;

  /* State */
  // The Total supply of tokens
  uint256 totSupply;

  
  // Token ownership mapping
  mapping (address => uint256) balance;

  // Allowances mapping
  mapping (address => mapping (address => uint256)) allowed;

  /* Funtions Public */

  function ERC20Token()
  {
    // Supply limited to 2^128 rather than 2^256 to prevent potential 
    // multiplication overflow
    
    totSupply = 0;
    balance[msg.sender] = totSupply;
  }

  // Using an explicit getter allows for function overloading    
  function totalSupply()
  public
  constant
  returns (uint256)
  {
    return totSupply;
  }


  // Using an explicit getter allows for function overloading    
  function balanceOf(address _addr)
  public
  constant
  returns (uint256)
  {
    return balance[_addr];
  }

  // Using an explicit getter allows for function overloading    
  function allowance(address _owner, address _spender)
  public
  constant
  returns (uint256 remaining_)
  {
    return allowed[_owner][_spender];
  }


  // Send _value amount of tokens to address _to
  // Reentry protection prevents attacks upon the state
  function transfer(address _to, uint256 _value)
  public
  noReentry
  returns (bool)
  {
    return xfer(msg.sender, _to, _value);
  }

  // Send _value amount of tokens from address _from to address _to
  // Reentry protection prevents attacks upon the state
  function transferFrom(address _from, address _to, uint256 _value)
  public
  noReentry
  returns (bool)
  {
    require(_value <= allowed[_from][msg.sender]);
    allowed[_from][msg.sender] -= _value;
    return xfer(_from, _to, _value);
  }

  // Process a transfer internally.
  function xfer(address _from, address _to, uint256 _value)
  internal
  returns (bool)
  {
    require(_value > 0 && _value <= balance[_from]);
    balance[_from] -= _value;
    balance[_to] += _value;
    Transfer(_from, _to, _value);
    return true;
  }

  // Approves a third-party spender
  // Reentry protection prevents attacks upon the state
  function approve(address _spender, uint256 _value)
  public
  noReentry
  returns (bool)
  {
    require(balance[msg.sender] != 0);
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }
}

  /**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
 contract Ownable {
  address public owner;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
   function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
   modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
   function transferOwnership(address newOwner) onlyOwner {
    require(newOwner != address(0));      
    owner = newOwner;
  }

}


/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */

 contract MintableToken is ERC20Token, Ownable {
  using SafeMath for uint256;
  event Mint(address indexed to, uint256 amount);
  event MintFinished();

  bool public mintingFinished = false;


  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  /**
   * @dev Function to mint tokens
   * @param _to The address that will recieve the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */
   function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
    totSupply = totSupply.add(_amount);
    balance[_to] = balance[_to].add(_amount);
    Mint(_to, _amount);
    Transfer(0x0, _to, _amount);
    return true;
  }

    /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
   function finishMinting() onlyOwner returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }
}
/**
 * @title SimpleToken
 * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. 
 * Note they can later distribute these tokens as they wish using `transfer` and other
 * `StandardToken` functions.
 */
 contract TriaToken_v2 is MintableToken {

  string public constant name = "TriaToken";
  string public constant symbol = "TRIA";
  uint256 public constant decimals = 10;
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining_","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

60606040526004805460a060020a60ff02191690555b5b60006001819055600160a060020a0333168152600260205260408120555b60048054600160a060020a03191633600160a060020a03161790555b5b610936806100606000396000f300606060405236156100cd5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100cf57806306fdde03146100f3578063095ea7b31461018357806318160ddd146101b657806323b872dd146101d8578063313ce5671461021157806340c10f191461023357806370a08231146102665780637d64bcb4146102945780638da5cb5b146102b857806395d89b41146102e4578063a9059cbb14610374578063dd62ed3e146103a7578063f2fde38b146103db575bfe5b34156100d757fe5b6100df6103f9565b604080519115158252519081900360200190f35b34156100fb57fe5b61010361041a565b604080516020808252835181830152835191928392908301918501908083838215610149575b80518252602083111561014957601f199092019160209182019101610129565b505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018b57fe5b6100df600160a060020a0360043516602435610451565b604080519115158252519081900360200190f35b34156101be57fe5b6101c66104f0565b60408051918252519081900360200190f35b34156101e057fe5b6100df600160a060020a03600435811690602435166044356104f7565b604080519115158252519081900360200190f35b341561021957fe5b6101c6610580565b60408051918252519081900360200190f35b341561023b57fe5b6100df600160a060020a0360043516602435610585565b604080519115158252519081900360200190f35b341561026e57fe5b6101c6600160a060020a03600435166106ab565b60408051918252519081900360200190f35b341561029c57fe5b6100df6106ca565b604080519115158252519081900360200190f35b34156102c057fe5b6102c861074f565b60408051600160a060020a039092168252519081900360200190f35b34156102ec57fe5b61010361075e565b604080516020808252835181830152835191928392908301918501908083838215610149575b80518252602083111561014957601f199092019160209182019101610129565b505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037c57fe5b6100df600160a060020a0360043516602435610795565b604080519115158252519081900360200190f35b34156103af57fe5b6101c6600160a060020a03600435811690602435166107bc565b60408051918252519081900360200190f35b34156103e357fe5b6103f7600160a060020a03600435166107e9565b005b60045474010000000000000000000000000000000000000000900460ff1681565b60408051808201909152600981527f54726961546f6b656e0000000000000000000000000000000000000000000000602082015281565b6000805460ff16156104635760006000fd5b600160a060020a03331660009081526002602052604090205415156104885760006000fd5b600160a060020a03338116600081815260036020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b5b92915050565b6001545b90565b6000805460ff16156105095760006000fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561053d5760006000fd5b600160a060020a0380851660009081526003602090815260408083203390941683529290522080548390039055610575848484610848565b90505b5b9392505050565b600a81565b60045460009033600160a060020a039081169116146105a45760006000fd5b60045474010000000000000000000000000000000000000000900460ff16156105cd5760006000fd5b6001546105e0908363ffffffff6108f016565b600155600160a060020a03831660009081526002602052604090205461060c908363ffffffff6108f016565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060015b5b5b92915050565b600160a060020a0381166000908152600260205260409020545b919050565b60045460009033600160a060020a039081169116146106e95760006000fd5b6004805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a15060015b5b90565b600454600160a060020a031681565b60408051808201909152600481527f5452494100000000000000000000000000000000000000000000000000000000602082015281565b6000805460ff16156107a75760006000fd5b6107b2338484610848565b90505b5b92915050565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b60045433600160a060020a039081169116146108055760006000fd5b600160a060020a038116151561081b5760006000fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60006000821180156108725750600160a060020a0384166000908152600260205260409020548211155b151561087e5760006000fd5b600160a060020a03808516600081815260026020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6000828201838110156108ff57fe5b8091505b50929150505600a165627a7a72305820996bd1acd0bc34e83889da2e93030d9eb61da6d6d4006f5fb543d34de70d0e960029

Deployed Bytecode

0x606060405236156100cd5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100cf57806306fdde03146100f3578063095ea7b31461018357806318160ddd146101b657806323b872dd146101d8578063313ce5671461021157806340c10f191461023357806370a08231146102665780637d64bcb4146102945780638da5cb5b146102b857806395d89b41146102e4578063a9059cbb14610374578063dd62ed3e146103a7578063f2fde38b146103db575bfe5b34156100d757fe5b6100df6103f9565b604080519115158252519081900360200190f35b34156100fb57fe5b61010361041a565b604080516020808252835181830152835191928392908301918501908083838215610149575b80518252602083111561014957601f199092019160209182019101610129565b505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018b57fe5b6100df600160a060020a0360043516602435610451565b604080519115158252519081900360200190f35b34156101be57fe5b6101c66104f0565b60408051918252519081900360200190f35b34156101e057fe5b6100df600160a060020a03600435811690602435166044356104f7565b604080519115158252519081900360200190f35b341561021957fe5b6101c6610580565b60408051918252519081900360200190f35b341561023b57fe5b6100df600160a060020a0360043516602435610585565b604080519115158252519081900360200190f35b341561026e57fe5b6101c6600160a060020a03600435166106ab565b60408051918252519081900360200190f35b341561029c57fe5b6100df6106ca565b604080519115158252519081900360200190f35b34156102c057fe5b6102c861074f565b60408051600160a060020a039092168252519081900360200190f35b34156102ec57fe5b61010361075e565b604080516020808252835181830152835191928392908301918501908083838215610149575b80518252602083111561014957601f199092019160209182019101610129565b505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037c57fe5b6100df600160a060020a0360043516602435610795565b604080519115158252519081900360200190f35b34156103af57fe5b6101c6600160a060020a03600435811690602435166107bc565b60408051918252519081900360200190f35b34156103e357fe5b6103f7600160a060020a03600435166107e9565b005b60045474010000000000000000000000000000000000000000900460ff1681565b60408051808201909152600981527f54726961546f6b656e0000000000000000000000000000000000000000000000602082015281565b6000805460ff16156104635760006000fd5b600160a060020a03331660009081526002602052604090205415156104885760006000fd5b600160a060020a03338116600081815260036020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b5b92915050565b6001545b90565b6000805460ff16156105095760006000fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561053d5760006000fd5b600160a060020a0380851660009081526003602090815260408083203390941683529290522080548390039055610575848484610848565b90505b5b9392505050565b600a81565b60045460009033600160a060020a039081169116146105a45760006000fd5b60045474010000000000000000000000000000000000000000900460ff16156105cd5760006000fd5b6001546105e0908363ffffffff6108f016565b600155600160a060020a03831660009081526002602052604090205461060c908363ffffffff6108f016565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060015b5b5b92915050565b600160a060020a0381166000908152600260205260409020545b919050565b60045460009033600160a060020a039081169116146106e95760006000fd5b6004805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a15060015b5b90565b600454600160a060020a031681565b60408051808201909152600481527f5452494100000000000000000000000000000000000000000000000000000000602082015281565b6000805460ff16156107a75760006000fd5b6107b2338484610848565b90505b5b92915050565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b60045433600160a060020a039081169116146108055760006000fd5b600160a060020a038116151561081b5760006000fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60006000821180156108725750600160a060020a0384166000908152600260205260409020548211155b151561087e5760006000fd5b600160a060020a03808516600081815260026020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6000828201838110156108ff57fe5b8091505b50929150505600a165627a7a72305820996bd1acd0bc34e83889da2e93030d9eb61da6d6d4006f5fb543d34de70d0e960029

Swarm Source

bzzr://996bd1acd0bc34e83889da2e93030d9eb61da6d6d4006f5fb543d34de70d0e96
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.