ETH Price: $3,387.64 (-1.66%)
Gas: 4 Gwei

Token

Citizen (Citizen)
 

Overview

Max Total Supply

1,500,000,000 Citizen

Holders

146

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
600,000 Citizen

Value
$0.00
0x74c160e7b7ff01e32277ffb8162dcde635a72061
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:
CitizenToken

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Multiple files format)

File 1 of 2: Citizen.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "./IERC20.sol";

contract CitizenToken is IERC20 {
    string public constant name = "Citizen";
    string public constant symbol = "Citizen";
    uint8 public constant decimals = 18;
    uint256 public override totalSupply = 1500000000 * 10**decimals;
    
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowances;
    
    constructor() {
        balances[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);
    }
    
    function balanceOf(address account) external view override returns(uint256 balance) {
        balance = balances[account];
    }
    
    function allowance(address account, address spender) external view override returns(uint256){
        return allowances[account][spender];
    }
    
    function transfer(address recipient, uint256 amount) external override returns(bool success) {
        require(amount > 0, "HLK: amount must be greater than 0");
        require(balances[msg.sender] >= amount, "HLK: Insufficient balance");
        
        balances[msg.sender] -= amount;
        balances[recipient] += amount;
        emit Transfer(msg.sender, recipient, amount);
        success = true;
    }
    
    function approve(address spender, uint256 amount) external override returns(bool success) {
        allowances[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        success = true;
    }
    
    function transferFrom(address sender, address recipient, uint256 amount) external override returns(bool success){
        require(amount > 0, "HLK: amount must be greater than 0");
        require(allowances[sender][msg.sender] >= amount, "HLK:Insufficient authorization");
        require(balances[sender] >= amount, "HLK:Insufficient balance");
        
        allowances[sender][msg.sender] -= amount;
        balances[sender] -= amount;
        balances[recipient] += amount;
        emit Transfer(sender, recipient, amount);
        success = true;
    }
}

File 2 of 2: IERC20.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

6080604052620000126012600a620000d2565b62000022906359682f00620001a0565b6000553480156200003257600080fd5b50600080543380835260016020526040808420839055519092917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916200007b91815260200190565b60405180910390a3620001d8565b600181815b80851115620000ca578160001904821115620000ae57620000ae620001c2565b80851615620000bc57918102915b93841c93908002906200008e565b509250929050565b6000620000e360ff841683620000ea565b9392505050565b600082620000fb575060016200019a565b816200010a575060006200019a565b81600181146200012357600281146200012e576200014e565b60019150506200019a565b60ff841115620001425762000142620001c2565b50506001821b6200019a565b5060208310610133831016604e8410600b841016171562000173575081810a6200019a565b6200017f838362000089565b8060001904821115620001965762000196620001c2565b0290505b92915050565b6000816000190483118215151615620001bd57620001bd620001c2565b500290565b634e487b7160e01b600052601160045260246000fd5b61070380620001e86000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce5671461012157806370a082311461013b57806395d89b4114610098578063a9059cbb14610164578063dd62ed3e1461017757600080fd5b806306fdde0314610098578063095ea7b3146100d457806318160ddd146100f757806323b872dd1461010e575b600080fd5b6100be6040518060400160405280600781526020016621b4ba34bd32b760c91b81525081565b6040516100cb91906105f1565b60405180910390f35b6100e76100e23660046105c7565b6101b0565b60405190151581526020016100cb565b61010060005481565b6040519081526020016100cb565b6100e761011c36600461058b565b61021c565b610129601281565b60405160ff90911681526020016100cb565b610100610149366004610536565b6001600160a01b031660009081526001602052604090205490565b6100e76101723660046105c7565b61040c565b610100610185366004610558565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061020b9086815260200190565b60405180910390a350600192915050565b60008082116102465760405162461bcd60e51b815260040161023d90610646565b60405180910390fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020548211156102b95760405162461bcd60e51b815260206004820152601e60248201527f484c4b3a496e73756666696369656e7420617574686f72697a6174696f6e0000604482015260640161023d565b6001600160a01b0384166000908152600160205260409020548211156103215760405162461bcd60e51b815260206004820152601860248201527f484c4b3a496e73756666696369656e742062616c616e63650000000000000000604482015260640161023d565b6001600160a01b0384166000908152600260209081526040808320338452909152812080548492906103549084906106a0565b90915550506001600160a01b038416600090815260016020526040812080548492906103819084906106a0565b90915550506001600160a01b038316600090815260016020526040812080548492906103ae908490610688565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103fa91815260200190565b60405180910390a35060019392505050565b600080821161042d5760405162461bcd60e51b815260040161023d90610646565b3360009081526001602052604090205482111561048c5760405162461bcd60e51b815260206004820152601960248201527f484c4b3a20496e73756666696369656e742062616c616e636500000000000000604482015260640161023d565b33600090815260016020526040812080548492906104ab9084906106a0565b90915550506001600160a01b038316600090815260016020526040812080548492906104d8908490610688565b90915550506040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161020b565b80356001600160a01b038116811461053157600080fd5b919050565b60006020828403121561054857600080fd5b6105518261051a565b9392505050565b6000806040838503121561056b57600080fd5b6105748361051a565b91506105826020840161051a565b90509250929050565b6000806000606084860312156105a057600080fd5b6105a98461051a565b92506105b76020850161051a565b9150604084013590509250925092565b600080604083850312156105da57600080fd5b6105e38361051a565b946020939093013593505050565b600060208083528351808285015260005b8181101561061e57858101830151858201604001528201610602565b81811115610630576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f484c4b3a20616d6f756e74206d7573742062652067726561746572207468616e604082015261020360f41b606082015260800190565b6000821982111561069b5761069b6106b7565b500190565b6000828210156106b2576106b26106b7565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fe550865665e93dcfe2e8efbb9e4fd0427fbb3977839004b7a6ab66094ecae9d64736f6c63430008060033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce5671461012157806370a082311461013b57806395d89b4114610098578063a9059cbb14610164578063dd62ed3e1461017757600080fd5b806306fdde0314610098578063095ea7b3146100d457806318160ddd146100f757806323b872dd1461010e575b600080fd5b6100be6040518060400160405280600781526020016621b4ba34bd32b760c91b81525081565b6040516100cb91906105f1565b60405180910390f35b6100e76100e23660046105c7565b6101b0565b60405190151581526020016100cb565b61010060005481565b6040519081526020016100cb565b6100e761011c36600461058b565b61021c565b610129601281565b60405160ff90911681526020016100cb565b610100610149366004610536565b6001600160a01b031660009081526001602052604090205490565b6100e76101723660046105c7565b61040c565b610100610185366004610558565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061020b9086815260200190565b60405180910390a350600192915050565b60008082116102465760405162461bcd60e51b815260040161023d90610646565b60405180910390fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020548211156102b95760405162461bcd60e51b815260206004820152601e60248201527f484c4b3a496e73756666696369656e7420617574686f72697a6174696f6e0000604482015260640161023d565b6001600160a01b0384166000908152600160205260409020548211156103215760405162461bcd60e51b815260206004820152601860248201527f484c4b3a496e73756666696369656e742062616c616e63650000000000000000604482015260640161023d565b6001600160a01b0384166000908152600260209081526040808320338452909152812080548492906103549084906106a0565b90915550506001600160a01b038416600090815260016020526040812080548492906103819084906106a0565b90915550506001600160a01b038316600090815260016020526040812080548492906103ae908490610688565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103fa91815260200190565b60405180910390a35060019392505050565b600080821161042d5760405162461bcd60e51b815260040161023d90610646565b3360009081526001602052604090205482111561048c5760405162461bcd60e51b815260206004820152601960248201527f484c4b3a20496e73756666696369656e742062616c616e636500000000000000604482015260640161023d565b33600090815260016020526040812080548492906104ab9084906106a0565b90915550506001600160a01b038316600090815260016020526040812080548492906104d8908490610688565b90915550506040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161020b565b80356001600160a01b038116811461053157600080fd5b919050565b60006020828403121561054857600080fd5b6105518261051a565b9392505050565b6000806040838503121561056b57600080fd5b6105748361051a565b91506105826020840161051a565b90509250929050565b6000806000606084860312156105a057600080fd5b6105a98461051a565b92506105b76020850161051a565b9150604084013590509250925092565b600080604083850312156105da57600080fd5b6105e38361051a565b946020939093013593505050565b600060208083528351808285015260005b8181101561061e57858101830151858201604001528201610602565b81811115610630576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f484c4b3a20616d6f756e74206d7573742062652067726561746572207468616e604082015261020360f41b606082015260800190565b6000821982111561069b5761069b6106b7565b500190565b6000828210156106b2576106b26106b7565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fe550865665e93dcfe2e8efbb9e4fd0427fbb3977839004b7a6ab66094ecae9d64736f6c63430008060033

Deployed Bytecode Sourcemap

85:2051:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;124:39;;;;;;;;;;;;;;;-1:-1:-1;;;124:39:0;;;;;;;;;;;;:::i;:::-;;;;;;;;1324:227;;;;;;:::i;:::-;;:::i;:::-;;;1405:14:2;;1398:22;1380:41;;1368:2;1353:18;1324:227:0;1335:92:2;260:63:0;;;;;;;;;3649:25:2;;;3637:2;3622:18;260:63:0;3604:76:2;1563:570:0;;;;;;:::i;:::-;;:::i;218:35::-;;251:2;218:35;;;;;3857:4:2;3845:17;;;3827:36;;3815:2;3800:18;218:35:0;3782:87:2;593:130:0;;;;;;:::i;:::-;-1:-1:-1;;;;;698:17:0;660:15;698:17;;;:8;:17;;;;;;;593:130;893:419;;;;;;:::i;:::-;;:::i;735:146::-;;;;;;:::i;:::-;-1:-1:-1;;;;;845:19:0;;;819:7;845:19;;;:10;:19;;;;;;;;:28;;;;;;;;;;;;;735:146;1324:227;1436:10;1400:12;1425:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;1425:31:0;;;;;;;;;;:40;;;1481:37;1400:12;;1425:31;;1481:37;;;;1459:6;3649:25:2;;3637:2;3622:18;;3604:76;1481:37:0;;;;;;;;-1:-1:-1;1539:4:0;;1324:227;-1:-1:-1;;1324:227:0:o;1563:570::-;1662:12;1703:1;1694:6;:10;1686:57;;;;-1:-1:-1;;;1686:57:0;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;1762:18:0;;;;;;:10;:18;;;;;;;;1781:10;1762:30;;;;;;;;:40;-1:-1:-1;1762:40:0;1754:83;;;;-1:-1:-1;;;1754:83:0;;2236:2:2;1754:83:0;;;2218:21:2;2275:2;2255:18;;;2248:30;2314:32;2294:18;;;2287:60;2364:18;;1754:83:0;2208:180:2;1754:83:0;-1:-1:-1;;;;;1856:16:0;;;;;;:8;:16;;;;;;:26;-1:-1:-1;1856:26:0;1848:63;;;;-1:-1:-1;;;1848:63:0;;2595:2:2;1848:63:0;;;2577:21:2;2634:2;2614:18;;;2607:30;2673:26;2653:18;;;2646:54;2717:18;;1848:63:0;2567:174:2;1848:63:0;-1:-1:-1;;;;;1932:18:0;;;;;;:10;:18;;;;;;;;1951:10;1932:30;;;;;;;:40;;1966:6;;1932:18;:40;;1966:6;;1932:40;:::i;:::-;;;;-1:-1:-1;;;;;;;1983:16:0;;;;;;:8;:16;;;;;:26;;2003:6;;1983:16;:26;;2003:6;;1983:26;:::i;:::-;;;;-1:-1:-1;;;;;;;2020:19:0;;;;;;:8;:19;;;;;:29;;2043:6;;2020:19;:29;;2043:6;;2020:29;:::i;:::-;;;;;;;;2082:9;-1:-1:-1;;;;;2065:35:0;2074:6;-1:-1:-1;;;;;2065:35:0;;2093:6;2065:35;;;;3649:25:2;;3637:2;3622:18;;3604:76;2065:35:0;;;;;;;;-1:-1:-1;2121:4:0;;1563:570;-1:-1:-1;;;1563:570:0:o;893:419::-;972:12;1014:1;1005:6;:10;997:57;;;;-1:-1:-1;;;997:57:0;;;;;;;:::i;:::-;1082:10;1073:20;;;;:8;:20;;;;;;:30;-1:-1:-1;1073:30:0;1065:68;;;;-1:-1:-1;;;1065:68:0;;2948:2:2;1065:68:0;;;2930:21:2;2987:2;2967:18;;;2960:30;3026:27;3006:18;;;2999:55;3071:18;;1065:68:0;2920:175:2;1065:68:0;1163:10;1154:20;;;;:8;:20;;;;;:30;;1178:6;;1154:20;:30;;1178:6;;1154:30;:::i;:::-;;;;-1:-1:-1;;;;;;;1195:19:0;;;;;;:8;:19;;;;;:29;;1218:6;;1195:19;:29;;1218:6;;1195:29;:::i;:::-;;;;-1:-1:-1;;1240:39:0;;3649:25:2;;;-1:-1:-1;;;;;1240:39:0;;;1249:10;;1240:39;;3637:2:2;3622:18;1240:39:0;3604:76:2;14:173;82:20;;-1:-1:-1;;;;;131:31:2;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;320:1;317;310:12;272:2;343:29;362:9;343:29;:::i;:::-;333:39;262:116;-1:-1:-1;;;262:116:2:o;383:260::-;451:6;459;512:2;500:9;491:7;487:23;483:32;480:2;;;528:1;525;518:12;480:2;551:29;570:9;551:29;:::i;:::-;541:39;;599:38;633:2;622:9;618:18;599:38;:::i;:::-;589:48;;470:173;;;;;:::o;648:328::-;725:6;733;741;794:2;782:9;773:7;769:23;765:32;762:2;;;810:1;807;800:12;762:2;833:29;852:9;833:29;:::i;:::-;823:39;;881:38;915:2;904:9;900:18;881:38;:::i;:::-;871:48;;966:2;955:9;951:18;938:32;928:42;;752:224;;;;;:::o;981:254::-;1049:6;1057;1110:2;1098:9;1089:7;1085:23;1081:32;1078:2;;;1126:1;1123;1116:12;1078:2;1149:29;1168:9;1149:29;:::i;:::-;1139:39;1225:2;1210:18;;;;1197:32;;-1:-1:-1;;;1068:167:2:o;1432:597::-;1544:4;1573:2;1602;1591:9;1584:21;1634:6;1628:13;1677:6;1672:2;1661:9;1657:18;1650:34;1702:1;1712:140;1726:6;1723:1;1720:13;1712:140;;;1821:14;;;1817:23;;1811:30;1787:17;;;1806:2;1783:26;1776:66;1741:10;;1712:140;;;1870:6;1867:1;1864:13;1861:2;;;1940:1;1935:2;1926:6;1915:9;1911:22;1907:31;1900:42;1861:2;-1:-1:-1;2013:2:2;1992:15;-1:-1:-1;;1988:29:2;1973:45;;;;2020:2;1969:54;;1553:476;-1:-1:-1;;;1553:476:2:o;3100:398::-;3302:2;3284:21;;;3341:2;3321:18;;;3314:30;3380:34;3375:2;3360:18;;3353:62;-1:-1:-1;;;3446:2:2;3431:18;;3424:32;3488:3;3473:19;;3274:224::o;3874:128::-;3914:3;3945:1;3941:6;3938:1;3935:13;3932:2;;;3951:18;;:::i;:::-;-1:-1:-1;3987:9:2;;3922:80::o;4007:125::-;4047:4;4075:1;4072;4069:8;4066:2;;;4080:18;;:::i;:::-;-1:-1:-1;4117:9:2;;4056:76::o;4137:127::-;4198:10;4193:3;4189:20;4186:1;4179:31;4229:4;4226:1;4219:15;4253:4;4250:1;4243:15

Swarm Source

ipfs://fe550865665e93dcfe2e8efbb9e4fd0427fbb3977839004b7a6ab66094ecae9d
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.