Sponsored Link:   Synthestech ICO - Unique project: disruptive technology of platinum synthesis. 35% Bonus! Join ICO
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 2 txns
  Latest 2 txns

TxHash Age From To Value [TxFee]
0x0f413080663b164cebd48aa62c9441210ca57f1bb77cf49c10ed3cb1af29a50c5 days 8 hrs ago0x2112f8451e8fb07c866d671334122cd2ddcc182a  IN   0x818e2ad435764b80ee844cf7b2e8036e0a4b7c830 Ether0.000107691
0xf0b5536420509327228fe4f0849d310ff3fb6dda44ff247aaeaa943e513032545 days 11 hrs ago0x2112f8451e8fb07c866d671334122cd2ddcc182a  IN    Contract Creation0 Ether0.000419218
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact match)
Contract Name: HoQuBurner
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.16;

/**
 * @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;
    }
}

/**
 * @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 {
        if (newOwner != address(0)) {
            owner = newOwner;
        }
    }

}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
    event Pause();
    event Unpause();

    bool public paused = false;


    /**
     * @dev modifier to allow actions only when the contract IS paused
     */
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /**
     * @dev modifier to allow actions only when the contract IS NOT paused
     */
    modifier whenPaused {
        require(paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() onlyOwner whenNotPaused returns (bool) {
        paused = true;
        Pause();
        return true;
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() onlyOwner whenPaused returns (bool) {
        paused = false;
        Unpause();
        return true;
    }
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
    uint256 public totalSupply;
    function balanceOf(address who) constant returns (uint256);
    function transfer(address to, uint256 value) 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) returns (bool) {
        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) constant returns (uint256 balance) {
        return balances[_owner];
    }

}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender) constant returns (uint256);
    function transferFrom(address from, address to, uint256 value) returns (bool);
    function approve(address spender, uint256 value) returns (bool);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @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 amout of tokens to be transfered
     */
    function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
        var _allowance = allowed[_from][msg.sender];

        // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
        // require (_value <= _allowance);

        balances[_to] = balances[_to].add(_value);
        balances[_from] = balances[_from].sub(_value);
        allowed[_from][msg.sender] = _allowance.sub(_value);
        Transfer(_from, _to, _value);
        return true;
    }

    /**
     * @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) returns (bool) {

        // 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
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));

        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @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 specifing the amount of tokens still avaible for the spender.
     */
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

}

/**
 * @title HoQuToken
 * @dev HoQu.io token contract.
 */
contract HoQuToken is StandardToken, Pausable {

    string public constant name = "HOQU Token";
    string public constant symbol = "HQX";
    uint32 public constant decimals = 18;

    /**
     * @dev Give all tokens to msg.sender.
     */
    function HoQuToken(uint _totalSupply) {
        require (_totalSupply > 0);
        totalSupply = balances[msg.sender] = _totalSupply;
    }

    function transfer(address _to, uint _value) whenNotPaused returns (bool) {
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint _value) whenNotPaused returns (bool) {
        return super.transferFrom(_from, _to, _value);
    }
}

/**
 * @title HoQuBurner
 * @title HoQu.io contract to burn HQX.
 */
