Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x07a0AD7a9dfc3854466F8F29A173bf04bbA5686e
Balance 0 ETH
Nonce 1
Code Size 9198 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

9198 bytes
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610362578063bccb440814610392578063cf309012146103ae578063dd62ed3e146103cc578063f2fde38b146103fc578063f83d08ba1461041857610137565b806370a08231146102be57806379cc6790146102ee57806395d89b411461030a578063a457c2d714610328578063a69df4b51461035857610137565b8063313ce567116100ff578063313ce56714610208578063395093511461022657806340c10f191461025657806342966c6814610272578063559f05dc1461028e57610137565b806306fdde031461013c578063095ea7b31461015a57806318160ddd1461018a5780631f11b177146101a857806323b872dd146101d8575b600080fd5b610144610422565b6040516101519190611f33565b60405180910390f35b610174600480360381019061016f9190611aa9565b6104b4565b6040516101819190611f18565b60405180910390f35b610192610510565b60405161019f91906120b5565b60405180910390f35b6101c260048036038101906101bd91906119b9565b61051a565b6040516101cf9190611f18565b60405180910390f35b6101f260048036038101906101ed9190611a1e565b61053a565b6040516101ff9190611f18565b60405180910390f35b610210610598565b60405161021d91906120d0565b60405180910390f35b610240600480360381019061023b9190611aa9565b6105af565b60405161024d9190611f18565b60405180910390f35b610270600480360381019061026b9190611aa9565b61060b565b005b61028c60048036038101906102879190611ae5565b6106a7565b005b6102a860048036038101906102a391906119b9565b6106bb565b6040516102b59190611f18565b60405180910390f35b6102d860048036038101906102d391906119b9565b610729565b6040516102e591906120b5565b60405180910390f35b61030860048036038101906103039190611aa9565b610772565b005b6103126107d4565b60405161031f9190611f33565b60405180910390f35b610342600480360381019061033d9190611aa9565b610866565b60405161034f9190611f18565b60405180910390f35b6103606108c2565b005b61037c60048036038101906103779190611aa9565b61096d565b6040516103899190611f18565b60405180910390f35b6103ac60048036038101906103a79190611a6d565b6109c9565b005b6103b6610b22565b6040516103c39190611f18565b60405180910390f35b6103e660048036038101906103e191906119e2565b610b35565b6040516103f391906120b5565b60405180910390f35b610416600480360381019061041191906119b9565b610bbc565b005b610420610d77565b005b60606004805461043190612219565b80601f016020809104026020016040519081016040528092919081815260200182805461045d90612219565b80156104aa5780601f1061047f576101008083540402835291602001916104aa565b820191906000526020600020905b81548152906001019060200180831161048d57829003601f168201915b5050505050905090565b60006104bf336106bb565b6104fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f590611fd5565b60405180910390fd5b6105088383610e80565b905092915050565b6000600354905090565b60076020528060005260406000206000915054906101000a900460ff1681565b6000610545336106bb565b610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057b90611fd5565b60405180910390fd5b61058f848484610e9e565b90509392505050565b6000600660009054906101000a900460ff16905090565b60006105ba336106bb565b6105f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f090611fd5565b60405180910390fd5b6106038383610f77565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610699576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069090611ff5565b60405180910390fd5b6106a3828261102a565b5050565b6106b86106b26111c0565b826111c8565b50565b6000600660019054906101000a900460ff1615806107225750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b9050919050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006107b182604051806060016040528060248152602001612370602491396107a28661079d6111c0565b610b35565b6113789092919063ffffffff16565b90506107c5836107bf6111c0565b836113dc565b6107cf83836111c8565b505050565b6060600580546107e390612219565b80601f016020809104026020016040519081016040528092919081815260200182805461080f90612219565b801561085c5780601f106108315761010080835404028352916020019161085c565b820191906000526020600020905b81548152906001019060200180831161083f57829003601f168201915b5050505050905090565b6000610871336106bb565b6108b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a790611fd5565b60405180910390fd5b6108ba83836115a7565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610950576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094790611ff5565b60405180910390fd5b6000600660016101000a81548160ff021916908315150217905550565b6000610978336106bb565b6109b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ae90611fd5565b60405180910390fd5b6109c18383611674565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4e90611ff5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ac7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abe90612055565b60405180910390fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600660019054906101000a900460ff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4190611ff5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb190611f55565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfc90611ff5565b60405180910390fd5b6001600660016101000a81548160ff021916908315150217905550565b6000808284610e319190612107565b905083811015610e76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6d90611fb5565b60405180910390fd5b8091505092915050565b6000610e94610e8d6111c0565b84846113dc565b6001905092915050565b6000610eab848484611692565b610f6c84610eb76111c0565b610f678560405180606001604052806028815260200161234860289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610f1d6111c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113789092919063ffffffff16565b6113dc565b600190509392505050565b6000611020610f846111c0565b8461101b8560026000610f956111c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e2290919063ffffffff16565b6113dc565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109190612095565b60405180910390fd5b6110a66000838361192b565b6110bb81600354610e2290919063ffffffff16565b60038190555061111381600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e2290919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516111b491906120b5565b60405180910390a35050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611238576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122f90612015565b60405180910390fd5b6112448260008361192b565b6112b08160405180606001604052806022815260200161230060229139600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113789092919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113088160035461193090919063ffffffff16565b600381905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161136c91906120b5565b60405180910390a35050565b60008383111582906113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b79190611f33565b60405180910390fd5b50600083856113cf919061215d565b9050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561144c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144390612075565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b390611f95565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161159a91906120b5565b60405180910390a3505050565b600061166a6115b46111c0565b846116658560405180606001604052806025815260200161239460259139600260006115de6111c0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113789092919063ffffffff16565b6113dc565b6001905092915050565b60006116886116816111c0565b8484611692565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f990612035565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611772576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176990611f75565b60405180910390fd5b61177d83838361192b565b6117e98160405180606001604052806026815260200161232260269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113789092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061187e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e2290919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161191e91906120b5565b60405180910390a3505050565b505050565b600061197283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611378565b905092915050565b600081359050611989816122ba565b92915050565b60008135905061199e816122d1565b92915050565b6000813590506119b3816122e8565b92915050565b6000602082840312156119cb57600080fd5b60006119d98482850161197a565b91505092915050565b600080604083850312156119f557600080fd5b6000611a038582860161197a565b9250506020611a148582860161197a565b9150509250929050565b600080600060608486031215611a3357600080fd5b6000611a418682870161197a565b9350506020611a528682870161197a565b9250506040611a63868287016119a4565b9150509250925092565b60008060408385031215611a8057600080fd5b6000611a8e8582860161197a565b9250506020611a9f8582860161198f565b9150509250929050565b60008060408385031215611abc57600080fd5b6000611aca8582860161197a565b9250506020611adb858286016119a4565b9150509250929050565b600060208284031215611af757600080fd5b6000611b05848285016119a4565b91505092915050565b611b17816121a3565b82525050565b6000611b28826120eb565b611b3281856120f6565b9350611b428185602086016121e6565b611b4b816122a9565b840191505092915050565b6000611b636026836120f6565b91507f446f6e27742061737369676e206f776e65727368697020746f206e756c6c206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611bc96023836120f6565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c2f6022836120f6565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611c95601b836120f6565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000611cd56015836120f6565b91507f4c6f636b61626c65546f6b656e3a204c6f636b656400000000000000000000006000830152602082019050919050565b6000611d156020836120f6565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000611d556021836120f6565b91507f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008301527f73000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611dbb6025836120f6565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611e21601e836120f6565b91507f4c6f636b61626c65546f6b656e3a20496e76616c6964206164647265737300006000830152602082019050919050565b6000611e616024836120f6565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ec7601f836120f6565b91507f45524332303a206d696e7420746f20746865207a65726f2061646472657373006000830152602082019050919050565b611f03816121cf565b82525050565b611f12816121d9565b82525050565b6000602082019050611f2d6000830184611b0e565b92915050565b60006020820190508181036000830152611f4d8184611b1d565b905092915050565b60006020820190508181036000830152611f6e81611b56565b9050919050565b60006020820190508181036000830152611f8e81611bbc565b9050919050565b60006020820190508181036000830152611fae81611c22565b9050919050565b60006020820190508181036000830152611fce81611c88565b9050919050565b60006020820190508181036000830152611fee81611cc8565b9050919050565b6000602082019050818103600083015261200e81611d08565b9050919050565b6000602082019050818103600083015261202e81611d48565b9050919050565b6000602082019050818103600083015261204e81611dae565b9050919050565b6000602082019050818103600083015261206e81611e14565b9050919050565b6000602082019050818103600083015261208e81611e54565b9050919050565b600060208201905081810360008301526120ae81611eba565b9050919050565b60006020820190506120ca6000830184611efa565b92915050565b60006020820190506120e56000830184611f09565b92915050565b600081519050919050565b600082825260208201905092915050565b6000612112826121cf565b915061211d836121cf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156121525761215161224b565b5b828201905092915050565b6000612168826121cf565b9150612173836121cf565b9250828210156121865761218561224b565b5b828203905092915050565b600061219c826121af565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156122045780820151818401526020810190506121e9565b83811115612213576000848401525b50505050565b6000600282049050600182168061223157607f821691505b602082108114156122455761224461227a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b6122c381612191565b81146122ce57600080fd5b50565b6122da816121a3565b81146122e557600080fd5b50565b6122f1816121cf565b81146122fc57600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122031a325b073183d55de2a08b22545e34441e36ab07abb5f7a9f8e3d62c8b3223264736f6c63430008000033

