ERC-20
Overview
Max Total Supply
10,000,000,000 SDC
Holders
1,088
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,000 SDCValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SDCoin
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-02-28 */ /** * The SDC contract * Compatible with the ERC20 standard (see https://github.com/ethereum/EIPs/issues/20). * * Based on OpenZeppelin framework. * https://openzeppelin.org * **/ pragma solidity ^0.4.19; /** * Safe Math library from OpenZeppelin framework * https://openzeppelin.org * * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws 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) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract SDCoin { using SafeMath for uint256; address public owner; // Information about the token string public constant standard = "ERC20"; string public constant name = "Superdice Coin"; string public constant symbol = "SDC"; uint8 public constant decimals = 18; // Total supply of tokens uint256 public totalSupply = 10000000000 * 10 ** uint256(decimals); mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); function SDCoin() public { owner = msg.sender; balances[owner] = totalSupply; } /** * @dev Transfer token for a specified address * * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } /** * @dev Transfer tokens from one address to another * * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ 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] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * It checks that spender's allowance is set to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balances[msg.sender] >= _value); // Check if the sender has enough balances[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balances[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowed[_from][msg.sender]); // Check allowance balances[_from] -= _value; // Subtract from the targeted balance allowed[_from][msg.sender] -= _value; // Subtract from the sender's allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } // can accept ether function() payable { } }
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":"_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":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"standard","outputs":[{"name":"","type":"string"}],"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":"_from","type":"address"},{"name":"_value","type":"uint256"}],"name":"burnFrom","outputs":[{"name":"success","type":"bool"}],"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":"","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"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"}]
Contract Creation Code
60606040526b204fce5e3e25026110000000600155341561001f57600080fd5b60008054600160a060020a03338116600160a060020a0319909216919091178083556001549116825260026020526040909120556108d2806100626000396000f3006060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c6578063095ea7b31461015057806318160ddd1461018657806323b872dd146101ab578063313ce567146101d357806342966c68146101fc5780635a3b7e421461021257806370a082311461022557806379cc6790146102445780638da5cb5b1461026657806395d89b4114610295578063a9059cbb146102a8578063dd62ed3e146102ca575b005b34156100d157600080fd5b6100d96102ef565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101155780820151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015b57600080fd5b610172600160a060020a0360043516602435610326565b604051901515815260200160405180910390f35b341561019157600080fd5b6101996103cc565b60405190815260200160405180910390f35b34156101b657600080fd5b610172600160a060020a03600435811690602435166044356103d2565b34156101de57600080fd5b6101e6610554565b60405160ff909116815260200160405180910390f35b341561020757600080fd5b610172600435610559565b341561021d57600080fd5b6100d96105e4565b341561023057600080fd5b610199600160a060020a036004351661061b565b341561024f57600080fd5b610172600160a060020a0360043516602435610636565b341561027157600080fd5b610279610712565b604051600160a060020a03909116815260200160405180910390f35b34156102a057600080fd5b6100d9610721565b34156102b357600080fd5b610172600160a060020a0360043516602435610758565b34156102d557600080fd5b610199600160a060020a0360043581169060243516610853565b60408051908101604052600e81527f53757065726469636520436f696e000000000000000000000000000000000000602082015281565b60008115806103585750600160a060020a03338116600090815260036020908152604080832093871683529290522054155b151561036357600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015481565b6000600160a060020a03831615156103e957600080fd5b600160a060020a03841660009081526002602052604090205482111561040e57600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561044157600080fd5b600160a060020a03841660009081526002602052604090205461046a908363ffffffff61087e16565b600160a060020a03808616600090815260026020526040808220939093559085168152205461049f908363ffffffff61089016565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546104e7908363ffffffff61087e16565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b601281565b600160a060020a0333166000908152600260205260408120548290101561057f57600080fd5b600160a060020a03331660008181526002602052604090819020805485900390556001805485900390557fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a2506001919050565b60408051908101604052600581527f4552433230000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a031660009081526002602052604090205490565b600160a060020a0382166000908152600260205260408120548290101561065c57600080fd5b600160a060020a038084166000908152600360209081526040808320339094168352929052205482111561068f57600080fd5b600160a060020a038084166000818152600260209081526040808320805488900390556003825280832033909516835293905282902080548590039055600180548590039055907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a250600192915050565b600054600160a060020a031681565b60408051908101604052600381527f5344430000000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561076f57600080fd5b600160a060020a03331660009081526002602052604090205482111561079457600080fd5b600160a060020a0333166000908152600260205260409020546107bd908363ffffffff61087e16565b600160a060020a0333811660009081526002602052604080822093909355908516815220546107f2908363ffffffff61089016565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60008282111561088a57fe5b50900390565b60008282018381101561089f57fe5b93925050505600a165627a7a7230582025dbabe861c2a0e02b4e18bec15ed781b16460ff36f166c67e43e4a37a8652620029
Deployed Bytecode
0x6060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c6578063095ea7b31461015057806318160ddd1461018657806323b872dd146101ab578063313ce567146101d357806342966c68146101fc5780635a3b7e421461021257806370a082311461022557806379cc6790146102445780638da5cb5b1461026657806395d89b4114610295578063a9059cbb146102a8578063dd62ed3e146102ca575b005b34156100d157600080fd5b6100d96102ef565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101155780820151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015b57600080fd5b610172600160a060020a0360043516602435610326565b604051901515815260200160405180910390f35b341561019157600080fd5b6101996103cc565b60405190815260200160405180910390f35b34156101b657600080fd5b610172600160a060020a03600435811690602435166044356103d2565b34156101de57600080fd5b6101e6610554565b60405160ff909116815260200160405180910390f35b341561020757600080fd5b610172600435610559565b341561021d57600080fd5b6100d96105e4565b341561023057600080fd5b610199600160a060020a036004351661061b565b341561024f57600080fd5b610172600160a060020a0360043516602435610636565b341561027157600080fd5b610279610712565b604051600160a060020a03909116815260200160405180910390f35b34156102a057600080fd5b6100d9610721565b34156102b357600080fd5b610172600160a060020a0360043516602435610758565b34156102d557600080fd5b610199600160a060020a0360043581169060243516610853565b60408051908101604052600e81527f53757065726469636520436f696e000000000000000000000000000000000000602082015281565b60008115806103585750600160a060020a03338116600090815260036020908152604080832093871683529290522054155b151561036357600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015481565b6000600160a060020a03831615156103e957600080fd5b600160a060020a03841660009081526002602052604090205482111561040e57600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561044157600080fd5b600160a060020a03841660009081526002602052604090205461046a908363ffffffff61087e16565b600160a060020a03808616600090815260026020526040808220939093559085168152205461049f908363ffffffff61089016565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546104e7908363ffffffff61087e16565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b601281565b600160a060020a0333166000908152600260205260408120548290101561057f57600080fd5b600160a060020a03331660008181526002602052604090819020805485900390556001805485900390557fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a2506001919050565b60408051908101604052600581527f4552433230000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a031660009081526002602052604090205490565b600160a060020a0382166000908152600260205260408120548290101561065c57600080fd5b600160a060020a038084166000908152600360209081526040808320339094168352929052205482111561068f57600080fd5b600160a060020a038084166000818152600260209081526040808320805488900390556003825280832033909516835293905282902080548590039055600180548590039055907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a250600192915050565b600054600160a060020a031681565b60408051908101604052600381527f5344430000000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561076f57600080fd5b600160a060020a03331660009081526002602052604090205482111561079457600080fd5b600160a060020a0333166000908152600260205260409020546107bd908363ffffffff61087e16565b600160a060020a0333811660009081526002602052604080822093909355908516815220546107f2908363ffffffff61089016565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60008282111561088a57fe5b50900390565b60008282018381101561089f57fe5b93925050505600a165627a7a7230582025dbabe861c2a0e02b4e18bec15ed781b16460ff36f166c67e43e4a37a8652620029
Swarm Source
bzzr://25dbabe861c2a0e02b4e18bec15ed781b16460ff36f166c67e43e4a37a865262
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.