Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xCCbf21ba6EF00802AB06637896B799f7101F54A2
Balance 0 ETH
Nonce 1
Code Size 2695 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2695 bytes
0x606060405236156100cd5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630150246081146100d257806306fdde03146100e7578063095ea7b31461017257806313af4035146101a857806318160ddd146101c957806323b872dd146101ee578063313ce5671461022a57806331c420d414610253578063426a8493146102685780636d1b229d146102a157806370a08231146102cb57806395d89b41146102fc578063a9059cbb14610387578063dd62ed3e146103bd575b600080fd5b34156100dd57600080fd5b6100e56103f4565b005b34156100f257600080fd5b6100fa610458565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101375780820151818401525b60200161011e565b50505050905090810190601f1680156101645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017d57600080fd5b610194600160a060020a036004351660243561049a565b604051901515815260200160405180910390f35b34156101b357600080fd5b6100e5600160a060020a0360043516610507565b005b34156101d457600080fd5b6101dc61054e565b60405190815260200160405180910390f35b34156101f957600080fd5b610194600160a060020a0360043581169060243516604435610555565b604051901515815260200160405180910390f35b341561023557600080fd5b61023d610581565b60405160ff909116815260200160405180910390f35b341561025e57600080fd5b6100e5610587565b005b341561027357600080fd5b610194600160a060020a03600435166024356044356105e7565b604051901515815260200160405180910390f35b34156102ac57600080fd5b61019460043561061b565b604051901515815260200160405180910390f35b34156102d657600080fd5b6101dc600160a060020a03600435166106ab565b60405190815260200160405180910390f35b341561030757600080fd5b6100fa6106ca565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101375780820151818401525b60200161011e565b50505050905090810190601f1680156101645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039257600080fd5b610194600160a060020a036004351660243561070c565b604051901515815260200160405180910390f35b34156103c857600080fd5b6101dc600160a060020a036004358116906024351661073a565b60405190815260200160405180910390f35b60025433600160a060020a0390811691161461040f57600080fd5b60045460ff161515610455576004805460ff191660011790557f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b5b565b610460610a49565b60408051908101604052600481527f4275626f00000000000000000000000000000000000000000000000000000000602082015290505b90565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60025433600160a060020a0390811691161461052257600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b6003545b90565b60045460009060ff161561056b57506000610579565b610576848484610767565b90505b5b9392505050565b60125b90565b60025433600160a060020a039081169116146105a257600080fd5b60045460ff1615610455576004805460ff191690557f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b5b565b6000826105f4338661073a565b141561060b57610576848361049a565b9050610579565b506000610579565b5b9392505050565b600160a060020a033316600090815260208190526040812054821115610643575060006106a4565b60008211156106a057600160a060020a03331660009081526020819052604090205461066f9083610909565b600160a060020a0333166000908152602081905260409020556003546106959083610909565b6003555060016106a4565b5060015b5b5b919050565b600160a060020a0381166000908152602081905260409020545b919050565b6106d2610a49565b60408051908101604052600481527f4255424f00000000000000000000000000000000000000000000000000000000602082015290505b90565b60045460009060ff161561072257506000610501565b61072c8383610920565b9050610501565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b600160a060020a03808416600090815260016020908152604080832033909416835292905290812054829010156107a057506000610579565b600160a060020a038416600090815260208190526040902054829010156107c957506000610579565b600160a060020a03808516600090815260016020908152604080832033909416835292905220546107fa9083610909565b600160a060020a0380861660009081526001602090815260408083203390941683529290529081209190915582118015610846575082600160a060020a031684600160a060020a031614155b156108b757600160a060020a03841660009081526020819052604090205461086e9083610909565b600160a060020a03808616600090815260208190526040808220939093559085168152205461089d9083610a2d565b600160a060020a0384166000908152602081905260409020555b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060015b9392505050565b60008183101561091557fe5b508082035b92915050565b600160a060020a0333166000908152602081905260408120548290101561094957506000610501565b60008211801561096b575082600160a060020a031633600160a060020a031614155b156109dc57600160a060020a0333166000908152602081905260409020546109939083610909565b600160a060020a0333811660009081526020819052604080822093909355908516815220546109c29083610a2d565b600160a060020a0384166000908152602081905260409020555b82600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060015b92915050565b6000600019829003831115610a3e57fe5b508181015b92915050565b602060405190810160405260008152905600a165627a7a7230582039128c38bd4e31f4edd8c4123e9d072b7d41dbdc539251bdff3bc8bb68f535e20029

