ERC-20
Overview
Max Total Supply
130,344,807.286474316907513786 BET
Holders
2,006
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DaoCasinoToken
Compiler Version
v0.4.11+commit.68ef5810
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-07-25 */ pragma solidity ^0.4.11; // ---------------------------------------------------------------------------- // Dao.Casino Crowdsale Token Contract // // NOTE: This is the new Dao.Casino token contract as the old Dao.Casino // crowdsale/token contract was attached to a buggy Parity multisig that // was vulnerable to hackers // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd for Dao.Casino 2017 // The MIT Licence. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Safe maths, borrowed from OpenZeppelin // ---------------------------------------------------------------------------- library SafeMath { // ------------------------------------------------------------------------ // Add a number to another number, checking for overflows // ------------------------------------------------------------------------ function add(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c >= a && c >= b); return c; } // ------------------------------------------------------------------------ // Subtract a number from another number, checking for underflows // ------------------------------------------------------------------------ function sub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) onlyOwner { newOwner = _newOwner; } function acceptOwnership() { if (msg.sender == newOwner) { OwnershipTransferred(owner, newOwner); owner = newOwner; } } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20Token { using SafeMath for uint; // ------------------------------------------------------------------------ // Total Supply // ------------------------------------------------------------------------ uint256 _totalSupply = 0; // ------------------------------------------------------------------------ // Balances for each account // ------------------------------------------------------------------------ mapping(address => uint256) balances; // ------------------------------------------------------------------------ // Owner of account approves the transfer of an amount to another account // ------------------------------------------------------------------------ mapping(address => mapping (address => uint256)) allowed; // ------------------------------------------------------------------------ // Get the total token supply // ------------------------------------------------------------------------ function totalSupply() constant returns (uint256 totalSupply) { totalSupply = _totalSupply; } // ------------------------------------------------------------------------ // Get the account balance of another account with address _owner // ------------------------------------------------------------------------ function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } // ------------------------------------------------------------------------ // Transfer the balance from owner's account to another account // ------------------------------------------------------------------------ function transfer(address _to, uint256 _amount) returns (bool success) { if (balances[msg.sender] >= _amount // User has balance && _amount > 0 // Non-zero transfer && balances[_to] + _amount > balances[_to] // Overflow check ) { balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); Transfer(msg.sender, _to, _amount); return true; } else { return false; } } // ------------------------------------------------------------------------ // Allow _spender to withdraw from your account, multiple times, up to the // _value amount. If this function is called again it overwrites the // current allowance with _value. // ------------------------------------------------------------------------ function approve( address _spender, uint256 _amount ) returns (bool success) { // Borrowed from the MiniMeToken contract // 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((_amount == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; } // ------------------------------------------------------------------------ // Spender of tokens transfer an amount of tokens from the token owner's // balance to the spender's account. The owner of the tokens must already // have approve(...)-d this transfer // ------------------------------------------------------------------------ function transferFrom( address _from, address _to, uint256 _amount ) returns (bool success) { if (balances[_from] >= _amount // From a/c has balance && allowed[_from][msg.sender] >= _amount // Transfer approved && _amount > 0 // Non-zero transfer && balances[_to] + _amount > balances[_to] // Overflow check ) { balances[_from] = balances[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); Transfer(_from, _to, _amount); return true; } else { return false; } } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance( address _owner, address _spender ) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract DaoCasinoToken is ERC20Token, Owned { // ------------------------------------------------------------------------ // Token information // ------------------------------------------------------------------------ string public constant symbol = "BET"; string public constant name = "Dao.Casino"; uint8 public constant decimals = 18; function DaoCasinoToken() { } // ------------------------------------------------------------------------ // Fill - to populate tokens from the old token contract // ------------------------------------------------------------------------ // From https://github.com/BitySA/whetcwithdraw/tree/master/daobalance bool public sealed; uint256 constant D160 = 0x0010000000000000000000000000000000000000000; // The 160 LSB is the address of the balance // The 96 MSB is the balance of that address. function fill(uint256[] data) onlyOwner { require(!sealed); for (uint256 i = 0; i < data.length; i++) { address account = address(data[i] & (D160-1)); uint256 amount = data[i] / D160; // Prevent duplicates if (balances[account] == 0) { balances[account] = amount; _totalSupply = _totalSupply.add(amount); Transfer(0x0, account, amount); } } } // ------------------------------------------------------------------------ // After sealing, no more filling is possible // ------------------------------------------------------------------------ function seal() onlyOwner { require(!sealed); sealed = true; } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint amount) onlyOwner returns (bool success) { return ERC20Token(tokenAddress).transfer(owner, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"totalSupply","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"seal","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"data","type":"uint256[]"}],"name":"fill","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferAnyERC20Token","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sealed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"}],"name":"OwnershipTransferred","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
60606040526000600055341561001157fe5b5b5b60038054600160a060020a03191633600160a060020a03161790555b5b5b610c82806100406000396000f300606060405236156100ee5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f0578063095ea7b31461018057806318160ddd146101b357806323b872dd146101d5578063313ce5671461020e5780633fb27b851461023457806370a082311461024657806379ba509714610274578063884b5dc2146102865780638da5cb5b146102db57806395d89b4114610307578063a9059cbb14610397578063d4ee1d90146103ca578063dc39d06d146103f6578063dd62ed3e14610429578063e4b203ef1461045d578063f2fde38b14610481575bfe5b34156100f857fe5b61010061049f565b604080516020808252835181830152835191928392908301918501908083838215610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018857fe5b61019f600160a060020a03600435166024356104d6565b604080519115158252519081900360200190f35b34156101bb57fe5b6101c361057b565b60408051918252519081900360200190f35b34156101dd57fe5b61019f600160a060020a0360043581169060243516604435610582565b604080519115158252519081900360200190f35b341561021657fe5b61021e610725565b6040805160ff9092168252519081900360200190f35b341561023c57fe5b61024461072a565b005b341561024e57fe5b6101c3600160a060020a0360043516610786565b60408051918252519081900360200190f35b341561027c57fe5b6102446107a5565b005b341561028e57fe5b61024460048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061082e95505050505050565b005b34156102e357fe5b6102eb61096b565b60408051600160a060020a039092168252519081900360200190f35b341561030f57fe5b61010061097a565b604080516020808252835181830152835191928392908301918501908083838215610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039f57fe5b61019f600160a060020a03600435166024356109b1565b604080519115158252519081900360200190f35b34156103d257fe5b6102eb610ad1565b60408051600160a060020a039092168252519081900360200190f35b34156103fe57fe5b61019f600160a060020a0360043516602435610ae0565b604080519115158252519081900360200190f35b341561043157fe5b6101c3600160a060020a0360043581169060243516610b91565b60408051918252519081900360200190f35b341561046557fe5b61019f610bbe565b604080519115158252519081900360200190f35b341561048957fe5b610244600160a060020a0360043516610bce565b005b60408051808201909152600a81527f44616f2e436173696e6f00000000000000000000000000000000000000000000602082015281565b60008115806105085750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156105145760006000fd5b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b6000545b90565b600160a060020a0383166000908152600160205260408120548290108015906105d25750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105de5750600082115b80156106035750600160a060020a038316600090815260016020526040902054828101115b1561071957600160a060020a038416600090815260016020526040902054610631908363ffffffff610c1716565b600160a060020a0380861660009081526001602090815260408083209490945560028152838220339093168252919091522054610674908363ffffffff610c1716565b600160a060020a03808616600090815260026020908152604080832033851684528252808320949094559186168152600190915220546106ba908363ffffffff610c2e16565b600160a060020a0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600161071d565b5060005b5b9392505050565b601281565b60035433600160a060020a039081169116146107465760006000fd5b60045460a060020a900460ff161561075e5760006000fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790555b5b565b600160a060020a0381166000908152600160205260409020545b919050565b60045433600160a060020a039081169116141561078357600454600354604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36004546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b5b565b6003546000908190819033600160a060020a039081169116146108515760006000fd5b60045460a060020a900460ff16156108695760006000fd5b600092505b8351831015610963578351600160a060020a039085908590811061088e57fe5b9060200190602002015116915060a060020a84848151811015156108ae57fe5b906020019060200201518115156108c157fe5b600160a060020a0384166000908152600160205260409020549190049150151561095757600160a060020a038216600090815260016020526040812082905554610911908263ffffffff610c2e16565b6000908155604080518381529051600160a060020a03851692917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35b5b60019092019161086e565b5b5b50505050565b600354600160a060020a031681565b60408051808201909152600381527f4245540000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290108015906109da5750600082115b80156109ff5750600160a060020a038316600090815260016020526040902054828101115b15610ac257600160a060020a033316600090815260016020526040902054610a2d908363ffffffff610c1716565b600160a060020a033381166000908152600160205260408082209390935590851681522054610a62908363ffffffff610c2e16565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001610575565b506000610575565b5b92915050565b600454600160a060020a031681565b60035460009033600160a060020a03908116911614610aff5760006000fd5b600354604080516000602091820181905282517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0394851660048201526024810187905292519387169363a9059cbb9360448082019493918390030190829087803b1515610b7257fe5b6102c65a03f11515610b8057fe5b5050604051519150505b5b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60045460a060020a900460ff1681565b60035433600160a060020a03908116911614610bea5760006000fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600082821115610c2357fe5b508082035b92915050565b6000828201838110801590610c435750828110155b1515610c4b57fe5b8091505b50929150505600a165627a7a7230582012425eda3f5b39f299d3261ca1c4fad7009957e7530ad2a3551fd9a41d3e429e0029
Deployed Bytecode
0x606060405236156100ee5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f0578063095ea7b31461018057806318160ddd146101b357806323b872dd146101d5578063313ce5671461020e5780633fb27b851461023457806370a082311461024657806379ba509714610274578063884b5dc2146102865780638da5cb5b146102db57806395d89b4114610307578063a9059cbb14610397578063d4ee1d90146103ca578063dc39d06d146103f6578063dd62ed3e14610429578063e4b203ef1461045d578063f2fde38b14610481575bfe5b34156100f857fe5b61010061049f565b604080516020808252835181830152835191928392908301918501908083838215610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018857fe5b61019f600160a060020a03600435166024356104d6565b604080519115158252519081900360200190f35b34156101bb57fe5b6101c361057b565b60408051918252519081900360200190f35b34156101dd57fe5b61019f600160a060020a0360043581169060243516604435610582565b604080519115158252519081900360200190f35b341561021657fe5b61021e610725565b6040805160ff9092168252519081900360200190f35b341561023c57fe5b61024461072a565b005b341561024e57fe5b6101c3600160a060020a0360043516610786565b60408051918252519081900360200190f35b341561027c57fe5b6102446107a5565b005b341561028e57fe5b61024460048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061082e95505050505050565b005b34156102e357fe5b6102eb61096b565b60408051600160a060020a039092168252519081900360200190f35b341561030f57fe5b61010061097a565b604080516020808252835181830152835191928392908301918501908083838215610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039f57fe5b61019f600160a060020a03600435166024356109b1565b604080519115158252519081900360200190f35b34156103d257fe5b6102eb610ad1565b60408051600160a060020a039092168252519081900360200190f35b34156103fe57fe5b61019f600160a060020a0360043516602435610ae0565b604080519115158252519081900360200190f35b341561043157fe5b6101c3600160a060020a0360043581169060243516610b91565b60408051918252519081900360200190f35b341561046557fe5b61019f610bbe565b604080519115158252519081900360200190f35b341561048957fe5b610244600160a060020a0360043516610bce565b005b60408051808201909152600a81527f44616f2e436173696e6f00000000000000000000000000000000000000000000602082015281565b60008115806105085750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156105145760006000fd5b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b6000545b90565b600160a060020a0383166000908152600160205260408120548290108015906105d25750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105de5750600082115b80156106035750600160a060020a038316600090815260016020526040902054828101115b1561071957600160a060020a038416600090815260016020526040902054610631908363ffffffff610c1716565b600160a060020a0380861660009081526001602090815260408083209490945560028152838220339093168252919091522054610674908363ffffffff610c1716565b600160a060020a03808616600090815260026020908152604080832033851684528252808320949094559186168152600190915220546106ba908363ffffffff610c2e16565b600160a060020a0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600161071d565b5060005b5b9392505050565b601281565b60035433600160a060020a039081169116146107465760006000fd5b60045460a060020a900460ff161561075e5760006000fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790555b5b565b600160a060020a0381166000908152600160205260409020545b919050565b60045433600160a060020a039081169116141561078357600454600354604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36004546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b5b565b6003546000908190819033600160a060020a039081169116146108515760006000fd5b60045460a060020a900460ff16156108695760006000fd5b600092505b8351831015610963578351600160a060020a039085908590811061088e57fe5b9060200190602002015116915060a060020a84848151811015156108ae57fe5b906020019060200201518115156108c157fe5b600160a060020a0384166000908152600160205260409020549190049150151561095757600160a060020a038216600090815260016020526040812082905554610911908263ffffffff610c2e16565b6000908155604080518381529051600160a060020a03851692917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35b5b60019092019161086e565b5b5b50505050565b600354600160a060020a031681565b60408051808201909152600381527f4245540000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290108015906109da5750600082115b80156109ff5750600160a060020a038316600090815260016020526040902054828101115b15610ac257600160a060020a033316600090815260016020526040902054610a2d908363ffffffff610c1716565b600160a060020a033381166000908152600160205260408082209390935590851681522054610a62908363ffffffff610c2e16565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001610575565b506000610575565b5b92915050565b600454600160a060020a031681565b60035460009033600160a060020a03908116911614610aff5760006000fd5b600354604080516000602091820181905282517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0394851660048201526024810187905292519387169363a9059cbb9360448082019493918390030190829087803b1515610b7257fe5b6102c65a03f11515610b8057fe5b5050604051519150505b5b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60045460a060020a900460ff1681565b60035433600160a060020a03908116911614610bea5760006000fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600082821115610c2357fe5b508082035b92915050565b6000828201838110801590610c435750828110155b1515610c4b57fe5b8091505b50929150505600a165627a7a7230582012425eda3f5b39f299d3261ca1c4fad7009957e7530ad2a3551fd9a41d3e429e0029
Swarm Source
bzzr://12425eda3f5b39f299d3261ca1c4fad7009957e7530ad2a3551fd9a41d3e429e
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.