ETH Price: $3,339.78 (-0.28%)

Token

CryptoBotsBattle (CBTB)
 

Overview

Max Total Supply

20,000 CBTB

Holders

13,250 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Filtered by Token Holder
daaab.eth
Balance
1 CBTB

Value
$0.00
0x12a0e25e62c1dbd32e505446062b26aecb65f028
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:
BattleToken

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-03-13
*/

pragma solidity ^0.4.18;

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


contract BattleToken is Ownable {
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    uint256 constant private MAX_UINT256 = 2**256 - 1;
    mapping (address => uint256) public balances;
    mapping (address => mapping (address => uint256)) public allowed;
    uint256 public totalSupply;
    string public name = "https://cryptobots.me/cbtb - CryptoBotsBattle";
    uint8 public decimals = 0;
    string public symbol = "CBTB";

    address public fights;

    function setFightsAddress(address _fights) public onlyOwner {
        fights = _fights;
    }

    function create(uint _amount) public onlyOwner {
        balances[msg.sender] = safeAdd(balances[msg.sender], _amount);
        totalSupply = safeAdd(totalSupply, _amount);
    }

    function transfer(address _to, uint256 _value) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender], _value);
        balances[_to] = safeAdd(balances[_to], _value);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function batchTransfer(address[] _to, uint _value) public {
        balances[msg.sender] = safeSub(
            balances[msg.sender], _to.length * _value
        );
        for (uint i = 0; i < _to.length; i++) {
            balances[_to[i]] = safeAdd(balances[_to[i]], _value);
            Transfer(msg.sender, _to[i], _value);
        }
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        balances[_to] = safeAdd(balances[_to], _value);
        balances[_from] = safeSub(balances[_from], _value);
        if (_to != fights) {
            allowed[_from][msg.sender] = safeSub(allowed[_from][msg.sender], _value);
        }
        Transfer(_from, _to, _value);
        return true;
    }

    function balanceOf(address _owner) public view returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) public returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

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

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

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_fights","type":"address"}],"name":"setFightsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fights","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"create","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address[]"},{"name":"_value","type":"uint256"}],"name":"batchTransfer","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":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"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"}]

6060604052606060405190810160405280602d81526020017f68747470733a2f2f63727970746f626f74732e6d652f63627462202d2043727981526020017f70746f426f7473426174746c650000000000000000000000000000000000000081525060049080516100749291602001906100e7565b506005805460ff1916905560408051908101604052600481527f4342544200000000000000000000000000000000000000000000000000000000602082015260069080516100c69291602001906100e7565b5060008054600160a060020a03191633600160a060020a0316179055610182565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012857805160ff1916838001178555610155565b82800160010185558215610155579182015b8281111561015557825182559160200191906001019061013a565b50610161929150610165565b5090565b61017f91905b80821115610161576000815560010161016b565b90565b610a4e806101916000396000f3006060604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b557806323b872dd146101da57806327e235e314610202578063313ce56714610221578063325c35c51461024a5780635c6581651461026b5780636cd8f7721461029057806370a08231146102bf578063780900dc146102de57806383f12fec146102f45780638da5cb5b1461034557806395d89b4114610358578063a9059cbb1461036b578063dd62ed3e1461038d578063f2fde38b146103b2575b600080fd5b341561010057600080fd5b6101086103d1565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014457808201518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018a57600080fd5b6101a1600160a060020a036004351660243561046f565b604051901515815260200160405180910390f35b34156101c057600080fd5b6101c86104db565b60405190815260200160405180910390f35b34156101e557600080fd5b6101a1600160a060020a03600435811690602435166044356104e1565b341561020d57600080fd5b6101c8600160a060020a0360043516610607565b341561022c57600080fd5b610234610619565b60405160ff909116815260200160405180910390f35b341561025557600080fd5b610269600160a060020a0360043516610622565b005b341561027657600080fd5b6101c8600160a060020a036004358116906024351661066c565b341561029b57600080fd5b6102a3610689565b604051600160a060020a03909116815260200160405180910390f35b34156102ca57600080fd5b6101c8600160a060020a0360043516610698565b34156102e957600080fd5b6102696004356106b3565b34156102ff57600080fd5b6102696004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650509335935061071d92505050565b341561035057600080fd5b6102a361084c565b341561036357600080fd5b61010861085b565b341561037657600080fd5b6101a1600160a060020a03600435166024356108c6565b341561039857600080fd5b6101c8600160a060020a0360043581169060243516610979565b34156103bd57600080fd5b610269600160a060020a03600435166109a4565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104675780601f1061043c57610100808354040283529160200191610467565b820191906000526020600020905b81548152906001019060200180831161044a57829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035481565b600160a060020a03821660009081526001602052604081205461050490836109fa565b600160a060020a0380851660009081526001602052604080822093909355908616815220546105339083610a10565b600160a060020a038086166000908152600160205260409020919091556007548482169116146105b657600160a060020a038085166000908152600260209081526040808320339094168352929052205461058e9083610a10565b600160a060020a03808616600090815260026020908152604080832033909416835292905220555b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019392505050565b60016020526000908152604090205481565b60055460ff1681565b60005433600160a060020a0390811691161461063d57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600260209081526000928352604080842090915290825290205481565b600754600160a060020a031681565b600160a060020a031660009081526001602052604090205490565b60005433600160a060020a039081169116146106ce57600080fd5b600160a060020a0333166000908152600160205260409020546106f190826109fa565b600160a060020a03331660009081526001602052604090205560035461071790826109fa565b60035550565b600160a060020a0333166000908152600160205260408120546107439083855102610a10565b600160a060020a03331660009081526001602052604081209190915590505b8251811015610847576107af6001600085848151811061077e57fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002054836109fa565b600160008584815181106107bf57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020558281815181106107ef57fe5b90602001906020020151600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a3600101610762565b505050565b600054600160a060020a031681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104675780601f1061043c57610100808354040283529160200191610467565b600160a060020a0333166000908152600160205260408120546108e99083610a10565b600160a060020a03338116600090815260016020526040808220939093559085168152205461091890836109fa565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60005433600160a060020a039081169116146109bf57600080fd5b600160a060020a038116156109f7576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600082820183811015610a0957fe5b9392505050565b600082821115610a1c57fe5b509003905600a165627a7a72305820cc9467717604294939004e2d3a21cbe1c87a9b3a24f2d7f3ec70639d630ce2c20029

