Token SiaCashCoin

 

Overview [ERC-20]

Max Total Supply:
25,000,000,000 SCC

Holders:
129,669 (0.00%)

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

SiaCashCoin token contract has migrated to 0xc26eafc627624badf990f8d30116892ed204db51 on Binance Smart Chain.

# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SiaCashCoin

Compiler Version
v0.4.25-nightly.2018.5.23+commit.18c651b7

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.22;

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a / b;
    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 ForeignToken {
    function balanceOf(address _owner) constant public returns (uint256);
    function transfer(address _to, uint256 _value) public returns (bool);
}

contract ERC20Basic {
    uint256 public totalSupply;
    function balanceOf(address who) public constant returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender) public constant returns (uint256);
    function transferFrom(address from, address to, uint256 value) public returns (bool);
    function approve(address spender, uint256 value) public returns (bool);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

interface Token { 
    function distr(address _to, uint256 _value) external returns (bool);
    function totalSupply() constant external returns (uint256 supply);
    function balanceOf(address _owner) constant external returns (uint256 balance);
}

contract SiaCashCoin is ERC20 {

 
    
    using SafeMath for uint256;
    address owner = msg.sender;

    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
    mapping (address => bool) public blacklist;

    string public constant name = "SiaCashCoin";
    string public constant symbol = "SCC";
    uint public constant decimals = 18;
    
uint256 public totalSupply = 30000000000e18;
    
uint256 public totalDistributed = 15000000000e18;
    
uint256 public totalRemaining = totalSupply.sub(totalDistributed);
    
uint256 public value = 150000e18;



    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
    
    event Distr(address indexed to, uint256 amount);
    event DistrFinished();
    
    event Burn(address indexed burner, uint256 value);

    bool public distributionFinished = false;
    
    modifier canDistr() {
        require(!distributionFinished);
        _;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    
    modifier onlyWhitelist() {
        require(blacklist[msg.sender] == false);
        _;
    }
    
    function SiaCashCoin() public {
        owner = msg.sender;
        balances[owner] = totalDistributed;
    }
    
    function transferOwnership(address newOwner) onlyOwner public {
        if (newOwner != address(0)) {
            owner = newOwner;
        }
    }
    
    function finishDistribution() onlyOwner canDistr public returns (bool) {
        distributionFinished = true;
        emit DistrFinished();
        return true;
    }
    
    function distr(address _to, uint256 _amount) canDistr private returns (bool) {
        totalDistributed = totalDistributed.add(_amount);
        totalRemaining = totalRemaining.sub(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Distr(_to, _amount);
        emit Transfer(address(0), _to, _amount);
        return true;
        
        if (totalDistributed >= totalSupply) {
            distributionFinished = true;
        }
    }
    
    function () external payable {
        getTokens();
     }
    
    function getTokens() payable canDistr onlyWhitelist public {
        if (value > totalRemaining) {
            value = totalRemaining;
        }
        
        require(value <= totalRemaining);
        
        address investor = msg.sender;
        uint256 toGive = value;
        
        distr(investor, toGive);
        
        if (toGive > 0) {
            blacklist[investor] = true;
        }

        if (totalDistributed >= totalSupply) {
            distributionFinished = true;
        }
        
        value = value.div(100000).mul(99999);
    }

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

    modifier onlyPayloadSize(uint size) {
        assert(msg.data.length >= size + 4);
        _;
    }
    
    function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) {
        require(_to != address(0));
        require(_amount <= balances[msg.sender]);
        
        balances[msg.sender] = balances[msg.sender].sub(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Transfer(msg.sender, _to, _amount);
        return true;
    }
    
    function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) {
        require(_to != address(0));
        require(_amount <= balances[_from]);
        require(_amount <= allowed[_from][msg.sender]);
        
        balances[_from] = balances[_from].sub(_amount);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Transfer(_from, _to, _amount);
        return true;
    }
    
    function approve(address _spender, uint256 _value) public returns (bool success) {
        if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; }
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }
    
    function allowance(address _owner, address _spender) constant public returns (uint256) {
        return allowed[_owner][_spender];
    }
    
    function getTokenBalance(address tokenAddress, address who) constant public returns (uint){
        ForeignToken t = ForeignToken(tokenAddress);
        uint bal = t.balanceOf(who);
        return bal;
    }
    
    function withdraw() onlyOwner public {
        uint256 etherBalance = address(this).balance;
        owner.transfer(etherBalance);
    }
    
    function burn(uint256 _value) onlyOwner public {
        require(_value <= balances[msg.sender]);

        address burner = msg.sender;
        balances[burner] = balances[burner].sub(_value);
        totalSupply = totalSupply.sub(_value);
        totalDistributed = totalDistributed.sub(_value);
        emit Burn(burner, _value);
    }
    
    function withdrawForeignTokens(address _tokenContract) onlyOwner public returns (bool) {
        ForeignToken token = ForeignToken(_tokenContract);
        uint256 amount = token.balanceOf(address(this));
        return token.transfer(owner, amount);
    }
}

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":"_amount","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":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"value","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","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":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finishDistribution","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"distributionFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"who","type":"address"}],"name":"getTokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRemaining","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"_tokenContract","type":"address"}],"name":"withdrawForeignTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalDistributed","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"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blacklist","outputs":[{"name":"","type":"bool"}],"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":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Distr","type":"event"},{"anonymous":false,"inputs":[],"name":"DistrFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"}]

