ETH Price: $3,048.72 (+2.23%)
Gas: 2 Gwei

Token

Fantasy (FT)
 

Overview

Max Total Supply

12,000,000,000 FT

Holders

298

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
5,000 FT

Value
$0.00
0xb7144187a96235ec93b186255d5eb71890ef5f3a
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CustomToken

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.19;

contract BaseToken {
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function _transfer(address _from, address _to, uint _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value > balanceOf[_to]);
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
        Transfer(_from, _to, _value);
    }

    function transfer(address _to, uint256 _value) public returns (bool success) {
        _transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require(_value <= allowance[_from][msg.sender]);
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    function approve(address _spender, uint256 _value) public returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }
}

contract AirdropToken is BaseToken {
    uint256 public airAmount;
    uint256 public airBegintime;
    uint256 public airEndtime;
    address public airSender;
    uint32 public airLimitCount;

    mapping (address => uint32) public airCountOf;

    event Airdrop(address indexed from, uint32 indexed count, uint256 tokenValue);

    function airdrop() public payable {
        require(now >= airBegintime && now <= airEndtime);
        require(msg.value == 0);
        if (airLimitCount > 0 && airCountOf[msg.sender] >= airLimitCount) {
            revert();
        }
        _transfer(airSender, msg.sender, airAmount);
        airCountOf[msg.sender] += 1;
        Airdrop(msg.sender, airCountOf[msg.sender], airAmount);
    }
}

contract ICOToken is BaseToken {
    // 1 ether = icoRatio token
    uint256 public icoRatio;
    uint256 public icoBegintime;
    uint256 public icoEndtime;
    address public icoSender;
    address public icoHolder;

    event ICO(address indexed from, uint256 indexed value, uint256 tokenValue);
    event Withdraw(address indexed from, address indexed holder, uint256 value);

    function ico() public payable {
        require(now >= icoBegintime && now <= icoEndtime);
        uint256 tokenValue = (msg.value * icoRatio * 10 ** uint256(decimals)) / (1 ether / 1 wei);
        if (tokenValue == 0 || balanceOf[icoSender] < tokenValue) {
            revert();
        }
        _transfer(icoSender, msg.sender, tokenValue);
        ICO(msg.sender, msg.value, tokenValue);
    }

    function withdraw() public {
        uint256 balance = this.balance;
        icoHolder.transfer(balance);
        Withdraw(msg.sender, icoHolder, balance);
    }
}

contract CustomToken is BaseToken, AirdropToken, ICOToken {
    function CustomToken() public {
        totalSupply = 12000000000000000000000000000;
        name = 'Fantasy';
        symbol = 'FT';
        decimals = 18;
        balanceOf[0xa06ea172c01d7551d66f0df294eabd8d6c5822be] = totalSupply;
        Transfer(address(0), 0xa06ea172c01d7551d66f0df294eabd8d6c5822be, totalSupply);

        airAmount = 5000000000000000000000;
        airBegintime = 1520312400;
        airEndtime = 1609390800;
        airSender = 0xa06ea172c01d7551d66f0df294eabd8d6c5822be;
        airLimitCount = 1;

        icoRatio = 200000;
        icoBegintime = 1520312400;
        icoEndtime = 1924923600;
        icoSender = 0xa06ea172c01d7551d66f0df294eabd8d6c5822be;
        icoHolder = 0xa06ea172c01d7551d66f0df294eabd8d6c5822be;
    }

    function() public payable {
        if (msg.value == 0) {
            airdrop();
        } else {
            ico();
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"airAmount","outputs":[{"name":"","type":"uint256"}],"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":"_value","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":false,"inputs":[],"name":"airdrop","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ico","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"airSender","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":true,"inputs":[],"name":"icoHolder","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"airCountOf","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"airEndtime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoRatio","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoEndtime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoSender","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoBegintime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"airBegintime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"airLimitCount","outputs":[{"name":"","type":"uint32"}],"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":"value","type":"uint256"},{"indexed":false,"name":"tokenValue","type":"uint256"}],"name":"ICO","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"count","type":"uint32"},{"indexed":false,"name":"tokenValue","type":"uint256"}],"name":"Airdrop","type":"event"},{"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"}]

