ETH Price: $3,253.67 (+2.46%)
Gas: 2 Gwei

Token

Battle (BTL)
 

Overview

Max Total Supply

1,000,000 BTL

Holders

423

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
500 BTL

Value
$0.00
0x70437E702E59AE4dF30ED57C506682e310214C79
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.17+commit.bdeb9e52

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.15;

contract Owned {

    address owner;
    
    function Owned() { owner = msg.sender; }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
}

contract TokenEIP20 {

    function balanceOf(address _owner) constant returns (uint256 balance);
    function transfer(address _to, uint256 _value) returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
    function approve(address _spender, uint256 _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint256 remaining);

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
    
}

contract TokenNotifier {

    function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}

library SafeMathLib {

    uint constant WAD = 10 ** 18;
    uint constant RAY = 10 ** 27;

    function add(uint x, uint y) internal returns (uint z) {
        require((z = x + y) >= x);
    }

    function sub(uint x, uint y) internal returns (uint z) {
        require((z = x - y) <= x);
    }

    function mul(uint x, uint y) internal returns (uint z) {
        require(y == 0 || (z = x * y) / y == x);
    }

    function per(uint x, uint y) internal constant returns (uint z) {
        return mul((x / 100), y);
    }

    function min(uint x, uint y) internal returns (uint z) {
        return x <= y ? x : y;
    }

    function max(uint x, uint y) internal returns (uint z) {
        return x >= y ? x : y;
    }

    function imin(int x, int y) internal returns (int z) {
        return x <= y ? x : y;
    }

    function imax(int x, int y) internal returns (int z) {
        return x >= y ? x : y;
    }

    function wmul(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, y), WAD / 2) / WAD;
    }

    function rmul(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, y), RAY / 2) / RAY;
    }

    function wdiv(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, WAD), y / 2) / y;
    }

    function rdiv(uint x, uint y) internal returns (uint z) {
        z = add(mul(x, RAY), y / 2) / y;
    }

    function wper(uint x, uint y) internal constant returns (uint z) {
        return wmul(wdiv(x, 100), y);
    }

    // This famous algorithm is called "exponentiation by squaring"
    // and calculates x^n with x as fixed-point and n as regular unsigned.
    //
    // It's O(log n), instead of O(n) for naive repeated multiplication.
    //
    // These facts are why it works:
    //
    //  If n is even, then x^n = (x^2)^(n/2).
    //  If n is odd,  then x^n = x * x^(n-1),
    //   and applying the equation for even x gives
    //    x^n = x * (x^2)^((n-1) / 2).
    //
    //  Also, EVM division is flooring and
    //    floor[(n-1) / 2] = floor[n / 2].
    //
    function rpow(uint x, uint n) internal returns (uint z) {
        z = n % 2 != 0 ? x : RAY;

        for (n /= 2; n != 0; n /= 2) {
            x = rmul(x, x);

            if (n % 2 != 0) {
                z = rmul(z, x);
            }
        }
    }

}

contract BattleToken is Owned, TokenEIP20 {
    using SafeMathLib for uint256;
    
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
    
    string  public constant name        = "Battle";
    string  public constant symbol      = "BTL";
    uint256 public constant decimals    = 18;
    uint256 public constant totalSupply = 1000000 * (10 ** decimals);

    function BattleToken(address _battleAddress) {
        balances[owner] = totalSupply;
        require(approve(_battleAddress, totalSupply));
    }

    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] < _value) {
            return false;
        }
        balances[msg.sender] = balances[msg.sender].sub(_value);
        assert(balances[msg.sender] >= 0);
        balances[_to] = balances[_to].add(_value);
        assert(balances[_to] <= totalSupply);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] < _value || allowed[_from][msg.sender] < _value) {
            return false;
        }
        balances[_from] = balances[_from].sub(_value);
        assert(balances[_from] >= 0);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        assert(balances[_to] <= totalSupply);        
        Transfer(_from, _to, _value);
        return true;
    }

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

    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
        if (!approve(_spender, _value)) {
            return false;
        }
        TokenNotifier(_spender).receiveApproval(msg.sender, _value, this, _extraData);
        return true;
    }

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

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

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":"decimals","outputs":[{"name":"","type":"uint256"}],"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":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":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","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"},{"inputs":[{"name":"_battleAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"}]