608060405260018054600160a060020a031916331790556b60ef6b1aba6f07233000000060058190556b3077b58d5d3783919800000060068190556100519190640100000000610e176100b082021704565b600755691fc3842bd1f071c000006008556009805460ff1916905534801561007857600080fd5b5060018054600160a060020a031916331790819055600654600160a060020a03919091166000908152600260205260409020556100c2565b6000828211156100bc57fe5b50900390565b610e64806100d16000396000f30060806040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610126578063095ea7b3146101b057806318160ddd146101e857806323b872dd1461020f578063313ce567146102395780633ccfd60b1461024e5780633fa4f2451461026357806342966c681461027857806370a082311461029057806395d89b41146102b15780639b1cbccc146102c6578063a9059cbb146102db578063aa6ca8081461011c578063c108d542146102ff578063c489744b14610314578063d8a543601461033b578063dd62ed3e14610350578063e58fc54c14610377578063efca2eed14610398578063f2fde38b146103ad578063f9f92be4146103ce575b6101246103ef565b005b34801561013257600080fd5b5061013b6104cf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017557818101518382015260200161015d565b50505050905090810190601f1680156101a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101bc57600080fd5b506101d4600160a060020a0360043516602435610506565b604080519115158252519081900360200190f35b3480156101f457600080fd5b506101fd6105ae565b60408051918252519081900360200190f35b34801561021b57600080fd5b506101d4600160a060020a03600435811690602435166044356105b4565b34801561024557600080fd5b506101fd610739565b34801561025a57600080fd5b5061012461073e565b34801561026f57600080fd5b506101fd610798565b34801561028457600080fd5b5061012460043561079e565b34801561029c57600080fd5b506101fd600160a060020a036004351661087d565b3480156102bd57600080fd5b5061013b610898565b3480156102d257600080fd5b506101d46108cf565b3480156102e757600080fd5b506101d4600160a060020a0360043516602435610935565b34801561030b57600080fd5b506101d4610a26565b34801561032057600080fd5b506101fd600160a060020a0360043581169060243516610a2f565b34801561034757600080fd5b506101fd610ae0565b34801561035c57600080fd5b506101fd600160a060020a0360043581169060243516610ae6565b34801561038357600080fd5b506101d4600160a060020a0360043516610b11565b3480156103a457600080fd5b506101fd610c65565b3480156103b957600080fd5b50610124600160a060020a0360043516610c6b565b3480156103da57600080fd5b506101d4600160a060020a0360043516610cbd565b600954600090819060ff161561040457600080fd5b3360009081526004602052604090205460ff161561042157600080fd5b6007546008541115610434576007546008555b600754600854111561044557600080fd5b505060085433906104568282610cd2565b50600081111561048457600160a060020a0382166000908152600460205260409020805460ff191660011790555b6005546006541061049d576009805460ff191660011790555b6104c86201869f6104bc620186a0600854610dd590919063ffffffff16565b9063ffffffff610dec16565b6008555050565b60408051808201909152600b81527f53696143617368436f696e000000000000000000000000000000000000000000602082015281565b600081158015906105395750336000908152600360209081526040808320600160a060020a038716845290915290205415155b15610546575060006105a8565b336000818152600360209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60055481565b6000606060643610156105c357fe5b600160a060020a03841615156105d857600080fd5b600160a060020a0385166000908152600260205260409020548311156105fd57600080fd5b600160a060020a038516600090815260036020908152604080832033845290915290205483111561062d57600080fd5b600160a060020a038516600090815260026020526040902054610656908463ffffffff610e1716565b600160a060020a0386166000908152600260209081526040808320939093556003815282822033835290522054610693908463ffffffff610e1716565b600160a060020a0380871660009081526003602090815260408083203384528252808320949094559187168152600290915220546106d7908463ffffffff610e2916565b600160a060020a0380861660008181526002602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001949350505050565b601281565b600154600090600160a060020a0316331461075857600080fd5b50600154604051303191600160a060020a03169082156108fc029083906000818181858888f19350505050158015610794573d6000803e3d6000fd5b5050565b60085481565b600154600090600160a060020a031633146107b857600080fd5b336000908152600260205260409020548211156107d457600080fd5b50336000818152600260205260409020546107f5908363ffffffff610e1716565b600160a060020a038216600090815260026020526040902055600554610821908363ffffffff610e1716565b600555600654610837908363ffffffff610e1716565b600655604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b600160a060020a031660009081526002602052604090205490565b60408051808201909152600381527f5343430000000000000000000000000000000000000000000000000000000000602082015281565b600154600090600160a060020a031633146108e957600080fd5b60095460ff16156108f957600080fd5b6009805460ff191660011790556040517f7f95d919e78bdebe8a285e6e33357c2fcb65ccf66e72d7573f9f8f6caad0c4cc90600090a150600190565b60006040604436101561094457fe5b600160a060020a038416151561095957600080fd5b3360009081526002602052604090205483111561097557600080fd5b33600090815260026020526040902054610995908463ffffffff610e1716565b3360009081526002602052604080822092909255600160a060020a038616815220546109c7908463ffffffff610e2916565b600160a060020a0385166000818152600260209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b60095460ff1681565b600080600084915081600160a060020a03166370a08231856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610aab57600080fd5b505af1158015610abf573d6000803e3d6000fd5b505050506040513d6020811015610ad557600080fd5b505195945050505050565b60075481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60015460009081908190600160a060020a03163314610b2f57600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051859350600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610b9357600080fd5b505af1158015610ba7573d6000803e3d6000fd5b505050506040513d6020811015610bbd57600080fd5b5051600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b5051949350505050565b60065481565b600154600160a060020a03163314610c8257600080fd5b600160a060020a03811615610cba576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b60046020526000908152604090205460ff1681565b60095460009060ff1615610ce557600080fd5b600654610cf8908363ffffffff610e2916565b600655600754610d0e908363ffffffff610e1716565b600755600160a060020a038316600090815260026020526040902054610d3a908363ffffffff610e2916565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f8940c4b8e215f8822c5c8f0056c12652c746cbc57eedbd2a440b175971d47a7792918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060016105a8565b6000808284811515610de357fe5b04949350505050565b6000828202831580610e085750828482811515610e0557fe5b04145b1515610e1057fe5b9392505050565b600082821115610e2357fe5b50900390565b600082820183811015610e1057fe00a165627a7a7230582025b23b361208ba204b2caccebdae7829cc292daf06a63bd1a4655debc68068e90029

Swarm Source

bzzr://25b23b361208ba204b2caccebdae7829cc292daf06a63bd1a4655debc68068e9

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.