ETH Price: $3,074.73 (-1.46%)
Gas: 2 Gwei

Token

P21 (P21)
 

Overview

Max Total Supply

100,000,000 P21

Holders

1

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

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:
P21

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2019-08-09
*/

pragma solidity 0.4.19;

contract Token {

    /// @return total amount of tokens
    function totalSupply() constant returns (uint supply) {}

    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
    function balanceOf(address _owner) constant returns (uint balance) {}

    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint _value) returns (bool success) {}

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint _value) returns (bool success) {}

    /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _value The amount of wei to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(address _spender, uint _value) returns (bool success) {}

    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) constant returns (uint remaining) {}

    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);
}

contract RegularToken is Token {

    function transfer(address _to, uint _value) returns (bool) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }

    function transferFrom(address _from, address _to, uint _value) returns (bool) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }

    function balanceOf(address _owner) constant returns (uint) {
        return balances[_owner];
    }

    function approve(address _spender, uint _value) returns (bool) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) constant returns (uint) {
        return allowed[_owner][_spender];
    }

    mapping (address => uint) balances;
    mapping (address => mapping (address => uint)) allowed;
    uint public totalSupply;
}

contract UnboundedRegularToken is RegularToken {

    uint constant MAX_UINT = 2**256 - 1;
    
    /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount.
    /// @param _from Address to transfer from.
    /// @param _to Address to transfer to.
    /// @param _value Amount to transfer.
    /// @return Success of transfer.
    function transferFrom(address _from, address _to, uint _value)
        public
        returns (bool)
    {
        uint allowance = allowed[_from][msg.sender];
        if (balances[_from] >= _value
            && allowance >= _value
            && balances[_to] + _value >= balances[_to]
        ) {
            balances[_to] += _value;
            balances[_from] -= _value;
            if (allowance < MAX_UINT) {
                allowed[_from][msg.sender] -= _value;
            }
            Transfer(_from, _to, _value);
            return true;
        } else {
            return false;
        }
    }
}

contract P21 is UnboundedRegularToken {

    uint public totalSupply = 1*10**26;
    uint8 constant public decimals = 18;
    string constant public name = "P21";
    string constant public symbol = "P21";

    function P21() {
        balances[msg.sender] = totalSupply;
        Transfer(address(0), msg.sender, totalSupply);
    }
}

Contract Security Audit

Contract ABI