contract HoQuBurner is Ownable {
    using SafeMath for uint256;

    // token instance
    HoQuToken public token;

    mapping(address => uint256) public burned;
    mapping(uint32 => address) public transactionAddresses;
    mapping(uint32 => uint256) public transactionAmounts;
    uint32 public transactionsCount;

    /**
    * Events for token burning
    */
    event TokenBurned(address indexed _sender, uint256 _tokens);

    /**
    * @param _tokenAddress address of a HQX token contract
    */
    function HoQuBurner(address _tokenAddress) {
        token = HoQuToken(_tokenAddress);
    }

    /**
     * Burn particular HQX amount already sent to this contract
     *
     * Should be executed by contract owner (for security reasons).
     * Sender should just send HQX tokens to contract address
     */
    function burnFrom(address _sender, uint256 _tokens) onlyOwner {
        require(_tokens > 0);

        token.transfer(address(0), _tokens);

        transactionAddresses[transactionsCount] = _sender;
        transactionAmounts[transactionsCount] = _tokens;
        transactionsCount++;

        burned[_sender] = burned[_sender].add(_tokens);

        TokenBurned(_sender, _tokens);
    }

    /**
     * Burn particular HQX amount using token allowance
     *
     * Should be executed by sender.
     * Sender should give allowance for specified amount in advance (see approve method of HOQU token contract)
     */
    function burn(uint256 _tokens) {
        token.transferFrom(msg.sender, this, _tokens);
        burnFrom(msg.sender, _tokens);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_tokens","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_tokens","type":"uint256"}],"name":"burnFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"burned","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"transactionAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"transactionAddresses","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"transactionsCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_sender","type":"address"},{"indexed":false,"name":"_tokens","type":"uint256"}],"name":"TokenBurned","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b60405160208061050d8339810160405280805160008054600160a060020a03338116600160a060020a0319928316179092556001805492909316911617905550506104ae8061005f6000396000f30060606040526004361061007f5763ffffffff60e060020a60003504166342966c68811461008457806379cc67901461009c5780638da5cb5b146100be578063a7509b83146100ed578063b626791e1461011e578063f2fde38b1461013a578063fc0c546a14610159578063fd13a2811461016c578063fd99a74614610188575b600080fd5b341561008f57600080fd5b61009a6004356101b4565b005b34156100a757600080fd5b61009a600160a060020a036004351660243561023c565b34156100c957600080fd5b6100d16103ac565b604051600160a060020a03909116815260200160405180910390f35b34156100f857600080fd5b61010c600160a060020a03600435166103bb565b60405190815260200160405180910390f35b341561012957600080fd5b61010c63ffffffff600435166103cd565b341561014557600080fd5b61009a600160a060020a03600435166103df565b341561016457600080fd5b6100d1610436565b341561017757600080fd5b6100d163ffffffff60043516610445565b341561019357600080fd5b61019b610460565b60405163ffffffff909116815260200160405180910390f35b600154600160a060020a03166323b872dd33308460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561021757600080fd5b5af1151561022457600080fd5b5050506040518051905050610239338261023c565b50565b60005433600160a060020a0390811691161461025757600080fd5b6000811161026457600080fd5b600154600160a060020a031663a9059cbb60008360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156102bb57600080fd5b5af115156102c857600080fd5b505050604051805150506005805463ffffffff9081166000908152600360209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03891690811790915585548516845260048352818420879055855463ffffffff19811690861660010186161790955593825260029052919091205461035691839061046c16565b600160a060020a0383166000818152600260205260409081902092909255907f1af5163f80e79b5e554f61e1d052084d3a3fe1166e42a265798c4e2ddce8ffa29083905190815260200160405180910390a25050565b600054600160a060020a031681565b60026020526000908152604090205481565b60046020526000908152604090205481565b60005433600160a060020a039081169116146103fa57600080fd5b600160a060020a038116156102395760008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600154600160a060020a031681565b600360205260009081526040902054600160a060020a031681565b60055463ffffffff1681565b60008282018381101561047b57fe5b93925050505600a165627a7a72305820240647455b7cec8deb5cfaa6406fe27cb68af47f7a381a13f888e53713befde400290000000000000000000000001b957dc4aefeed3b4a2351a6a6d5cbfbba0cecfa

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001b957dc4aefeed3b4a2351a6a6d5cbfbba0cecfa

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 0000000000000000000000001b957dc4aefeed3b4a2351a6a6d5cbfbba0cecfa


   Swarm Source:
bzzr://240647455b7cec8deb5cfaa6406fe27cb68af47f7a381a13f888e53713befde4

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.