ERC-20
Overview
Max Total Supply
39,243,915,987,083,101,296 N1D
Holders
4,710
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Number1Dime
Compiler Version
v0.4.17+commit.bdeb9e52
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-10-22 */ pragma solidity ^0.4.0; // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/issues/20 contract ERC20Interface { // Get the total token supply function totalSupply() public constant returns (uint256); // Get the account balance of another account with address _owner function balanceOf(address _owner) public constant returns (uint256); // Send _value amount of tokens to address _to function transfer(address _to, uint256 _value) public returns (bool); // Send _value amount of tokens from address _from to address _to function transferFrom(address _from, address _to, uint256 _value) public returns (bool); // 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. // this function is required for some DEX functionality function approve(address _spender, uint256 _value) public returns (bool); // Returns the amount which _spender is still allowed to withdraw from _owner function allowance(address _owner, address _spender) public constant returns (uint256); // Triggered when tokens are transferred. event Transfer(address indexed _from, address indexed _to, uint256 _value); // Triggered whenever approve(address _spender, uint256 _value) is called. event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract RandomToken { function balanceOf(address _owner) public view returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } contract Number1Dime is ERC20Interface { bool public is_purchase_allowed; bool public is_transfer_allowed; uint256 public totSupply = 0; uint256 public totContribution = 0; address owner; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; modifier onlyOwner() { if (msg.sender != owner) { revert(); } _; } modifier transferAllowed() { if (! is_transfer_allowed) { revert(); } _; } modifier purchaseAllowed() { if (! is_purchase_allowed) { revert(); } _; } function Number1Dime() public { owner = msg.sender; enableTransfer(false); enablePurchase(false); } function name() public pure returns (string) { return "Number One Dime"; } function symbol() public pure returns (string) { return "N1D"; } function decimals() public pure returns (uint8) { return 0; } function get_balance(address a) public view returns (uint256) { return a.balance; } function get_stats() public view onlyOwner returns (uint256 _totSupply, uint256 _totContribution) { _totSupply = totSupply; _totContribution = totContribution; } function enablePurchase(bool _enab) public onlyOwner returns (bool) { return is_purchase_allowed = _enab; } function enableTransfer(bool _enab) public onlyOwner returns (bool) { return is_transfer_allowed = _enab; } function totalSupply() public view returns (uint256) { return totSupply; } function balanceOf(address a) public view returns (uint256) { return balances[a]; } function transfer(address _to, uint256 _amount) public transferAllowed returns (bool) { if ( _amount > 0 && balances[msg.sender] >= _amount && balances[_to] + _amount > balances[_to] ) { balances[msg.sender] -= _amount; balances[_to] += _amount; Transfer(msg.sender, _to, _amount); return true; } else { return false; } } function transferFrom( address _from, address _to, uint256 _amount ) public transferAllowed returns (bool) { if ( _amount > 0 && balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && balances[_to] + _amount > balances[_to] ) { balances[_from] -= _amount; allowed[_from][msg.sender] -= _amount; balances[_to] += _amount; Transfer(_from, _to, _amount); return true; } else { return false; } } function approve(address _spender, uint256 _amount) public returns (bool) { allowed[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; } function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } function() public payable purchaseAllowed { if (msg.value == 0) { return; } totContribution += msg.value; uint256 tokensIssued = msg.value; totSupply += tokensIssued; owner.transfer(msg.value); balances[msg.sender] += tokensIssued; Transfer(address(this), msg.sender, tokensIssued); } function withdrawForeignTokens(address _tokenContract) public onlyOwner returns (bool) { RandomToken token = RandomToken(_tokenContract); uint256 amount = token.balanceOf(address(this)); return token.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,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","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":true,"inputs":[{"name":"a","type":"address"}],"name":"get_balance","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"is_purchase_allowed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"is_transfer_allowed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"get_stats","outputs":[{"name":"_totSupply","type":"uint256"},{"name":"_totContribution","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totContribution","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":false,"inputs":[{"name":"_enab","type":"bool"}],"name":"enableTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_enab","type":"bool"}],"name":"enablePurchase","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","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"}]
Contract Creation Code
606060405260006001556000600255341561001957600080fd5b60038054600160a060020a03191633600160a060020a031617905561004b600064010000000061006981026109011704565b50610063600064010000000061093661009e82021704565b506100ce565b60035460009033600160a060020a0390811691161461008757600080fd5b506000805461ff0019166101008315150217905590565b60035460009033600160a060020a039081169116146100bc57600080fd5b506000805460ff191682151517905590565b6109a4806100dd6000396000f300606060405236156100e05763ffffffff60e060020a60003504166306fdde0381146101a2578063095ea7b31461022c57806318160ddd146102625780631e279a371461028757806323b872dd146102a6578063313ce567146102ce5780633fd01a77146102f75780635d54cb1f1461030a57806361837e411461031d57806370a082311461034857806381fbf0a51461036757806395d89b411461037a578063a9059cbb1461038d578063dbc69521146103af578063dd62ed3e146103c2578063e58fc54c146103e7578063ef7ac0e514610406578063f7446dec1461041e575b6000805460ff1615156100f257600080fd5b3415156100fe5761019f565b5060028054349081019091556001805482019055600354600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561014557600080fd5b600160a060020a033381166000818152600460205260409081902080548501905590913016907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b50005b34156101ad57600080fd5b6101b5610436565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101f15780820151838201526020016101d9565b50505050905090810190601f16801561021e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561023757600080fd5b61024e600160a060020a0360043516602435610477565b604051901515815260200160405180910390f35b341561026d57600080fd5b6102756104e4565b60405190815260200160405180910390f35b341561029257600080fd5b610275600160a060020a03600435166104ea565b34156102b157600080fd5b61024e600160a060020a03600435811690602435166044356104f7565b34156102d957600080fd5b6102e1610629565b60405160ff909116815260200160405180910390f35b341561030257600080fd5b61024e61062e565b341561031557600080fd5b61024e610637565b341561032857600080fd5b610330610645565b60405191825260208201526040908101905180910390f35b341561035357600080fd5b610275600160a060020a0360043516610671565b341561037257600080fd5b61027561068c565b341561038557600080fd5b6101b5610692565b341561039857600080fd5b61024e600160a060020a03600435166024356106d3565b34156103ba57600080fd5b6102756107b2565b34156103cd57600080fd5b610275600160a060020a03600435811690602435166107b8565b34156103f257600080fd5b61024e600160a060020a03600435166107e3565b341561041157600080fd5b61024e6004351515610901565b341561042957600080fd5b61024e6004351515610936565b61043e610966565b60408051908101604052600f81527f4e756d626572204f6e652044696d6500000000000000000000000000000000006020820152905090565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60015490565b600160a060020a03163190565b60008054610100900460ff16151561050e57600080fd5b6000821180156105375750600160a060020a038416600090815260046020526040902054829010155b801561056a5750600160a060020a0380851660009081526005602090815260408083203390941683529290522054829010155b801561058f5750600160a060020a038316600090815260046020526040902054828101115b1561061e57600160a060020a0380851660008181526004602081815260408084208054899003905560058252808420338716855282528084208054899003905594881680845291905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610622565b5060005b9392505050565b600090565b60005460ff1681565b600054610100900460ff1681565b600354600090819033600160a060020a0390811691161461066557600080fd5b50506001546002549091565b600160a060020a031660009081526004602052604090205490565b60015481565b61069a610966565b60408051908101604052600381527f4e314400000000000000000000000000000000000000000000000000000000006020820152905090565b60008054610100900460ff1615156106ea57600080fd5b6000821180156107135750600160a060020a033316600090815260046020526040902054829010155b80156107385750600160a060020a038316600090815260046020526040902054828101115b156107aa57600160a060020a033381166000818152600460205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060016104de565b5060006104de565b60025481565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b6003546000908190819033600160a060020a0390811691161461080557600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561085f57600080fd5b6102c65a03f1151561087057600080fd5b5050506040518051600354909250600160a060020a03808516925063a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156108df57600080fd5b6102c65a03f115156108f057600080fd5b505050604051805195945050505050565b60035460009033600160a060020a0390811691161461091f57600080fd5b506000805461ff0019166101008315150217905590565b60035460009033600160a060020a0390811691161461095457600080fd5b506000805460ff191682151517905590565b602060405190810160405260008152905600a165627a7a7230582002e0fa3248f869a45c637f2bda2d53e840679cb25dc80f958f13c8fca0eac8af0029
Deployed Bytecode
0x606060405236156100e05763ffffffff60e060020a60003504166306fdde0381146101a2578063095ea7b31461022c57806318160ddd146102625780631e279a371461028757806323b872dd146102a6578063313ce567146102ce5780633fd01a77146102f75780635d54cb1f1461030a57806361837e411461031d57806370a082311461034857806381fbf0a51461036757806395d89b411461037a578063a9059cbb1461038d578063dbc69521146103af578063dd62ed3e146103c2578063e58fc54c146103e7578063ef7ac0e514610406578063f7446dec1461041e575b6000805460ff1615156100f257600080fd5b3415156100fe5761019f565b5060028054349081019091556001805482019055600354600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561014557600080fd5b600160a060020a033381166000818152600460205260409081902080548501905590913016907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b50005b34156101ad57600080fd5b6101b5610436565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101f15780820151838201526020016101d9565b50505050905090810190601f16801561021e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561023757600080fd5b61024e600160a060020a0360043516602435610477565b604051901515815260200160405180910390f35b341561026d57600080fd5b6102756104e4565b60405190815260200160405180910390f35b341561029257600080fd5b610275600160a060020a03600435166104ea565b34156102b157600080fd5b61024e600160a060020a03600435811690602435166044356104f7565b34156102d957600080fd5b6102e1610629565b60405160ff909116815260200160405180910390f35b341561030257600080fd5b61024e61062e565b341561031557600080fd5b61024e610637565b341561032857600080fd5b610330610645565b60405191825260208201526040908101905180910390f35b341561035357600080fd5b610275600160a060020a0360043516610671565b341561037257600080fd5b61027561068c565b341561038557600080fd5b6101b5610692565b341561039857600080fd5b61024e600160a060020a03600435166024356106d3565b34156103ba57600080fd5b6102756107b2565b34156103cd57600080fd5b610275600160a060020a03600435811690602435166107b8565b34156103f257600080fd5b61024e600160a060020a03600435166107e3565b341561041157600080fd5b61024e6004351515610901565b341561042957600080fd5b61024e6004351515610936565b61043e610966565b60408051908101604052600f81527f4e756d626572204f6e652044696d6500000000000000000000000000000000006020820152905090565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60015490565b600160a060020a03163190565b60008054610100900460ff16151561050e57600080fd5b6000821180156105375750600160a060020a038416600090815260046020526040902054829010155b801561056a5750600160a060020a0380851660009081526005602090815260408083203390941683529290522054829010155b801561058f5750600160a060020a038316600090815260046020526040902054828101115b1561061e57600160a060020a0380851660008181526004602081815260408084208054899003905560058252808420338716855282528084208054899003905594881680845291905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610622565b5060005b9392505050565b600090565b60005460ff1681565b600054610100900460ff1681565b600354600090819033600160a060020a0390811691161461066557600080fd5b50506001546002549091565b600160a060020a031660009081526004602052604090205490565b60015481565b61069a610966565b60408051908101604052600381527f4e314400000000000000000000000000000000000000000000000000000000006020820152905090565b60008054610100900460ff1615156106ea57600080fd5b6000821180156107135750600160a060020a033316600090815260046020526040902054829010155b80156107385750600160a060020a038316600090815260046020526040902054828101115b156107aa57600160a060020a033381166000818152600460205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060016104de565b5060006104de565b60025481565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b6003546000908190819033600160a060020a0390811691161461080557600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561085f57600080fd5b6102c65a03f1151561087057600080fd5b5050506040518051600354909250600160a060020a03808516925063a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156108df57600080fd5b6102c65a03f115156108f057600080fd5b505050604051805195945050505050565b60035460009033600160a060020a0390811691161461091f57600080fd5b506000805461ff0019166101008315150217905590565b60035460009033600160a060020a0390811691161461095457600080fd5b506000805460ff191682151517905590565b602060405190810160405260008152905600a165627a7a7230582002e0fa3248f869a45c637f2bda2d53e840679cb25dc80f958f13c8fca0eac8af0029
Swarm Source
bzzr://02e0fa3248f869a45c637f2bda2d53e840679cb25dc80f958f13c8fca0eac8af
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.