Verified Source Code Full Match

Compiler: v0.8.0+commit.c7dfd78e EVM: istanbul Optimization: No
Ownable.sol 32 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

/// @title Ownable
/// @dev The Ownable contract has an owner address, and provides basic authorization control
/// functions, this simplifies the implementation of "user permissions".
contract Ownable {
    address _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @dev Set the original `_owner` of the contract to the sender account.
    constructor() {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /// @dev Throws if called by any account other than the owner.
    modifier onlyOwner() {
        require(msg.sender == _owner, "Ownable: caller is not the owner");
        _;
    }

    /// @dev Allows the current owner to transfer control of the contract to a newOwner.
    /// @param newOwner The address to transfer ownership to.
    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Don't assign ownership to null address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

}
SlmToken.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

import "./LockableToken.sol";

/// @title Solomon Token
/// @author Solomon DeFi
/// @notice Solomon ERC20 token (SLM)
contract SlmToken is LockableToken {
	
	constructor(
        string memory name,
        string memory symbol,
        uint256 initialSupply,
        address owner
    ) ERC20(name, symbol) {
        _mint(owner, initialSupply);
    }

    /// @notice Creates `amount` new tokens for `to`.
    /// @dev See {ERC20-_mint}.
    /// @param to The address that will receive tokens
    /// @param amount The number of tokens to mint
    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }
	
}
LockableToken.sol 82 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