Verified Source Code Partial Match

Compiler: v0.4.16+commit.d7661dd9 Optimization: Yes (200 runs)
BuboToken.sol 449 lines
pragma solidity ^0.4.16;

/*
 * Abstract Token Smart Contract.  Copyright © 2017 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity ^0.4.16;

/*
 * ERC-20 Standard Token Smart Contract Interface.
 * Copyright © 2016–2017 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity ^0.4.16;

/**
 * ERC-20 standard token interface, as defined
 * <a href="http://github.com/ethereum/EIPs/issues/20">here</a>.
 */
contract Token {
  /**
   * Get total number of tokens in circulation.
   *
   * @return total number of tokens in circulation
   */
  function totalSupply () constant returns (uint256 supply);

  /**
   * Get number of tokens currently belonging to given owner.
   *
   * @param _owner address to get number of tokens currently belonging to the
   *        owner of
   * @return number of tokens currently belonging to the owner of given address
   */
  function balanceOf (address _owner) constant returns (uint256 balance);

  /**
   * Transfer given number of tokens from message sender to given recipient.
   *
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer to the owner of given address
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transfer (address _to, uint256 _value) returns (bool success);

  /**
   * Transfer given number of tokens from given owner to given recipient.
   *
   * @param _from address to transfer tokens from the owner of
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer from given owner to given
   *        recipient
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transferFrom (address _from, address _to, uint256 _value)
  returns (bool success);

  /**
   * Allow given spender to transfer given number of tokens from message sender.
   *
   * @param _spender address to allow the owner of to transfer tokens from
   *        message sender
   * @param _value number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
  function approve (address _spender, uint256 _value) returns (bool success);

  /**
   * Tell how many tokens given spender is currently allowed to transfer from
   * given owner.
   *
   * @param _owner address to get number of tokens allowed to be transferred
   *        from the owner of
   * @param _spender address to get number of tokens allowed to be transferred
   *        by the owner of
   * @return number of tokens given spender is currently allowed to transfer
   *         from given owner
   */
  function allowance (address _owner, address _spender) constant
  returns (uint256 remaining);

  /**
   * Logged when tokens were transferred from one owner to another.
   *
   * @param _from address of the owner, tokens were transferred from
   * @param _to address of the owner, tokens were transferred to
   * @param _value number of tokens transferred
   */
  event Transfer (address indexed _from, address indexed _to, uint256 _value);

  /**
   * Logged when owner approved his tokens to be transferred by some spender.
   *
   * @param _owner owner who approved his tokens to be transferred
   * @param _spender spender who were allowed to transfer the tokens belonging
   *        to the owner
   * @param _value number of tokens belonging to the owner, approved to be
   *        transferred by the spender
   */
  event Approval (
    address indexed _owner, address indexed _spender, uint256 _value);
}

/*
 * Safe Math Smart Contract.  Copyright © 2016–2017 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity ^0.4.16;

/**
 * Provides methods to safely add, subtract and multiply uint256 numbers.
 */