Deployed Bytecode

0x6060604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b557806323b872dd146101da57806327e235e314610202578063313ce56714610221578063325c35c51461024a5780635c6581651461026b5780636cd8f7721461029057806370a08231146102bf578063780900dc146102de57806383f12fec146102f45780638da5cb5b1461034557806395d89b4114610358578063a9059cbb1461036b578063dd62ed3e1461038d578063f2fde38b146103b2575b600080fd5b341561010057600080fd5b6101086103d1565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014457808201518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018a57600080fd5b6101a1600160a060020a036004351660243561046f565b604051901515815260200160405180910390f35b34156101c057600080fd5b6101c86104db565b60405190815260200160405180910390f35b34156101e557600080fd5b6101a1600160a060020a03600435811690602435166044356104e1565b341561020d57600080fd5b6101c8600160a060020a0360043516610607565b341561022c57600080fd5b610234610619565b60405160ff909116815260200160405180910390f35b341561025557600080fd5b610269600160a060020a0360043516610622565b005b341561027657600080fd5b6101c8600160a060020a036004358116906024351661066c565b341561029b57600080fd5b6102a3610689565b604051600160a060020a03909116815260200160405180910390f35b34156102ca57600080fd5b6101c8600160a060020a0360043516610698565b34156102e957600080fd5b6102696004356106b3565b34156102ff57600080fd5b6102696004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650509335935061071d92505050565b341561035057600080fd5b6102a361084c565b341561036357600080fd5b61010861085b565b341561037657600080fd5b6101a1600160a060020a03600435166024356108c6565b341561039857600080fd5b6101c8600160a060020a0360043581169060243516610979565b34156103bd57600080fd5b610269600160a060020a03600435166109a4565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104675780601f1061043c57610100808354040283529160200191610467565b820191906000526020600020905b81548152906001019060200180831161044a57829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035481565b600160a060020a03821660009081526001602052604081205461050490836109fa565b600160a060020a0380851660009081526001602052604080822093909355908616815220546105339083610a10565b600160a060020a038086166000908152600160205260409020919091556007548482169116146105b657600160a060020a038085166000908152600260209081526040808320339094168352929052205461058e9083610a10565b600160a060020a03808616600090815260026020908152604080832033909416835292905220555b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019392505050565b60016020526000908152604090205481565b60055460ff1681565b60005433600160a060020a0390811691161461063d57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600260209081526000928352604080842090915290825290205481565b600754600160a060020a031681565b600160a060020a031660009081526001602052604090205490565b60005433600160a060020a039081169116146106ce57600080fd5b600160a060020a0333166000908152600160205260409020546106f190826109fa565b600160a060020a03331660009081526001602052604090205560035461071790826109fa565b60035550565b600160a060020a0333166000908152600160205260408120546107439083855102610a10565b600160a060020a03331660009081526001602052604081209190915590505b8251811015610847576107af6001600085848151811061077e57fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002054836109fa565b600160008584815181106107bf57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020558281815181106107ef57fe5b90602001906020020151600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a3600101610762565b505050565b600054600160a060020a031681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104675780601f1061043c57610100808354040283529160200191610467565b600160a060020a0333166000908152600160205260408120546108e99083610a10565b600160a060020a03338116600090815260016020526040808220939093559085168152205461091890836109fa565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60005433600160a060020a039081169116146109bf57600080fd5b600160a060020a038116156109f7576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600082820183811015610a0957fe5b9392505050565b600082821115610a1c57fe5b509003905600a165627a7a72305820cc9467717604294939004e2d3a21cbe1c87a9b3a24f2d7f3ec70639d630ce2c20029

Swarm Source

bzzr://cc9467717604294939004e2d3a21cbe1c87a9b3a24f2d7f3ec70639d630ce2c2
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.