Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xf9031d1f5EEB1cb71db69eCAb611C928EDeA6Ba0
Balance 0 ETH
Nonce 1
Code Size 5890 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

5890 bytes
0x608060405234801561000f575f80fd5b50600436106100e8575f3560e01c8063715018a61161008a578063a457c2d711610064578063a457c2d71461024c578063a9059cbb1461027c578063dd62ed3e146102ac578063f2fde38b146102dc576100e8565b8063715018a6146102065780638da5cb5b1461021057806395d89b411461022e576100e8565b806323b872dd116100c657806323b872dd14610158578063313ce5671461018857806339509351146101a657806370a08231146101d6576100e8565b806306fdde03146100ec578063095ea7b31461010a57806318160ddd1461013a575b5f80fd5b6100f46102f8565b6040516101019190610ed8565b60405180910390f35b610124600480360381019061011f9190610f89565b610388565b6040516101319190610fe1565b60405180910390f35b6101426103a5565b60405161014f9190611009565b60405180910390f35b610172600480360381019061016d9190611022565b6103ae565b60405161017f9190610fe1565b60405180910390f35b6101906104a0565b60405161019d919061108d565b60405180910390f35b6101c060048036038101906101bb9190610f89565b6104b5565b6040516101cd9190610fe1565b60405180910390f35b6101f060048036038101906101eb91906110a6565b61055c565b6040516101fd9190611009565b60405180910390f35b61020e6105a2565b005b610218610629565b60405161022591906110e0565b60405180910390f35b610236610650565b6040516102439190610ed8565b60405180910390f35b61026660048036038101906102619190610f89565b6106e0565b6040516102739190610fe1565b60405180910390f35b61029660048036038101906102919190610f89565b6107c6565b6040516102a39190610fe1565b60405180910390f35b6102c660048036038101906102c191906110f9565b6107e3565b6040516102d39190611009565b60405180910390f35b6102f660048036038101906102f191906110a6565b610865565b005b60606004805461030790611164565b80601f016020809104026020016040519081016040528092919081815260200182805461033390611164565b801561037e5780601f106103555761010080835404028352916020019161037e565b820191905f5260205f20905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b5f61039b61039461095b565b8484610962565b6001905092915050565b5f600354905090565b5f6103ba848484610b25565b5f60025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f61040161095b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610480576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047790611204565b60405180910390fd5b6104948561048c61095b565b858403610962565b60019150509392505050565b5f60065f9054906101000a900460ff16905090565b5f6105526104c161095b565b848460025f6104ce61095b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461054d919061124f565b610962565b6001905092915050565b5f60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6105aa61095b565b73ffffffffffffffffffffffffffffffffffffffff166105c8610629565b73ffffffffffffffffffffffffffffffffffffffff161461061e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610615906112cc565b60405180910390fd5b6106275f610d9d565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606005805461065f90611164565b80601f016020809104026020016040519081016040528092919081815260200182805461068b90611164565b80156106d65780601f106106ad576101008083540402835291602001916106d6565b820191905f5260205f20905b8154815290600101906020018083116106b957829003601f168201915b5050505050905090565b5f8060025f6106ed61095b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050828110156107a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079e9061135a565b60405180910390fd5b6107bb6107b261095b565b85858403610962565b600191505092915050565b5f6107d96107d261095b565b8484610b25565b6001905092915050565b5f60025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b61086d61095b565b73ffffffffffffffffffffffffffffffffffffffff1661088b610629565b73ffffffffffffffffffffffffffffffffffffffff16146108e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d8906112cc565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361094f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610946906113e8565b60405180910390fd5b61095881610d9d565b50565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036109d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c790611476565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610a3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3590611504565b60405180910390fd5b8060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610b189190611009565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8a90611592565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf890611620565b60405180910390fd5b610c0c838383610e5e565b5f60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c87906116ae565b60405180910390fd5b81810360015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610d20919061124f565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d849190611009565b60405180910390a3610d97848484610e63565b50505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610eaa82610e68565b610eb48185610e72565b9350610ec4818560208601610e82565b610ecd81610e90565b840191505092915050565b5f6020820190508181035f830152610ef08184610ea0565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610f2582610efc565b9050919050565b610f3581610f1b565b8114610f3f575f80fd5b50565b5f81359050610f5081610f2c565b92915050565b5f819050919050565b610f6881610f56565b8114610f72575f80fd5b50565b5f81359050610f8381610f5f565b92915050565b5f8060408385031215610f9f57610f9e610ef8565b5b5f610fac85828601610f42565b9250506020610fbd85828601610f75565b9150509250929050565b5f8115159050919050565b610fdb81610fc7565b82525050565b5f602082019050610ff45f830184610fd2565b92915050565b61100381610f56565b82525050565b5f60208201905061101c5f830184610ffa565b92915050565b5f805f6060848603121561103957611038610ef8565b5b5f61104686828701610f42565b935050602061105786828701610f42565b925050604061106886828701610f75565b9150509250925092565b5f60ff82169050919050565b61108781611072565b82525050565b5f6020820190506110a05f83018461107e565b92915050565b5f602082840312156110bb576110ba610ef8565b5b5f6110c884828501610f42565b91505092915050565b6110da81610f1b565b82525050565b5f6020820190506110f35f8301846110d1565b92915050565b5f806040838503121561110f5761110e610ef8565b5b5f61111c85828601610f42565b925050602061112d85828601610f42565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061117b57607f821691505b60208210810361118e5761118d611137565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f6111ee602883610e72565b91506111f982611194565b604082019050919050565b5f6020820190508181035f83015261121b816111e2565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61125982610f56565b915061126483610f56565b925082820190508082111561127c5761127b611222565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6112b6602083610e72565b91506112c182611282565b602082019050919050565b5f6020820190508181035f8301526112e3816112aa565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611344602583610e72565b915061134f826112ea565b604082019050919050565b5f6020820190508181035f83015261137181611338565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6113d2602683610e72565b91506113dd82611378565b604082019050919050565b5f6020820190508181035f8301526113ff816113c6565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f611460602483610e72565b915061146b82611406565b604082019050919050565b5f6020820190508181035f83015261148d81611454565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6114ee602283610e72565b91506114f982611494565b604082019050919050565b5f6020820190508181035f83015261151b816114e2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f61157c602583610e72565b915061158782611522565b604082019050919050565b5f6020820190508181035f8301526115a981611570565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61160a602383610e72565b9150611615826115b0565b604082019050919050565b5f6020820190508181035f830152611637816115fe565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611698602683610e72565b91506116a38261163e565b604082019050919050565b5f6020820190508181035f8301526116c58161168c565b905091905056fea264697066735822122084320da78ac3e66fab78bf5d3c4087c1bddf9d4d9817d7214ae45a9dff70320e64736f6c634300081a0033

