/* -:////:-.
`:ohmMMMMMMMMMMMMmho:`
`+hMMMMMMMMMMMMMMMMMMMMMMh+`
.yMMMMMMMmyo/:----:/oymMMMMMMMy.
`sMMMMMMy/` `/yMMMMMMs`
-NMMMMNo` ./sydddhys/. `oNMMMMN- SAFE.AD: Secure Email & File Storage ICO
/MMMMMy` .sNMMMMMMMMMMMMmo. `yMMMMM/
:MMMMM+ `yMMMMMMNmddmMMMMMMMs` +MMMMM:
mMMMMo .NMMMMNo- `` -sNMMMMm. oMMMMm
/MMMMm `mMMMMy` `hMMm: `hMMMMm mMMMM/
yMMMMo +MMMMd .NMMM+ mMMMM/ oMMMMy
hMMMM/ sMMMMs :MMy yMMMMo /MMMMh GIFT TOKENS. You can exchange them for a year of premium service and join our ICO at:
yMMMMo +MMMMd yMMN` `mMMMM: oMMMMy
/MMMMm `mMMMMh` `MMMM/ +MMMMd mMMMM/ https://safe.ad
mMMMMo .mMMMMNs-`'`'` /MMMMm- `sMMMMm
:MMMMM+ `sMMMMMMMmmmmy. hMMMMMMMMMMMN- The product is already running.
/MMMMMy` .omMMMMMMMMMy +mMMMMMMMMy.
-NMMMMNo` ./oyhhhho` ./oso+:` ICO will help us to create the next big thing.
`sMMMMMMy/` `-.
.yMMMMMMMmyo/:----:/oymMMMd`
`+hMMMMMMMMMMMMMMMMMMMMMN.
`:ohmMMMMMMMMMMMMmho:
.-:////:-.
*/
pragma solidity ^0.4.18;
contract ERC20Interface{
function balanceOf(address) public constant returns (uint256);
function transfer(address, uint256) public returns (bool);
}
contract SafeGift{
address private owner;
uint256 public totalSupply;
mapping(address => uint256) balances;
uint256 constant private MAX_UINT256 = 2**256 - 1;
uint8 constant public decimals = 0;
string public url = "https://safe.ad";
string public name;
string public symbol;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
function SafeGift(uint256 _totalSupply, string _tokenName, string _tokenSymbol) public{
owner = msg.sender;
totalSupply = _totalSupply;
balances[owner] = totalSupply;
name = _tokenName;
symbol = _tokenSymbol;
}
function transfer(address _to, uint256 _value) public returns (bool){
require(_to != address(0) && _value < MAX_UINT256 && balances[msg.sender] >= _value);
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
function balanceOf(address _address) public view returns (uint256){
return balances[_address];
}
function allowance(address _owner, address _spender) public view returns (uint256){
return 0;
}
function approve(address _spender, uint256 _value) public returns (bool){
return true;
}
function withdrawnTokens(address[] _tokens, address _to) public returns (bool){
require(msg.sender == owner);
for(uint256 i = 0; i < _tokens.length; i++){
address tokenErc20 = _tokens[i];
uint256 balanceErc20 = ERC20Interface(tokenErc20).balanceOf(this);
if(balanceErc20 != 0) ERC20Interface(tokenErc20).transfer(_to, balanceErc20);
}
return true;
}
function promo(address[] _recipients) public {
require(msg.sender == owner);
balances[owner] -= 12 * _recipients.length;
for(uint8 i = 0; i < _recipients.length; i++){
balances[_recipients[i]] += 12;
Transfer(address(this), _recipients[i], 12);
}
}
function setInfo(string _symbol, string _name) public returns (bool){
require(msg.sender == owner);
symbol = _symbol;
name = _name;
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool){
return true;
}
function() public payable{ }
}
{
"compilationTarget": {
"SafeGift.sol": "SafeGift"
},
"evmVersion": "byzantium",
"libraries": {},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"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":"_recipients","type":"address[]"}],"name":"promo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"url","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_address","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":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_symbol","type":"string"},{"name":"_name","type":"string"}],"name":"setInfo","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokens","type":"address[]"},{"name":"_to","type":"address"}],"name":"withdrawnTokens","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":[{"name":"_totalSupply","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_tokenSymbol","type":"string"}],"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"}]