ETH Price: $3,192.03 (-4.00%)
Gas: 0.12 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Age:90D
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Update your filters to view other transactions

Age:90D
Reset Filter

Advanced mode:
Parent Transaction Hash Method Block
From
To

There are no matching entries

Update your filters to view other transactions

View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CALToken

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.24;


library SafeMath {

  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }  
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts 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 pure returns (uint256) {
    require(b <= a);
    uint256 c = a - b;

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

    return c;
  }  
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}

contract CALToken {
    mapping(address => uint256) public balances;
    mapping(address => mapping (address => uint256)) public allowed;
    using SafeMath for uint256;
    address public owner;
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    uint256 private constant MAX_UINT256 = 2**256 -1 ;

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
    
    bool lock = false;

    constructor(
        uint256 _initialAmount,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol
    ) public {
        owner = msg.sender;
        balances[msg.sender] = _initialAmount;
        totalSupply = _initialAmount;
        name = _tokenName;
        decimals = _decimalUnits;
        symbol = _tokenSymbol;
        
    }
		
	modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier isLock {
        require(!lock);
        _;
    }
    
    function setLock(bool _lock) onlyOwner public{
        lock = _lock;
    }

    function transferOwnership(address newOwner) onlyOwner public {
        if (newOwner != address(0)) {
            owner = newOwner;
        }
    }


    function transfer(
        address _to,
        uint256 _value
    ) public returns (bool) {
        require(balances[msg.sender] >= _value);
        require(msg.sender == _to || balances[_to] <= MAX_UINT256 - _value);
        balances[msg.sender] -= _value;
        balances[_to] += _value;
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    ) public returns (bool) {
        uint256 allowance = allowed[_from][msg.sender];
        require(balances[_from] >= _value);
        require(_from == _to || balances[_to] <= MAX_UINT256 -_value);
        require(allowance >= _value);
        balances[_from] -= _value;
        balances[_to] += _value;
        if (allowance < MAX_UINT256) {
            allowed[_from][msg.sender] -= _value;
        }
        emit Transfer(_from, _to, _value);
        return true;
    }

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

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

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

Contract Security Audit

Contract ABI

API
[{"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":"","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":"","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":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lock","type":"bool"}],"name":"setLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","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"},{"inputs":[{"name":"_initialAmount","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_decimalUnits","type":"uint8"},{"name":"_tokenSymbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"}]

60806040526007805460ff1916905534801561001a57600080fd5b50604051610942380380610942833981016040908152815160208084015183850151606086015160028054600160a060020a0319163390811790915560009081528085529590952084905560068490559085018051939590949193910191610087916003918601906100b4565b506005805460ff191660ff841617905580516100aa9060049060208401906100b4565b505050505061014f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f557805160ff1916838001178555610122565b82800160010185558215610122579182015b82811115610122578251825591602001919060010190610107565b5061012e929150610132565b5090565b61014c91905b8082111561012e5760008155600101610138565b90565b6107e48061015e6000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd57806327e235e3146101e7578063313ce567146102085780635c65816514610233578063619d51941461025a57806370a08231146102765780638da5cb5b1461029757806395d89b41146102c8578063a9059cbb146102dd578063dd62ed3e14610301578063f2fde38b14610328575b600080fd5b3480156100e057600080fd5b506100e9610349565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103d7565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab61043d565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610443565b3480156101f357600080fd5b506101ab600160a060020a036004351661058d565b34801561021457600080fd5b5061021d61059f565b6040805160ff9092168252519081900360200190f35b34801561023f57600080fd5b506101ab600160a060020a03600435811690602435166105a8565b34801561026657600080fd5b5061027460043515156105c5565b005b34801561028257600080fd5b506101ab600160a060020a03600435166105ef565b3480156102a357600080fd5b506102ac61060a565b60408051600160a060020a039092168252519081900360200190f35b3480156102d457600080fd5b506100e9610619565b3480156102e957600080fd5b50610182600160a060020a0360043516602435610674565b34801561030d57600080fd5b506101ab600160a060020a036004358116906024351661073b565b34801561033457600080fd5b50610274600160a060020a0360043516610766565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cf5780601f106103a4576101008083540402835291602001916103cf565b820191906000526020600020905b8154815290600101906020018083116103b257829003601f168201915b505050505081565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60065481565b600160a060020a03831660008181526001602090815260408083203384528252808320549383529082905281205490919083111561048057600080fd5b83600160a060020a031685600160a060020a031614806104bd5750600160a060020a03841660009081526020819052604090205460001984900310155b15156104c857600080fd5b828110156104d557600080fd5b600160a060020a038086166000908152602081905260408082208054879003905591861681522080548401905560001981101561053757600160a060020a03851660009081526001602090815260408083203384529091529020805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60006020819052908152604090205481565b60055460ff1681565b600160209081526000928352604080842090915290825290205481565b600254600160a060020a031633146105dc57600080fd5b6007805460ff1916911515919091179055565b600160a060020a031660009081526020819052604090205490565b600254600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cf5780601f106103a4576101008083540402835291602001916103cf565b3360009081526020819052604081205482111561069057600080fd5b33600160a060020a03841614806106c45750600160a060020a03831660009081526020819052604090205460001983900310155b15156106cf57600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600254600160a060020a0316331461077d57600080fd5b600160a060020a038116156107b5576002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b505600a165627a7a72305820513cce84c9616f90dc242c46cf7c07af11f41d81009090c7cc8318c1ab860fd200290000000000000000000000000000000000000000000000006124fee993bc00000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000843414c546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000843414c546f6b656e000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd57806327e235e3146101e7578063313ce567146102085780635c65816514610233578063619d51941461025a57806370a08231146102765780638da5cb5b1461029757806395d89b41146102c8578063a9059cbb146102dd578063dd62ed3e14610301578063f2fde38b14610328575b600080fd5b3480156100e057600080fd5b506100e9610349565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103d7565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab61043d565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610443565b3480156101f357600080fd5b506101ab600160a060020a036004351661058d565b34801561021457600080fd5b5061021d61059f565b6040805160ff9092168252519081900360200190f35b34801561023f57600080fd5b506101ab600160a060020a03600435811690602435166105a8565b34801561026657600080fd5b5061027460043515156105c5565b005b34801561028257600080fd5b506101ab600160a060020a03600435166105ef565b3480156102a357600080fd5b506102ac61060a565b60408051600160a060020a039092168252519081900360200190f35b3480156102d457600080fd5b506100e9610619565b3480156102e957600080fd5b50610182600160a060020a0360043516602435610674565b34801561030d57600080fd5b506101ab600160a060020a036004358116906024351661073b565b34801561033457600080fd5b50610274600160a060020a0360043516610766565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cf5780601f106103a4576101008083540402835291602001916103cf565b820191906000526020600020905b8154815290600101906020018083116103b257829003601f168201915b505050505081565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60065481565b600160a060020a03831660008181526001602090815260408083203384528252808320549383529082905281205490919083111561048057600080fd5b83600160a060020a031685600160a060020a031614806104bd5750600160a060020a03841660009081526020819052604090205460001984900310155b15156104c857600080fd5b828110156104d557600080fd5b600160a060020a038086166000908152602081905260408082208054879003905591861681522080548401905560001981101561053757600160a060020a03851660009081526001602090815260408083203384529091529020805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60006020819052908152604090205481565b60055460ff1681565b600160209081526000928352604080842090915290825290205481565b600254600160a060020a031633146105dc57600080fd5b6007805460ff1916911515919091179055565b600160a060020a031660009081526020819052604090205490565b600254600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cf5780601f106103a4576101008083540402835291602001916103cf565b3360009081526020819052604081205482111561069057600080fd5b33600160a060020a03841614806106c45750600160a060020a03831660009081526020819052604090205460001983900310155b15156106cf57600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600254600160a060020a0316331461077d57600080fd5b600160a060020a038116156107b5576002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b505600a165627a7a72305820513cce84c9616f90dc242c46cf7c07af11f41d81009090c7cc8318c1ab860fd20029

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

0000000000000000000000000000000000000000000000006124fee993bc00000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000843414c546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000843414c546f6b656e000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _initialAmount (uint256): 7000000000000000000
Arg [1] : _tokenName (string): CALToken
Arg [2] : _decimalUnits (uint8): 8
Arg [3] : _tokenSymbol (string): CALToken

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000006124fee993bc0000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [5] : 43414c546f6b656e000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [7] : 43414c546f6b656e000000000000000000000000000000000000000000000000


Swarm Source

bzzr://513cce84c9616f90dc242c46cf7c07af11f41d81009090c7cc8318c1ab860fd2

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.