[{"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":true,"inputs":[{"name":"_owner","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":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"}]

60606040526a52b7d2dcc80cd2e4000000600355341561001e57600080fd5b600354600160a060020a033316600081815260208190526040808220849055919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91905190815260200160405180910390a3610547806100826000396000f3006060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461009d578063095ea7b31461012757806318160ddd1461015d57806323b872dd14610182578063313ce567146101aa57806370a08231146101d357806395d89b411461009d578063a9059cbb146101f2578063dd62ed3e14610214575b600080fd5b34156100a857600080fd5b6100b0610239565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100ec5780820151838201526020016100d4565b50505050905090810190601f1680156101195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013257600080fd5b610149600160a060020a0360043516602435610270565b604051901515815260200160405180910390f35b341561016857600080fd5b6101706102dd565b60405190815260200160405180910390f35b341561018d57600080fd5b610149600160a060020a03600435811690602435166044356102e3565b34156101b557600080fd5b6101bd610413565b60405160ff909116815260200160405180910390f35b34156101de57600080fd5b610170600160a060020a0360043516610418565b34156101fd57600080fd5b610149600160a060020a0360043516602435610433565b341561021f57600080fd5b610170600160a060020a03600435811690602435166104f0565b60408051908101604052600381527f5032310000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60035481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906103265750828110155b801561034c5750600160a060020a03841660009081526020819052604090205483810110155b1561040657600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156103b657600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405190815260200160405180910390a36001915061040b565b600091505b509392505050565b601281565b600160a060020a031660009081526020819052604090205490565b600160a060020a0333166000908152602081905260408120548290108015906104765750600160a060020a03831660009081526020819052604090205482810110155b156104e857600160a060020a033381166000818152602081905260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060016102d7565b5060006102d7565b600160a060020a039182166000908152600160209081526040808320939094168252919091522054905600a165627a7a72305820cbc84b9ebb2bdd11a3751312026b57998915651d0a758f8b29c70bc7ea7289b20029

Deployed Bytecode

0x6060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461009d578063095ea7b31461012757806318160ddd1461015d57806323b872dd14610182578063313ce567146101aa57806370a08231146101d357806395d89b411461009d578063a9059cbb146101f2578063dd62ed3e14610214575b600080fd5b34156100a857600080fd5b6100b0610239565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100ec5780820151838201526020016100d4565b50505050905090810190601f1680156101195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013257600080fd5b610149600160a060020a0360043516602435610270565b604051901515815260200160405180910390f35b341561016857600080fd5b6101706102dd565b60405190815260200160405180910390f35b341561018d57600080fd5b610149600160a060020a03600435811690602435166044356102e3565b34156101b557600080fd5b6101bd610413565b60405160ff909116815260200160405180910390f35b34156101de57600080fd5b610170600160a060020a0360043516610418565b34156101fd57600080fd5b610149600160a060020a0360043516602435610433565b341561021f57600080fd5b610170600160a060020a03600435811690602435166104f0565b60408051908101604052600381527f5032310000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60035481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906103265750828110155b801561034c5750600160a060020a03841660009081526020819052604090205483810110155b1561040657600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156103b657600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405190815260200160405180910390a36001915061040b565b600091505b509392505050565b601281565b600160a060020a031660009081526020819052604090205490565b600160a060020a0333166000908152602081905260408120548290108015906104765750600160a060020a03831660009081526020819052604090205482810110155b156104e857600160a060020a033381166000818152602081905260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060016102d7565b5060006102d7565b600160a060020a039182166000908152600160209081526040808320939094168252919091522054905600a165627a7a72305820cbc84b9ebb2bdd11a3751312026b57998915651d0a758f8b29c70bc7ea7289b20029

Deployed Bytecode Sourcemap

4407:345:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4537:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2917:191:0;;;;;;;;;;-1:-1:-1;;;;;2917:191:0;;;;;;;;;;;;;;;;;;;;;;;;4454:34;;;;;;;;;;;;;;;;;;;;;;;;;;;3772:628;;;;;;;;;;-1:-1:-1;;;;;3772:628:0;;;;;;;;;;;;4495:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2808:101;;;;;;;;;;-1:-1:-1;;;;;2808:101:0;;;;;1931:418;;;;;;;;;;-1:-1:-1;;;;;1931:418:0;;;;;;;3116:128;;;;;;;;;;-1:-1:-1;;;;;3116:128:0;;;;;;;;;;4537:35;;;;;;;;;;;;;;;;;;:::o;2917:191::-;-1:-1:-1;;;;;2999:10:0;2991:19;;2974:4;2991:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;2974:4;;2991:29;:19;3040:38;;3023:6;;3040:38;;;;;;;;;;;;;-1:-1:-1;3096:4:0;2917:191;;;;;:::o;4454:34::-;;;;:::o;3772:628::-;-1:-1:-1;;;;;3908:14:0;;;3869:4;3908:14;;;:7;:14;;;;;;;;3923:10;3908:26;;;;;;;;;;;;3949:15;;;;;;;;;;:25;;;;;;:61;;;4004:6;3991:9;:19;;3949:61;:117;;;;-1:-1:-1;;;;;;4053:13:0;;:8;:13;;;;;;;;;;;4027:22;;;:39;;3949:117;3945:448;;;-1:-1:-1;;;;;4093:13:0;;;:8;:13;;;;;;;;;;;:23;;;;;;4131:15;;;;;;:25;;;;;;;-1:-1:-1;;4175:20:0;;4171:97;;;-1:-1:-1;;;;;4216:14:0;;;;;;;:7;:14;;;;;;;;4231:10;4216:26;;;;;;;;;:36;;;;;;;4171:97;4298:3;-1:-1:-1;;;;;4282:28:0;4291:5;-1:-1:-1;;;;;4282:28:0;;4303:6;4282:28;;;;;;;;;;;;;;4332:4;4325:11;;;;3945:448;4376:5;4369:12;;3945:448;3772:628;;;;;;:::o;4495:35::-;4528:2;4495:35;:::o;2808:101::-;-1:-1:-1;;;;;2885:16:0;2861:4;2885:16;;;;;;;;;;;;2808:101::o;1931:418::-;-1:-1:-1;;;;;2084:10:0;2075:20;1984:4;2075:20;;;;;;;;;;;:30;;;;;;:73;;-1:-1:-1;;;;;;2135:13:0;;:8;:13;;;;;;;;;;;2109:22;;;:39;;2075:73;2071:271;;;-1:-1:-1;;;;;2174:10:0;2165:20;;:8;:20;;;;;;;;;;;:30;;;;;;;2210:13;;;;;;;;;;:23;;;;;;:13;2248:33;;2189:6;;2248:33;;;;;;;;;;;;;-1:-1:-1;2303:4:0;2296:11;;2071:271;-1:-1:-1;2334:5:0;2327:12;;3116:128;-1:-1:-1;;;;;3211:15:0;;;3187:4;3211:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;3116:128::o

Swarm Source

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