6060604052341561000f57600080fd5b6040516020806109248339810160405280805160008054600160a060020a03191633600160a060020a039081169190911780835516815260016020526040902069d3c21bcecceda10000009081905590925061007a9150829064010000000061008b81026102db1704565b151561008557600080fd5b506100f7565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b61081e806101066000396000f300606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100a6578063095ea7b31461013057806318160ddd1461016657806323b872dd1461018b578063313ce567146101b357806370a08231146101c657806395d89b41146101e5578063a9059cbb146101f8578063cae9ca511461021a578063dd62ed3e1461027f575b600080fd5b34156100b157600080fd5b6100b96102a4565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100f55780820151838201526020016100dd565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013b57600080fd5b610152600160a060020a03600435166024356102db565b604051901515815260200160405180910390f35b341561017157600080fd5b610179610348565b60405190815260200160405180910390f35b341561019657600080fd5b610152600160a060020a0360043581169060243516604435610356565b34156101be57600080fd5b6101796104fb565b34156101d157600080fd5b610179600160a060020a0360043516610500565b34156101f057600080fd5b6100b961051b565b341561020357600080fd5b610152600160a060020a0360043516602435610552565b341561022557600080fd5b61015260048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061067095505050505050565b341561028a57600080fd5b610179600160a060020a03600435811690602435166107a7565b60408051908101604052600681527f426174746c650000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b69d3c21bcecceda100000081565b600160a060020a038316600090815260016020526040812054829010806103a35750600160a060020a03808516600090815260026020908152604080832033909416835292905220548290105b156103b0575060006104f4565b600160a060020a0384166000908152600160205260409020546103d9908363ffffffff6107d216565b600160a060020a03851660009081526001602052604081208290559010156103fd57fe5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054610434908363ffffffff6107d216565b600160a060020a038086166000908152600260209081526040808320338516845282528083209490945591861681526001909152205461047a908363ffffffff6107e216565b600160a060020a038416600090815260016020526040902081905569d3c21bcecceda10000009011156104a957fe5b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060015b9392505050565b601281565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600381527f42544c0000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290101561057b57506000610342565b600160a060020a0333166000908152600160205260409020546105a4908363ffffffff6107d216565b600160a060020a03331660009081526001602052604081208290559010156105c857fe5b600160a060020a0383166000908152600160205260409020546105f1908363ffffffff6107e216565b600160a060020a038416600090815260016020526040902081905569d3c21bcecceda100000090111561062057fe5b82600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600061067c84846102db565b151561068a575060006104f4565b83600160a060020a0316638f4ffcb1338530866040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073b578082015183820152602001610723565b50505050905090810190601f1680156107685780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561078957600080fd5b6102c65a03f1151561079a57600080fd5b5060019695505050505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b8082038281111561034257600080fd5b8082018281101561034257600080fd00a165627a7a723058209309a8be856c77cf841ab1a9529f8b9ed5b321648231a310fb96b0c7c98fd5e50029000000000000000000000000553b4546d26f383d4f4a056b7f50dadff07fb252

Deployed Bytecode

0x606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100a6578063095ea7b31461013057806318160ddd1461016657806323b872dd1461018b578063313ce567146101b357806370a08231146101c657806395d89b41146101e5578063a9059cbb146101f8578063cae9ca511461021a578063dd62ed3e1461027f575b600080fd5b34156100b157600080fd5b6100b96102a4565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100f55780820151838201526020016100dd565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013b57600080fd5b610152600160a060020a03600435166024356102db565b604051901515815260200160405180910390f35b341561017157600080fd5b610179610348565b60405190815260200160405180910390f35b341561019657600080fd5b610152600160a060020a0360043581169060243516604435610356565b34156101be57600080fd5b6101796104fb565b34156101d157600080fd5b610179600160a060020a0360043516610500565b34156101f057600080fd5b6100b961051b565b341561020357600080fd5b610152600160a060020a0360043516602435610552565b341561022557600080fd5b61015260048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061067095505050505050565b341561028a57600080fd5b610179600160a060020a03600435811690602435166107a7565b60408051908101604052600681527f426174746c650000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b69d3c21bcecceda100000081565b600160a060020a038316600090815260016020526040812054829010806103a35750600160a060020a03808516600090815260026020908152604080832033909416835292905220548290105b156103b0575060006104f4565b600160a060020a0384166000908152600160205260409020546103d9908363ffffffff6107d216565b600160a060020a03851660009081526001602052604081208290559010156103fd57fe5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054610434908363ffffffff6107d216565b600160a060020a038086166000908152600260209081526040808320338516845282528083209490945591861681526001909152205461047a908363ffffffff6107e216565b600160a060020a038416600090815260016020526040902081905569d3c21bcecceda10000009011156104a957fe5b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060015b9392505050565b601281565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600381527f42544c0000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290101561057b57506000610342565b600160a060020a0333166000908152600160205260409020546105a4908363ffffffff6107d216565b600160a060020a03331660009081526001602052604081208290559010156105c857fe5b600160a060020a0383166000908152600160205260409020546105f1908363ffffffff6107e216565b600160a060020a038416600090815260016020526040902081905569d3c21bcecceda100000090111561062057fe5b82600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600061067c84846102db565b151561068a575060006104f4565b83600160a060020a0316638f4ffcb1338530866040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073b578082015183820152602001610723565b50505050905090810190601f1680156107685780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561078957600080fd5b6102c65a03f1151561079a57600080fd5b5060019695505050505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b8082038281111561034257600080fd5b8082018281101561034257600080fd00a165627a7a723058209309a8be856c77cf841ab1a9529f8b9ed5b321648231a310fb96b0c7c98fd5e50029

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

000000000000000000000000553b4546d26f383d4f4a056b7f50dadff07fb252

-----Decoded View---------------
Arg [0] : _battleAddress (address): 0x553B4546D26F383d4f4a056B7f50DaDFf07FB252

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000553b4546d26f383d4f4a056b7f50dadff07fb252


Swarm Source

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