Announcement: [XBase] token contract has migrated to a new address. The new token can be found here.
ERC-20
Old Contract
Overview
Max Total Supply
1,000,000,000 XBASE
Holders
6,743 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
74,060.824698971886011872 XBASEValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
xbase
Compiler Version
v0.5.7+commit.6da8b019
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-04-01 */ pragma solidity ^0.5.7; interface ERC20 { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address from, address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ERC223 { function transfer(address to, uint value, bytes calldata data) external; event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); } contract ERC223ReceivingContract { function tokenFallback(address _from, uint _value, bytes memory _data) public; } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } contract StandardToken is ERC20, ERC223 { uint256 public totalSupply; using SafeMath for uint; mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = SafeMath.sub(balances[msg.sender], _value); balances[_to] = SafeMath.add(balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = SafeMath.sub(balances[_from], _value); balances[_to] = SafeMath.add(balances[_to], _value); allowed[_from][msg.sender] = SafeMath.sub(allowed[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } 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]; } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = SafeMath.add(allowed[msg.sender][_spender], _addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = SafeMath.sub(oldValue, _subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function transfer(address _to, uint _value, bytes memory _data) public { require(_value > 0 ); if(isContract(_to)) { ERC223ReceivingContract receiver = ERC223ReceivingContract(_to); receiver.tokenFallback(msg.sender, _value, _data); } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value, _data); } function isContract(address _addr) private returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0); } } contract xbase is StandardToken { string public constant name = "Eterbase Cash"; string public constant symbol = "XBASE"; uint8 public constant decimals = 18; uint256 public constant initialSupply = 1000000000 * 10 ** uint256(decimals); function xbasecash() public { totalSupply = initialSupply; balances[msg.sender] = initialSupply; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"xbasecash","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"initialSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","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"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":true,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"},{"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"}]
Contract Creation Code
608060405234801561001057600080fd5b50610b23806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063661884631161008c578063a9059cbb11610066578063a9059cbb14610286578063be45fd62146102b2578063d73dd6231461036d578063dd62ed3e14610399576100ea565b8063661884631461022c57806370a082311461025857806395d89b411461027e576100ea565b806318160ddd116100c857806318160ddd146101b657806323b872dd146101d0578063313ce56714610206578063378dc3dc14610224576100ea565b806306fdde03146100ef578063072b08511461016c578063095ea7b314610176575b600080fd5b6100f76103c7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610174610400565b005b6101a26004803603604081101561018c57600080fd5b506001600160a01b038135169060200135610421565b604080519115158252519081900360200190f35b6101be610487565b60408051918252519081900360200190f35b6101a2600480360360608110156101e657600080fd5b506001600160a01b0381358116916020810135909116906040013561048d565b61020e6105f2565b6040805160ff9092168252519081900360200190f35b6101be6105f7565b6101a26004803603604081101561024257600080fd5b506001600160a01b038135169060200135610607565b6101be6004803603602081101561026e57600080fd5b50356001600160a01b03166106f1565b6100f761070c565b6101a26004803603604081101561029c57600080fd5b506001600160a01b038135169060200135610730565b610174600480360360608110156102c857600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156102f857600080fd5b82018360208201111561030a57600080fd5b8035906020019184600183028401116401000000008311171561032c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610805945050505050565b6101a26004803603604081101561038357600080fd5b506001600160a01b038135169060200135610a05565b6101be600480360360408110156103af57600080fd5b506001600160a01b0381358116916020013516610a98565b6040518060400160405280600d81526020017f457465726261736520436173680000000000000000000000000000000000000081525081565b6b033b2e3c9fd0803ce8000000600081815533815260016020526040902055565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60005481565b60006001600160a01b0383166104a257600080fd5b6001600160a01b0384166000908152600160205260409020548211156104c757600080fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020548211156104f757600080fd5b6001600160a01b03841660009081526001602052604090205461051a9083610ac3565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546105499083610ad8565b6001600160a01b0380851660009081526001602090815260408083209490945591871681526002825282812033825290915220546105879083610ac3565b6001600160a01b03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b601281565b6b033b2e3c9fd0803ce800000081565b3360009081526002602090815260408083206001600160a01b03861684529091528120548083111561065c573360009081526002602090815260408083206001600160a01b038816845290915281205561068b565b6106668184610ac3565b3360009081526002602090815260408083206001600160a01b03891684529091529020555b3360008181526002602090815260408083206001600160a01b0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6001600160a01b031660009081526001602052604090205490565b604051806040016040528060058152602001600160d81b6458424153450281525081565b60006001600160a01b03831661074557600080fd5b3360009081526001602052604090205482111561076157600080fd5b3360009081526001602052604090205461077b9083610ac3565b33600090815260016020526040808220929092556001600160a01b038516815220546107a79083610ad8565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000821161081257600080fd5b61081b83610af1565b156108f957604051600160e11b63607705c502815233600482018181526024830185905260606044840190815284516064850152845187946001600160a01b0386169463c0ee0b8a9490938993899360840190602085019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b50505050505b33600090815260016020526040902054610919908363ffffffff610ac316565b33600090815260016020526040808220929092556001600160a01b0385168152205461094b908363ffffffff610ad816565b6001600160a01b0384166000908152600160209081526040918290209290925551825183928291908401908083835b602083106109995780518252601f19909201916020918201910161097a565b51815160209384036101000a60001901801990921691161790526040805192909401829003822088835293519395506001600160a01b038916945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4505050565b3360009081526002602090815260408083206001600160a01b0386168452909152812054610a339083610ad8565b3360008181526002602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610ad257600080fd5b50900390565b600082820183811015610aea57600080fd5b9392505050565b3b15159056fea165627a7a7230582087d0d8bab4ee3f0688b621888967e62462a486764daa0778033b0a1f275fc6af0029
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063661884631161008c578063a9059cbb11610066578063a9059cbb14610286578063be45fd62146102b2578063d73dd6231461036d578063dd62ed3e14610399576100ea565b8063661884631461022c57806370a082311461025857806395d89b411461027e576100ea565b806318160ddd116100c857806318160ddd146101b657806323b872dd146101d0578063313ce56714610206578063378dc3dc14610224576100ea565b806306fdde03146100ef578063072b08511461016c578063095ea7b314610176575b600080fd5b6100f76103c7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610174610400565b005b6101a26004803603604081101561018c57600080fd5b506001600160a01b038135169060200135610421565b604080519115158252519081900360200190f35b6101be610487565b60408051918252519081900360200190f35b6101a2600480360360608110156101e657600080fd5b506001600160a01b0381358116916020810135909116906040013561048d565b61020e6105f2565b6040805160ff9092168252519081900360200190f35b6101be6105f7565b6101a26004803603604081101561024257600080fd5b506001600160a01b038135169060200135610607565b6101be6004803603602081101561026e57600080fd5b50356001600160a01b03166106f1565b6100f761070c565b6101a26004803603604081101561029c57600080fd5b506001600160a01b038135169060200135610730565b610174600480360360608110156102c857600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156102f857600080fd5b82018360208201111561030a57600080fd5b8035906020019184600183028401116401000000008311171561032c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610805945050505050565b6101a26004803603604081101561038357600080fd5b506001600160a01b038135169060200135610a05565b6101be600480360360408110156103af57600080fd5b506001600160a01b0381358116916020013516610a98565b6040518060400160405280600d81526020017f457465726261736520436173680000000000000000000000000000000000000081525081565b6b033b2e3c9fd0803ce8000000600081815533815260016020526040902055565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60005481565b60006001600160a01b0383166104a257600080fd5b6001600160a01b0384166000908152600160205260409020548211156104c757600080fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020548211156104f757600080fd5b6001600160a01b03841660009081526001602052604090205461051a9083610ac3565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546105499083610ad8565b6001600160a01b0380851660009081526001602090815260408083209490945591871681526002825282812033825290915220546105879083610ac3565b6001600160a01b03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b601281565b6b033b2e3c9fd0803ce800000081565b3360009081526002602090815260408083206001600160a01b03861684529091528120548083111561065c573360009081526002602090815260408083206001600160a01b038816845290915281205561068b565b6106668184610ac3565b3360009081526002602090815260408083206001600160a01b03891684529091529020555b3360008181526002602090815260408083206001600160a01b0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6001600160a01b031660009081526001602052604090205490565b604051806040016040528060058152602001600160d81b6458424153450281525081565b60006001600160a01b03831661074557600080fd5b3360009081526001602052604090205482111561076157600080fd5b3360009081526001602052604090205461077b9083610ac3565b33600090815260016020526040808220929092556001600160a01b038516815220546107a79083610ad8565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000821161081257600080fd5b61081b83610af1565b156108f957604051600160e11b63607705c502815233600482018181526024830185905260606044840190815284516064850152845187946001600160a01b0386169463c0ee0b8a9490938993899360840190602085019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b50505050505b33600090815260016020526040902054610919908363ffffffff610ac316565b33600090815260016020526040808220929092556001600160a01b0385168152205461094b908363ffffffff610ad816565b6001600160a01b0384166000908152600160209081526040918290209290925551825183928291908401908083835b602083106109995780518252601f19909201916020918201910161097a565b51815160209384036101000a60001901801990921691161790526040805192909401829003822088835293519395506001600160a01b038916945033937fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c169350918290030190a4505050565b3360009081526002602090815260408083206001600160a01b0386168452909152812054610a339083610ad8565b3360008181526002602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610ad257600080fd5b50900390565b600082820183811015610aea57600080fd5b9392505050565b3b15159056fea165627a7a7230582087d0d8bab4ee3f0688b621888967e62462a486764daa0778033b0a1f275fc6af0029
Swarm Source
bzzr://87d0d8bab4ee3f0688b621888967e62462a486764daa0778033b0a1f275fc6af
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.