6060604052341561000f57600080fd5b6b26c62ad77dc602dae000000060035560408051908101604052600781527f46616e7461737900000000000000000000000000000000000000000000000000602082015260009080516100669291602001906101d6565b5060408051908101604052600281527f4654000000000000000000000000000000000000000000000000000000000000602082015260019080516100ae9291602001906101d6565b506002805460ff1916601217905560035473a06ea172c01d7551d66f0df294eabd8d6c5822be600081815260046020527f8f40a62d5393555032250673a2db3c2e6d2dbe5f81826cff4ca3f9829eeb11d783905590917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060405190815260200160405180910390a369010f0cf064dd59200000600655635a9e20506007819055635fed5ad0600855600980547401000000000000000000000000000000000000000073a06ea172c01d7551d66f0df294eabd8d6c5822be600160a060020a0319928316811760a060020a63ffffffff0219169190911790925562030d40600b55600c929092556372bc00d0600d55600e8054831682179055600f8054909216179055610271565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061021757805160ff1916838001178555610244565b82800160010185558215610244579182015b82811115610244578251825591602001919060010190610229565b50610250929150610254565b5090565b61026e91905b80821115610250576000815560010161025a565b90565b610a8a806102806000396000f3006060604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461015057806307cc6051146101da578063095ea7b3146101ff57806318160ddd1461023557806323b872dd14610248578063313ce567146102705780633884d635146102995780633ccfd60b146102a15780635d4522011461014657806370a08231146102b45780637d720296146102d357806395d89b4114610302578063a2ebb20b14610315578063a3fe1ade14610328578063a9059cbb14610360578063b0f85a1014610382578063b3b8c62014610395578063d211fe86146103a8578063dd62ed3e146103bb578063de28fc1d146103e0578063e6136d84146103f3578063e67ad25414610406578063e779a8cf14610419575b3415156101465761014161042c565b61014e565b61014e610559565b005b341561015b57600080fd5b610163610621565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561019f578082015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101e557600080fd5b6101ed6106bf565b60405190815260200160405180910390f35b341561020a57600080fd5b610221600160a060020a03600435166024356106c5565b604051901515815260200160405180910390f35b341561024057600080fd5b6101ed610731565b341561025357600080fd5b610221600160a060020a0360043581169060243516604435610737565b341561027b57600080fd5b6102836107ae565b60405160ff909116815260200160405180910390f35b61014e61042c565b34156102ac57600080fd5b61014e6107b7565b34156102bf57600080fd5b6101ed600160a060020a0360043516610836565b34156102de57600080fd5b6102e6610848565b604051600160a060020a03909116815260200160405180910390f35b341561030d57600080fd5b610163610857565b341561032057600080fd5b6102e66108c2565b341561033357600080fd5b610347600160a060020a03600435166108d1565b60405163ffffffff909116815260200160405180910390f35b341561036b57600080fd5b610221600160a060020a03600435166024356108e9565b341561038d57600080fd5b6101ed6108ff565b34156103a057600080fd5b6101ed610905565b34156103b357600080fd5b6101ed61090b565b34156103c657600080fd5b6101ed600160a060020a0360043581169060243516610911565b34156103eb57600080fd5b6102e661092e565b34156103fe57600080fd5b6101ed61093d565b341561041157600080fd5b6101ed610943565b341561042457600080fd5b610347610949565b600754421015801561044057506008544211155b151561044b57600080fd5b341561045657600080fd5b60095460007401000000000000000000000000000000000000000090910463ffffffff161180156104c35750600954600160a060020a0333166000908152600a602052604090205463ffffffff740100000000000000000000000000000000000000009092048216911610155b156104cd57600080fd5b6009546006546104e891600160a060020a031690339061096d565b33600160a060020a03166000818152600a602052604090819020805463ffffffff198116600163ffffffff9283160182161791829055600654911692917fcce6ff7d594e7067a58df51c8588740b7c8b42537da7262add9823085de82e4891905190815260200160405180910390a3565b6000600c54421015801561056f5750600d544211155b151561057a57600080fd5b600254600b54670de0b6b3a76400009160ff16600a0a34909102020490508015806105bf5750600e54600160a060020a03166000908152600460205260409020548190105b156105c957600080fd5b600e546105e090600160a060020a0316338361096d565b3433600160a060020a03167f4a987bc3d04b32db133ad9a3c7c0d8ecc441eb56f45a62b92c38384c095e7ac08360405190815260200160405180910390a350565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106b75780601f1061068c576101008083540402835291602001916106b7565b820191906000526020600020905b81548152906001019060200180831161069a57829003601f168201915b505050505081565b60065481565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035481565b600160a060020a0380841660009081526005602090815260408083203390941683529290529081205482111561076c57600080fd5b600160a060020a03808516600090815260056020908152604080832033909416835292905220805483900390556107a484848461096d565b5060019392505050565b60025460ff1681565b600f54600160a060020a0330811631911681156108fc0282604051600060405180830381858888f1935050505015156107ef57600080fd5b600f54600160a060020a039081169033167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405190815260200160405180910390a350565b60046020526000908152604090205481565b600954600160a060020a031681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106b75780601f1061068c576101008083540402835291602001916106b7565b600f54600160a060020a031681565b600a6020526000908152604090205463ffffffff1681565b60006108f633848461096d565b50600192915050565b60085481565b600b5481565b600d5481565b600560209081526000928352604080842090915290825290205481565b600e54600160a060020a031681565b600c5481565b60075481565b60095474010000000000000000000000000000000000000000900463ffffffff1681565b6000600160a060020a038316151561098457600080fd5b600160a060020a038416600090815260046020526040902054829010156109aa57600080fd5b600160a060020a038316600090815260046020526040902054828101116109d057600080fd5b50600160a060020a038281166000908152600460205260408082208054938716835291208054848103825582548501928390559054920191018114610a1157fe5b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a3505050505600a165627a7a72305820f0579d757aa40ac1a85a28e4a0cb6476d2fa836503fd666e7b5104a5b59efaf20029