import "./Ownable.sol";
import "./zeppelin/ERC20Burnable.sol";

/// @title Lockable token with exceptions
/// @dev Standard burnable ERC20 token modified with pausable transfers.
abstract contract LockableToken is Ownable, ERC20Burnable {

    /// Flag for locking normal trading
    bool public locked = true;

    /// Addresses exempted from token trade lock
    mapping(address => bool) public lockExceptions;

    constructor() {
        // It should always be possible to call reclaimToken
        lockExceptions[address(this)] = true;
    }

    /// @notice Admin function to lock trading
    function lock() external onlyOwner {
        locked = true;
    }

    /// @notice Admin function to unlock trading
    function unlock() external onlyOwner {
        locked = false;
    }

    /// @notice Set whether `sender` may trade when token is locked
    /// @param sender The address to change the lock exception for
    /// @param tradeAllowed Whether `sender` may trade
    function setTradeException(address sender, bool tradeAllowed) external onlyOwner {
        require(sender != address(0), "LockableToken: Invalid address");
        lockExceptions[sender] = tradeAllowed;
    }

    /// @notice Check if the token is currently tradable for `sender`
    /// @param sender The address attempting to make a transfer
    /// @return True if `sender` is allowed to make transfers, false otherwise
    function canTrade(address sender) public view returns(bool) {
        return !locked || lockExceptions[sender];
    }

    /// @dev Modifier to make a function callable only when the contract is not paused.
    modifier whenNotLocked() {
        require(canTrade(msg.sender), "LockableToken: Locked");
        _;
    }

    /// @notice ERC20 transfer only when token is unlocked
    function transfer(address recipient, uint256 amount)
                public override whenNotLocked returns (bool) {
        return super.transfer(recipient, amount);
    }

    /// @notice ERC20 transferFrom only when token is unlocked
    function transferFrom(address from, address to, uint256 value)
                public override whenNotLocked returns (bool) {
        return super.transferFrom(from, to, value);
    }

    /// @notice ERC20 approve only when token is unlocked
    function approve(address spender, uint256 value)
                public override whenNotLocked returns (bool) {
        return super.approve(spender, value);
    }

    /// @notice ERC20 increaseAllowance only when token is unlocked
    function increaseAllowance(address spender, uint256 addedValue)
                public override whenNotLocked returns (bool) {
        return super.increaseAllowance(spender, addedValue);
    }

    /// @notice ERC20 decreaseAllowance only when token is unlocked
    function decreaseAllowance(address spender, uint256 subtractedValue)
                public override whenNotLocked returns (bool) {
        return super.decreaseAllowance(spender, subtractedValue);
    }
}
ERC20.sol 305 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
IERC20.sol 76 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return payable(msg.sender);
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}
SafeMath.sol 158 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
ERC20Burnable.sol 41 lines
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.0;

import "./Context.sol";
import "./ERC20.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
canTrade 0x559f05dc → bool
decimals 0x313ce567 → uint8
lockExceptions 0x1f11b177 → bool
locked 0xcf309012 → bool
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 12 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 value
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
lock 0xf83d08ba
No parameters
mint 0x40c10f19
address to
uint256 amount
setTradeException 0xbccb4408
address sender
bool tradeAllowed
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unlock 0xa69df4b5
No parameters

Recent Transactions

No transactions found for this address