contract SafeMath {
  uint256 constant private MAX_UINT256 =
    0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

  /**
   * Add two uint256 values, throw in case of overflow.
   *
   * @param x first value to add
   * @param y second value to add
   * @return x + y
   */
  function safeAdd (uint256 x, uint256 y)
  constant internal
  returns (uint256 z) {
    assert (x <= MAX_UINT256 - y);
    return x + y;
  }

  /**
   * Subtract one uint256 value from another, throw in case of underflow.
   *
   * @param x value to subtract from
   * @param y value to subtract
   * @return x - y
   */
  function safeSub (uint256 x, uint256 y)
  constant internal
  returns (uint256 z) {
    assert (x >= y);
    return x - y;
  }

  /**
   * Multiply two uint256 values, throw in case of overflow.
   *
   * @param x first value to multiply
   * @param y second value to multiply
   * @return x * y
   */
  function safeMul (uint256 x, uint256 y)
  constant internal
  returns (uint256 z) {
    if (y == 0) return 0; // Prevent division by zero at the next line
    assert (x <= MAX_UINT256 / y);
    return x * y;
  }
}


/**
 * Abstract Token Smart Contract that could be used as a base contract for
 * ERC-20 token contracts.
 */
contract AbstractToken is Token, SafeMath {
  /**
   * Create new Abstract Token contract.
   */
  function AbstractToken () {
    // Do nothing
  }

  /**
   * Get number of tokens currently belonging to given owner.
   *
   * @param _owner address to get number of tokens currently belonging to the
   *        owner of
   * @return number of tokens currently belonging to the owner of given address
   */
  function balanceOf (address _owner) constant returns (uint256 balance) {
    return accounts [_owner];
  }

  /**
   * Transfer given number of tokens from message sender to given recipient.
   *
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer to the owner of given address
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transfer (address _to, uint256 _value) returns (bool success) {
    if (accounts [msg.sender] < _value) return false;
    if (_value > 0 && msg.sender != _to) {
      accounts [msg.sender] = safeSub (accounts [msg.sender], _value);
      accounts [_to] = safeAdd (accounts [_to], _value);
    }
    Transfer (msg.sender, _to, _value);
    return true;
  }

  /**
   * Transfer given number of tokens from given owner to given recipient.
   *
   * @param _from address to transfer tokens from the owner of
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer from given owner to given
   *        recipient
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transferFrom (address _from, address _to, uint256 _value)
  returns (bool success) {
    if (allowances [_from][msg.sender] < _value) return false;
    if (accounts [_from] < _value) return false;

    allowances [_from][msg.sender] =
      safeSub (allowances [_from][msg.sender], _value);

    if (_value > 0 && _from != _to) {
      accounts [_from] = safeSub (accounts [_from], _value);
      accounts [_to] = safeAdd (accounts [_to], _value);
    }
    Transfer (_from, _to, _value);
    return true;
  }

  /**
   * Allow given spender to transfer given number of tokens from message sender.
   *
   * @param _spender address to allow the owner of to transfer tokens from
   *        message sender
   * @param _value number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
  function approve (address _spender, uint256 _value) returns (bool success) {
    allowances [msg.sender][_spender] = _value;
    Approval (msg.sender, _spender, _value);

    return true;
  }

  /**
   * Tell how many tokens given spender is currently allowed to transfer from
   * given owner.
   *
   * @param _owner address to get number of tokens allowed to be transferred
   *        from the owner of
   * @param _spender address to get number of tokens allowed to be transferred
   *        by the owner of
   * @return number of tokens given spender is currently allowed to transfer
   *         from given owner
   */
  function allowance (address _owner, address _spender) constant
  returns (uint256 remaining) {
    return allowances [_owner][_spender];
  }

  /**
   * Mapping from addresses of token holders to the numbers of tokens belonging
   * to these token holders.
   */
  mapping (address => uint256) accounts;

  /**
   * Mapping from addresses of token holders to the mapping of addresses of
   * spenders to the allowances set by these token holders to these spenders.
   */
  mapping (address => mapping (address => uint256)) private allowances;
}


/**
 * Budbo token smart contract.
 */