Verified Source Code Partial Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: No
SimpleERC20Token.sol 311 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/*

     $$$$$$\  $$\                      $$$$$$\        $$$$$$$$\                  $$\           
    $$  __$$\ $$ |                    $$  __$$\       \__$$  __|                 $$ |          
    $$ /  \__|$$ | $$$$$$\   $$$$$$\  $$ /  \__|         $$ | $$$$$$\   $$$$$$\  $$ | $$$$$$$\ 
    \$$$$$$\  $$ |$$  __$$\ $$  __$$\ $$$$\              $$ |$$  __$$\ $$  __$$\ $$ |$$  _____|
     \____$$\ $$ |$$$$$$$$ |$$ |  \__|$$  _|             $$ |$$ /  $$ |$$ /  $$ |$$ |\$$$$$$\  
    $$\   $$ |$$ |$$   ____|$$ |      $$ |               $$ |$$ |  $$ |$$ |  $$ |$$ | \____$$\ 
    \$$$$$$  |$$ |\$$$$$$$\ $$ |      $$ |               $$ |\$$$$$$  |\$$$$$$  |$$ |$$$$$$$  |
     \______/ \__| \_______|\__|      \__|               \__| \______/  \______/ \__|\_______/ 
                                                                                                                                                                                 
*/

// @author Slerf Tools

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function transfer(
        address recipient,
        uint256 amount
    ) external returns (bool);

    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

interface IERC20Metadata is IERC20 {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);
}

abstract contract Ownable is Context {
    address private _owner;

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

    constructor() {
        _transferOwnership(_msgSender());
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals; // Added private variable for decimals

    constructor(string memory name_, string memory symbol_, uint8 decimals_) {
        _name = name_;
        _symbol = symbol_;
        _decimals = decimals_; // Initialize decimals
    }

    function name() public view virtual override returns (string memory) {
        return _name;
    }

    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    function decimals() public view virtual override returns (uint8) {
        return _decimals; // Return the decimals value
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(
        address account
    ) public view virtual override returns (uint256) {
        return _balances[account];
    }

    function transfer(
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(
        address owner,
        address spender
    ) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(
        address spender,
        uint256 amount
    ) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(
            currentAllowance >= amount,
            "ERC20: transfer amount exceeds allowance"
        );
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    function increaseAllowance(
        address spender,
        uint256 addedValue
    ) public virtual returns (bool) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender] + addedValue
        );
        return true;
    }

    function decreaseAllowance(
        address spender,
        uint256 subtractedValue
    ) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(
            currentAllowance >= subtractedValue,
            "ERC20: decreased allowance below zero"
        );
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    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);

        uint256 senderBalance = _balances[sender];
        require(
            senderBalance >= amount,
            "ERC20: transfer amount exceeds balance"
        );
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    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);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// SimpleERC20Token contract that handles token creation with decimals
contract SimpleERC20Token is ERC20 {
    constructor(
        string memory name,
        string memory symbol,
        uint8 decimals_,
        uint256 initialSupply,
        address tokenOwner
    ) ERC20(name, symbol, decimals_) {
        _mint(tokenOwner, initialSupply * (10 ** uint256(decimals_)));
        // transferOwnership(tokenOwner);

        renounceOwnership();
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 7 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address