Token migration announcement. BitStash token contract has migrated to a new address.
ERC-20
Overview
Max Total Supply
6,000,000,000 STASH
Holders
11,631
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,000 STASHValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
STASHToken
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-01-19 */ pragma solidity ^0.4.18; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } } contract STASHInterface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } contract STASHToken is STASHInterface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint256 public unitsOneEthCanBuy; uint256 public totalEthInWei; address public fundsWallet; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; function STASHToken() public { symbol = "STASH"; name = "BitStash"; decimals = 18; _totalSupply = 6000000000 * 10**uint(decimals); balances[owner] = _totalSupply; Transfer(address(0), owner, _totalSupply); unitsOneEthCanBuy = 600000; fundsWallet = msg.sender; } function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; } function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; } function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); Transfer(msg.sender, to, tokens); return true; } function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; } function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); Transfer(from, to, tokens); return true; } function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; } function() payable public{ totalEthInWei = totalEthInWei + msg.value; uint256 amount = msg.value * unitsOneEthCanBuy; if (balances[fundsWallet] < amount) { return; } balances[fundsWallet] = balances[fundsWallet] - amount; balances[msg.sender] = balances[msg.sender] + amount; Transfer(fundsWallet, msg.sender, amount); // Broadcast a message to the blockchain //Transfer ether to fundsWallet fundsWallet.transfer(msg.value); } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. if(!_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { revert(); } return true; } function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return STASHInterface(tokenAddress).transfer(owner, tokens); } }
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":"tokens","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":true,"inputs":[],"name":"fundsWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","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":"_totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"unitsOneEthCanBuy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"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":"totalEthInWei","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":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transferAnyERC20Token","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"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"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b60008054600160a060020a03191633600160a060020a031617905560408051908101604052600581527f535441534800000000000000000000000000000000000000000000000000000060208201526002908051610071929160200190610159565b5060408051908101604052600881527f4269745374617368000000000000000000000000000000000000000000000000602082015260039080516100b9929160200190610159565b5060048054601260ff19909116179081905560ff16600a0a640165a0bc0002600581905560008054600160a060020a039081168252600960205260408083208490558254909116927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915190815260200160405180910390a3620927c060065560088054600160a060020a03191633600160a060020a03161790556101f4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061019a57805160ff19168380011785556101c7565b828001600101855582156101c7579182015b828111156101c75782518255916020019190600101906101ac565b506101d39291506101d7565b5090565b6101f191905b808211156101d357600081556001016101dd565b90565b610c38806102036000396000f3006060604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146101cc578063095ea7b31461025657806318160ddd1461028c5780632194f3a2146102b157806323b872dd146102e0578063313ce567146103085780633eaaf86b1461033157806365f2bc2e1461034457806370a082311461035757806379ba5097146103765780638da5cb5b1461038b578063933ba4131461039e57806395d89b41146103b1578063a9059cbb146103c4578063cae9ca51146103e6578063d4ee1d901461044b578063dc39d06d1461045e578063dd62ed3e14610480578063f2fde38b146104a5575b6007805434908101909155600654600854600160a060020a031660009081526009602052604090205491029081901015610126576101c9565b60088054600160a060020a039081166000908152600960205260408082208054869003905533831680835291819020805486019055925490929116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3600854600160a060020a03163480156108fc0290604051600060405180830381858888f1935050505015156101c957600080fd5b50005b34156101d757600080fd5b6101df6104c4565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561021b578082015183820152602001610203565b50505050905090810190601f1680156102485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561026157600080fd5b610278600160a060020a0360043516602435610562565b604051901515815260200160405180910390f35b341561029757600080fd5b61029f6105cf565b60405190815260200160405180910390f35b34156102bc57600080fd5b6102c4610601565b604051600160a060020a03909116815260200160405180910390f35b34156102eb57600080fd5b610278600160a060020a0360043581169060243516604435610610565b341561031357600080fd5b61031b610723565b60405160ff909116815260200160405180910390f35b341561033c57600080fd5b61029f61072c565b341561034f57600080fd5b61029f610732565b341561036257600080fd5b61029f600160a060020a0360043516610738565b341561038157600080fd5b610389610753565b005b341561039657600080fd5b6102c46107e1565b34156103a957600080fd5b61029f6107f0565b34156103bc57600080fd5b6101df6107f6565b34156103cf57600080fd5b610278600160a060020a0360043516602435610861565b34156103f157600080fd5b61027860048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061092095505050505050565b341561045657600080fd5b6102c4610ac0565b341561046957600080fd5b610278600160a060020a0360043516602435610acf565b341561048b57600080fd5b61029f600160a060020a0360043581169060243516610b72565b34156104b057600080fd5b610389600160a060020a0360043516610b9d565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055a5780601f1061052f5761010080835404028352916020019161055a565b820191906000526020600020905b81548152906001019060200180831161053d57829003601f168201915b505050505081565b600160a060020a033381166000818152600a6020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b6000805260096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b546005540390565b600854600160a060020a031681565b600160a060020a038316600090815260096020526040812054610639908363ffffffff610be716565b600160a060020a03808616600090815260096020908152604080832094909455600a815283822033909316825291909152205461067c908363ffffffff610be716565b600160a060020a038086166000908152600a6020908152604080832033851684528252808320949094559186168152600990915220546106c2908363ffffffff610bfc16565b600160a060020a03808516600081815260096020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60045460ff1681565b60055481565b60065481565b600160a060020a031660009081526009602052604090205490565b60015433600160a060020a0390811691161461076e57600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b60075481565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055a5780601f1061052f5761010080835404028352916020019161055a565b600160a060020a03331660009081526009602052604081205461088a908363ffffffff610be716565b600160a060020a0333811660009081526009602052604080822093909355908516815220546108bf908363ffffffff610bfc16565b600160a060020a0380851660008181526009602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000818152600a6020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b83811015610a61578082015183820152602001610a49565b50505050905090810190601f168015610a8e5780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f1925050501515610ab657600080fd5b5060019392505050565b600154600160a060020a031681565b6000805433600160a060020a03908116911614610aeb57600080fd5b60008054600160a060020a038086169263a9059cbb929091169085906040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610b5157600080fd5b6102c65a03f11515610b6257600080fd5b5050506040518051949350505050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60005433600160a060020a03908116911614610bb857600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bf657600080fd5b50900390565b818101828110156105c957600080fd00a165627a7a7230582051c36271d668b131e0d769ed6bf972985089851a6e90e4b22bac73387cde06870029
Deployed Bytecode
0x6060604052600436106100ed5763ffffffff60e060020a60003504166306fdde0381146101cc578063095ea7b31461025657806318160ddd1461028c5780632194f3a2146102b157806323b872dd146102e0578063313ce567146103085780633eaaf86b1461033157806365f2bc2e1461034457806370a082311461035757806379ba5097146103765780638da5cb5b1461038b578063933ba4131461039e57806395d89b41146103b1578063a9059cbb146103c4578063cae9ca51146103e6578063d4ee1d901461044b578063dc39d06d1461045e578063dd62ed3e14610480578063f2fde38b146104a5575b6007805434908101909155600654600854600160a060020a031660009081526009602052604090205491029081901015610126576101c9565b60088054600160a060020a039081166000908152600960205260408082208054869003905533831680835291819020805486019055925490929116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3600854600160a060020a03163480156108fc0290604051600060405180830381858888f1935050505015156101c957600080fd5b50005b34156101d757600080fd5b6101df6104c4565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561021b578082015183820152602001610203565b50505050905090810190601f1680156102485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561026157600080fd5b610278600160a060020a0360043516602435610562565b604051901515815260200160405180910390f35b341561029757600080fd5b61029f6105cf565b60405190815260200160405180910390f35b34156102bc57600080fd5b6102c4610601565b604051600160a060020a03909116815260200160405180910390f35b34156102eb57600080fd5b610278600160a060020a0360043581169060243516604435610610565b341561031357600080fd5b61031b610723565b60405160ff909116815260200160405180910390f35b341561033c57600080fd5b61029f61072c565b341561034f57600080fd5b61029f610732565b341561036257600080fd5b61029f600160a060020a0360043516610738565b341561038157600080fd5b610389610753565b005b341561039657600080fd5b6102c46107e1565b34156103a957600080fd5b61029f6107f0565b34156103bc57600080fd5b6101df6107f6565b34156103cf57600080fd5b610278600160a060020a0360043516602435610861565b34156103f157600080fd5b61027860048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061092095505050505050565b341561045657600080fd5b6102c4610ac0565b341561046957600080fd5b610278600160a060020a0360043516602435610acf565b341561048b57600080fd5b61029f600160a060020a0360043581169060243516610b72565b34156104b057600080fd5b610389600160a060020a0360043516610b9d565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055a5780601f1061052f5761010080835404028352916020019161055a565b820191906000526020600020905b81548152906001019060200180831161053d57829003601f168201915b505050505081565b600160a060020a033381166000818152600a6020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b6000805260096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b546005540390565b600854600160a060020a031681565b600160a060020a038316600090815260096020526040812054610639908363ffffffff610be716565b600160a060020a03808616600090815260096020908152604080832094909455600a815283822033909316825291909152205461067c908363ffffffff610be716565b600160a060020a038086166000908152600a6020908152604080832033851684528252808320949094559186168152600990915220546106c2908363ffffffff610bfc16565b600160a060020a03808516600081815260096020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60045460ff1681565b60055481565b60065481565b600160a060020a031660009081526009602052604090205490565b60015433600160a060020a0390811691161461076e57600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b60075481565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055a5780601f1061052f5761010080835404028352916020019161055a565b600160a060020a03331660009081526009602052604081205461088a908363ffffffff610be716565b600160a060020a0333811660009081526009602052604080822093909355908516815220546108bf908363ffffffff610bfc16565b600160a060020a0380851660008181526009602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000818152600a6020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b83811015610a61578082015183820152602001610a49565b50505050905090810190601f168015610a8e5780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f1925050501515610ab657600080fd5b5060019392505050565b600154600160a060020a031681565b6000805433600160a060020a03908116911614610aeb57600080fd5b60008054600160a060020a038086169263a9059cbb929091169085906040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610b5157600080fd5b6102c65a03f11515610b6257600080fd5b5050506040518051949350505050565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60005433600160a060020a03908116911614610bb857600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bf657600080fd5b50900390565b818101828110156105c957600080fd00a165627a7a7230582051c36271d668b131e0d769ed6bf972985089851a6e90e4b22bac73387cde06870029
Swarm Source
bzzr://51c36271d668b131e0d769ed6bf972985089851a6e90e4b22bac73387cde0687
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.