contract BuboToken is AbstractToken {
  /**
   * Address of the owner of this smart contract.
   */
  address private owner;

  /**
   * Total number of tokens in circulation.
   */
  uint256 tokenCount;

  /**
   * True if tokens transfers are currently frozen, false otherwise.
   */
  bool frozen = false;

  /**
   * Create new Budbo token smart contract, with given number of tokens issued
   * and given to msg.sender, and make msg.sender the owner of this smart
   * contract.
   *
   * @param _tokenCount number of tokens to issue and give to msg.sender
   */
  function BuboToken (uint256 _tokenCount) {
    owner = msg.sender;
    tokenCount = _tokenCount;
    accounts [msg.sender] = _tokenCount;
  }

  /**
   * Get total number of tokens in circulation.
   *
   * @return total number of tokens in circulation
   */
  function totalSupply () constant returns (uint256 supply) {
    return tokenCount;
  }

  /**
   * Get name of this token.
   *
   * @return name of this token
   */
  function name () constant returns (string result) {
    return "Bubo";
  }

  /**
   * Get symbol of this token.
   *
   * @return symbol of this token
   */
  function symbol () constant returns (string result) {
    return "BUBO";
  }

  /**
   * Get number of decimals for this token.
   *
   * @return number of decimals for this token
   */
  function decimals () constant returns (uint8 result) {
    return 18;
  }

  /**
   * Transfer given number of tokens from message sender to given recipient.
   *
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer to the owner of given address
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transfer (address _to, uint256 _value) returns (bool success) {
    if (frozen) return false;
    else return AbstractToken.transfer (_to, _value);
  }

  /**
   * Transfer given number of tokens from given owner to given recipient.
   *
   * @param _from address to transfer tokens from the owner of
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer from given owner to given
   *        recipient
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transferFrom (address _from, address _to, uint256 _value)
    returns (bool success) {
    if (frozen) return false;
    else return AbstractToken.transferFrom (_from, _to, _value);
  }

  /**
   * Change how many tokens given spender is allowed to transfer from message
   * spender.  In order to prevent double spending of allowance, this method
   * receives assumed current allowance value as an argument.  If actual
   * allowance differs from an assumed one, this method just returns false.
   *
   * @param _spender address to allow the owner of to transfer tokens from
   *        message sender
   * @param _currentValue assumed number of tokens currently allowed to be
   *        transferred
   * @param _newValue number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
  function approve (address _spender, uint256 _currentValue, uint256 _newValue)
    returns (bool success) {
    if (allowance (msg.sender, _spender) == _currentValue)
      return approve (_spender, _newValue);
    else return false;
  }

  /**
   * Burn given number of tokens belonging to message sender.
   *
   * @param _value number of tokens to burn
   * @return true on success, false on error
   */
  function burnTokens (uint256 _value) returns (bool success) {
    if (_value > accounts [msg.sender]) return false;
    else if (_value > 0) {
      accounts [msg.sender] = safeSub (accounts [msg.sender], _value);
      tokenCount = safeSub (tokenCount, _value);
      return true;
    } else return true;
  }

  /**
   * Set new owner for the smart contract.
   * May only be called by smart contract owner.
   *
   * @param _newOwner address of new owner of the smart contract
   */
  function setOwner (address _newOwner) {
    require (msg.sender == owner);

    owner = _newOwner;
  }

  /**
   * Freeze token transfers.
   * May only be called by smart contract owner.
   */
  function freezeTransfers () {
    require (msg.sender == owner);

    if (!frozen) {
      frozen = true;
      Freeze ();
    }
  }

  /**
   * Unfreeze token transfers.
   * May only be called by smart contract owner.
   */
  function unfreezeTransfers () {
    require (msg.sender == owner);

    if (frozen) {
      frozen = false;
      Unfreeze ();
    }
  }

  /**
   * Logged when token transfers were frozen.
   */
  event Freeze ();

  /**
   * Logged when token transfers were unfrozen.
   */
  event Unfreeze ();
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 8 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
approve 0x426a8493
address _spender
uint256 _currentValue
uint256 _newValue
returns: bool
burnTokens 0x6d1b229d
uint256 _value
returns: bool
freezeTransfers 0x01502460
No parameters
setOwner 0x13af4035
address _newOwner
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
unfreezeTransfers 0x31c420d4
No parameters

Recent Transactions

No transactions found for this address