Deployed Bytecode

0x6060604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461015057806307cc6051146101da578063095ea7b3146101ff57806318160ddd1461023557806323b872dd14610248578063313ce567146102705780633884d635146102995780633ccfd60b146102a15780635d4522011461014657806370a08231146102b45780637d720296146102d357806395d89b4114610302578063a2ebb20b14610315578063a3fe1ade14610328578063a9059cbb14610360578063b0f85a1014610382578063b3b8c62014610395578063d211fe86146103a8578063dd62ed3e146103bb578063de28fc1d146103e0578063e6136d84146103f3578063e67ad25414610406578063e779a8cf14610419575b3415156101465761014161042c565b61014e565b61014e610559565b005b341561015b57600080fd5b610163610621565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561019f578082015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101e557600080fd5b6101ed6106bf565b60405190815260200160405180910390f35b341561020a57600080fd5b610221600160a060020a03600435166024356106c5565b604051901515815260200160405180910390f35b341561024057600080fd5b6101ed610731565b341561025357600080fd5b610221600160a060020a0360043581169060243516604435610737565b341561027b57600080fd5b6102836107ae565b60405160ff909116815260200160405180910390f35b61014e61042c565b34156102ac57600080fd5b61014e6107b7565b34156102bf57600080fd5b6101ed600160a060020a0360043516610836565b34156102de57600080fd5b6102e6610848565b604051600160a060020a03909116815260200160405180910390f35b341561030d57600080fd5b610163610857565b341561032057600080fd5b6102e66108c2565b341561033357600080fd5b610347600160a060020a03600435166108d1565b60405163ffffffff909116815260200160405180910390f35b341561036b57600080fd5b610221600160a060020a03600435166024356108e9565b341561038d57600080fd5b6101ed6108ff565b34156103a057600080fd5b6101ed610905565b34156103b357600080fd5b6101ed61090b565b34156103c657600080fd5b6101ed600160a060020a0360043581169060243516610911565b34156103eb57600080fd5b6102e661092e565b34156103fe57600080fd5b6101ed61093d565b341561041157600080fd5b6101ed610943565b341561042457600080fd5b610347610949565b600754421015801561044057506008544211155b151561044b57600080fd5b341561045657600080fd5b60095460007401000000000000000000000000000000000000000090910463ffffffff161180156104c35750600954600160a060020a0333166000908152600a602052604090205463ffffffff740100000000000000000000000000000000000000009092048216911610155b156104cd57600080fd5b6009546006546104e891600160a060020a031690339061096d565b33600160a060020a03166000818152600a602052604090819020805463ffffffff198116600163ffffffff9283160182161791829055600654911692917fcce6ff7d594e7067a58df51c8588740b7c8b42537da7262add9823085de82e4891905190815260200160405180910390a3565b6000600c54421015801561056f5750600d544211155b151561057a57600080fd5b600254600b54670de0b6b3a76400009160ff16600a0a34909102020490508015806105bf5750600e54600160a060020a03166000908152600460205260409020548190105b156105c957600080fd5b600e546105e090600160a060020a0316338361096d565b3433600160a060020a03167f4a987bc3d04b32db133ad9a3c7c0d8ecc441eb56f45a62b92c38384c095e7ac08360405190815260200160405180910390a350565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106b75780601f1061068c576101008083540402835291602001916106b7565b820191906000526020600020905b81548152906001019060200180831161069a57829003601f168201915b505050505081565b60065481565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035481565b600160a060020a0380841660009081526005602090815260408083203390941683529290529081205482111561076c57600080fd5b600160a060020a03808516600090815260056020908152604080832033909416835292905220805483900390556107a484848461096d565b5060019392505050565b60025460ff1681565b600f54600160a060020a0330811631911681156108fc0282604051600060405180830381858888f1935050505015156107ef57600080fd5b600f54600160a060020a039081169033167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405190815260200160405180910390a350565b60046020526000908152604090205481565b600954600160a060020a031681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106b75780601f1061068c576101008083540402835291602001916106b7565b600f54600160a060020a031681565b600a6020526000908152604090205463ffffffff1681565b60006108f633848461096d565b50600192915050565b60085481565b600b5481565b600d5481565b600560209081526000928352604080842090915290825290205481565b600e54600160a060020a031681565b600c5481565b60075481565b60095474010000000000000000000000000000000000000000900463ffffffff1681565b6000600160a060020a038316151561098457600080fd5b600160a060020a038416600090815260046020526040902054829010156109aa57600080fd5b600160a060020a038316600090815260046020526040902054828101116109d057600080fd5b50600160a060020a038281166000908152600460205260408082208054938716835291208054848103825582548501928390559054920191018114610a1157fe5b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a3505050505600a165627a7a72305820f0579d757aa40ac1a85a28e4a0cb6476d2fa836503fd666e7b5104a5b59efaf20029

Swarm Source

bzzr://f0579d757aa40ac1a85a28e4a0cb6476d2fa836503fd666e7b5104a5b59efaf2
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.