Contract 0x4aaad871293c4581edb580e99fb6613b0a3bc488

Balance:0 ELLA

Recent Transactions  Show All Transactions

Transactions related to this account in the last 24 hours.

HashBlockTypeFromToAmount

Code

0x6060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146101ef578063095ea7b31461027957806318160ddd146102af57806323b872dd146102d4578063313ce567146102fc5780633eaaf86b1461032557806370a082311461033857806391cca3db1461035757806395d89b4114610386578063a9059cbb14610399578063cae9ca51146103bb578063dc1fb5a514610420578063dd62ed3e14610433575b60008060003411156101eb5760023404915050348190037301ff0ffd25b64de2217744fd7d4dc4aa3cabcee782156108fc0283604051600060405180830381858888f19350505050151561011757600080fd5b73e9c2d958e6234c862b4afbd75b2fd241e955630381156108fc0282604051600060405180830381858888f19350505050151561015357600080fd5b600160a060020a03331660009081526004602052604090205461017c903463ffffffff61045816565b600160a060020a0333166000908152600460205260409020556003546101a8903463ffffffff61045816565b600355600160a060020a03331660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef3460405190815260200160405180910390a35b5050005b34156101fa57600080fd5b61020261046e565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561023e578082015183820152602001610226565b50505050905090810190601f16801561026b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561028457600080fd5b61029b600160a060020a036004351660243561050c565b604051901515815260200160405180910390f35b34156102ba57600080fd5b6102c2610578565b60405190815260200160405180910390f35b34156102df57600080fd5b61029b600160a060020a03600435811690602435166044356105aa565b341561030757600080fd5b61030f6106bd565b60405160ff909116815260200160405180910390f35b341561033057600080fd5b6102c26106c6565b341561034357600080fd5b6102c2600160a060020a03600435166106cc565b341561036257600080fd5b61036a6106e7565b604051600160a060020a03909116815260200160405180910390f35b341561039157600080fd5b6102026106ff565b34156103a457600080fd5b61029b600160a060020a036004351660243561076a565b34156103c657600080fd5b61029b60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061082995505050505050565b341561042b57600080fd5b61036a6109a9565b341561043e57600080fd5b6102c2600160a060020a03600435811690602435166109c1565b8181018281101561046857600080fd5b92915050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105045780601f106104d957610100808354040283529160200191610504565b820191906000526020600020905b8154815290600101906020018083116104e757829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b6000805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec546003540390565b600160a060020a0383166000908152600460205260408120546105d3908363ffffffff6109ec16565b600160a060020a0380861660009081526004602090815260408083209490945560058152838220339093168252919091522054610616908363ffffffff6109ec16565b600160a060020a038086166000908152600560209081526040808320338516845282528083209490945591861681526004909152205461065c908363ffffffff61045816565b600160a060020a03808516600081815260046020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60025460ff1681565b60035481565b600160a060020a031660009081526004602052604090205490565b73e9c2d958e6234c862b4afbd75b2fd241e955630381565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105045780601f106104d957610100808354040283529160200191610504565b600160a060020a033316600090815260046020526040812054610793908363ffffffff6109ec16565b600160a060020a0333811660009081526004602052604080822093909355908516815220546107c8908363ffffffff61045816565b600160a060020a0380851660008181526004602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03338116600081815260056020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a0316638f4ffcb1338530866040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561093d578082015183820152602001610925565b50505050905090810190601f16801561096a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561098b57600080fd5b6102c65a03f1151561099c57600080fd5b5060019695505050505050565b7301ff0ffd25b64de2217744fd7d4dc4aa3cabcee781565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b6000828211156109fb57600080fd5b509003905600a165627a7a7230582008da084808fa6e8018a6b428a7676263e8edac59cacf78c3a511abc213fde4760029

Source

pragma solidity ^0.4.19;

// ----------------------------------------------------------------------------
// 'DONATE 'Ellaism Donation Token' token contract
//
// Symbol      : DONATE
// Name        : Ellaism Donation Token
// Decimals    : 18
//
// Enjoy.
//
// (c) BokkyPooBah / Bok Consulting Pty Ltd 2017. The MIT Licence.
// ----------------------------------------------------------------------------


// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
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;
    }
}


// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
    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 function to receive approval and execute function in one call
//
// Borrowed from MiniMeToken
// ----------------------------------------------------------------------------
contract ApproveAndCallFallBack {
    function receiveApproval(address from, uint256 tokens, address token, bytes data) public;
}

// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ----------------------------------------------------------------------------
contract DonateToken is ERC20Interface {
    using SafeMath for uint;

    address constant public dev = 0xe9C2d958E6234c862b4AfBD75b2fd241E9556303;
    address constant public community = 0x01ff0FFd25B64dE2217744fd7d4dc4aA3cAbceE7;
    
    string public symbol;
    string public name;
    uint8 public decimals;
    uint public _totalSupply;

    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowed;

    // ------------------------------------------------------------------------
    // Constructor
    // ------------------------------------------------------------------------
    function DonateToken() public {
        symbol = "DONATE";
        name = "Ellaism Donation Token";
        decimals = 18;
        _totalSupply = 0;
    }


    // ------------------------------------------------------------------------
    // Total supply
    // ------------------------------------------------------------------------
    function totalSupply() public constant returns (uint) {
        return _totalSupply  - balances[address(0)];
    }


    // ------------------------------------------------------------------------
    // Get the token balance for account `tokenOwner`
    // ------------------------------------------------------------------------
    function balanceOf(address tokenOwner) public constant returns (uint balance) {
        return balances[tokenOwner];
    }


    // ------------------------------------------------------------------------
    // Transfer the balance from token owner's account to `to` account
    // - Owner's account must have sufficient balance to transfer
    // - 0 value transfers are allowed
    // ------------------------------------------------------------------------
    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;
    }


    // ------------------------------------------------------------------------
    // Token owner can approve for `spender` to transferFrom(...) `tokens`
    // from the token owner's account
    //
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
    // recommends that there are no checks for the approval double-spend attack
    // as this should be implemented in user interfaces
    // ------------------------------------------------------------------------
    function approve(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        Approval(msg.sender, spender, tokens);
        return true;
    }


    // ------------------------------------------------------------------------
    // Transfer `tokens` from the `from` account to the `to` account
    //
    // The calling account must already have sufficient tokens approve(...)-d
    // for spending from the `from` account and
    // - From account must have sufficient balance to transfer
    // - Spender must have sufficient allowance to transfer
    // - 0 value transfers are allowed
    // ------------------------------------------------------------------------
    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;
    }


    // ------------------------------------------------------------------------
    // Returns the amount of tokens approved by the owner that can be
    // transferred to the spender's account
    // ------------------------------------------------------------------------
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
        return allowed[tokenOwner][spender];
    }


    // ------------------------------------------------------------------------
    // Token owner can approve for `spender` to transferFrom(...) `tokens`
    // from the token owner's account. The `spender` contract function
    // `receiveApproval(...)` is then executed
    // ------------------------------------------------------------------------
    function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        Approval(msg.sender, spender, tokens);
        ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
        return true;
    }


    // ------------------------------------------------------------------------
    // Mint tokens on donations.
    // ------------------------------------------------------------------------
    function () public payable {
        if (msg.value > 0) {
            uint toCommunity = msg.value / 2;
            uint toDev = msg.value - toCommunity;
            
            community.transfer(toCommunity);
            dev.transfer(toDev);
            
            balances[msg.sender] = balances[msg.sender].add(msg.value);
            _totalSupply = _totalSupply.add(msg.value);
            Transfer(address(0), msg.sender, msg.value);
        }
    }
}

ABI

[{"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":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":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dev","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":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":"tokens","type":"uint256"},{"name":"data","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"community","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","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"},{"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":"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"}]

Constructor

Current contract state

FunctionResult
nameEllaism Donation Token
totalSupply45010000000000000000
decimals18
_totalSupply45010000000000000000
dev0xe9c2d958e6234c862b4afbd75b2fd241e9556303
symbolDONATE
community0x01ff0ffd25b64de2217744fd7d4dc4aa3cabcee7