Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x7198Bf425540e50BB2fcf0e0060d61e058CbB363
Balance 0 ETH
Nonce 1
Code Size 4443 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

4443 bytes
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806395d89b41116100c3578063cb8a7a281161007c578063cb8a7a2814610336578063d54ad2a11461033e578063d89135cd14610347578063dd62ed3e14610350578063f01f20df14610363578063f05310661461036b57600080fd5b806395d89b411461028757806399118e1c1461028f578063a457c2d7146102f5578063a9059cbb14610308578063bd7ba9f91461031b578063bdaf152d1461032357600080fd5b8063395093511161011557806339509351146101f657806348c54b9d1461020957806370a082311461021357806373b2e80e1461023c5780637beaaf131461025f5780639358928b1461027f57600080fd5b806306fdde031461015d578063095ea7b31461017b578063172b33461461019e57806318160ddd146101cc57806323b872dd146101d4578063313ce567146101e7575b600080fd5b610165610374565b6040516101729190610f51565b60405180910390f35b61018e610189366004610fbb565b610406565b6040519015158152602001610172565b6101be6101ac366004610fe5565b600a6020526000908152604090205481565b604051908152602001610172565b6002546101be565b61018e6101e2366004611007565b610420565b60405160128152602001610172565b61018e610204366004610fbb565b610444565b610211610466565b005b6101be610221366004610fe5565b6001600160a01b031660009081526020819052604090205490565b61018e61024a366004610fe5565b60066020526000908152604090205460ff1681565b6101be61026d366004610fe5565b600b6020526000908152604090205481565b6101be610706565b610165610716565b6102d361029d366004610fe5565b6001600160a01b0316600090815260066020908152604080832054600854600754600a909452919093205460ff90931693909290565b6040805194151585526020850193909352918301526060820152608001610172565b61018e610303366004610fbb565b610725565b61018e610316366004610fbb565b6107a0565b6009546101be565b6101be610331366004610fe5565b6107ae565b6101be6107dc565b6101be60085481565b6101be60075481565b6101be61035e366004611043565b6107f6565b6101be610821565b6101be60095481565b60606003805461038390611076565b80601f01602080910402602001604051908101604052809291908181526020018280546103af90611076565b80156103fc5780601f106103d1576101008083540402835291602001916103fc565b820191906000526020600020905b8154815290600101906020018083116103df57829003601f168201915b5050505050905090565b60003361041481858561086a565b60019150505b92915050565b60003361042e85828561098f565b610439858585610a09565b506001949350505050565b60003361041481858561045783836107f6565b61046191906110c6565b61086a565b61046e610b6b565b64174876e8003a11156104c85760405162461bcd60e51b815260206004820152601a60248201527f43494e44523a204578636573736976652067617320707269636500000000000060448201526064015b60405180910390fd5b3360009081526006602052604090205460ff16156105215760405162461bcd60e51b815260206004820152601660248201527510d25391148e88105b1c9958591e4818db185a5b595960521b60448201526064016104bf565b69d3c21bcecceda100000068056bc75e2d6310000060085461054391906110c6565b11156105915760405162461bcd60e51b815260206004820152601960248201527f43494e44523a20537570706c792063617020726561636865640000000000000060448201526064016104bf565b60006127106105ab6101f468056bc75e2d631000006110d9565b6105b591906110f0565b905060006105cc8268056bc75e2d63100000611112565b90506105d83382610bc4565b68056bc75e2d63100000600860008282546105f391906110c6565b92505081905550816007600082825461060c91906110c6565b9091555050336000908152600a6020526040812083905560098054600192906106369084906110c6565b90915550503360008181526006602052604090819020805460ff19166001179055517f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b906106909084908690918252602082015260400190565b60405180910390a2306001600160a01b03167ffad31924d655455395c87544c8aa1ffdb5a7505a22a3c2e03f28003b6556a75f836040516106f091815260406020820181905260059082015264436c61696d60d81b606082015260800190565b60405180910390a250506107046001600555565b565b600061071160025490565b905090565b60606004805461038390611076565b6000338161073382866107f6565b9050838110156107935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104bf565b610439828686840361086a565b600033610414818585610a09565b6001600160a01b0381166000908152600b6020908152604080832054600a90925282205461041a91906110c6565b600060085469d3c21bcecceda10000006107119190611112565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60008061082d60025490565b905080156108615760075461084290826110c6565b61271060075461085291906110d9565b61085c91906110f0565b610864565b60005b91505090565b6001600160a01b0383166108cc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104bf565b6001600160a01b03821661092d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104bf565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061099b84846107f6565b90506000198114610a0357818110156109f65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104bf565b610a03848484840361086a565b50505050565b306001600160a01b03831603610a745760405162461bcd60e51b815260206004820152602a60248201527f43494e44523a2043616e6e6f74207472616e7366657220746f20636f6e7472616044820152696374206164647265737360b01b60648201526084016104bf565b6000612710610a856101f4846110d9565b610a8f91906110f0565b90506000610a9d8284611112565b9050610aaa858583610c83565b8115610b6457610aba8583610e27565b8160076000828254610acc91906110c6565b90915550506001600160a01b0385166000908152600b602052604081208054849290610af99084906110c6565b92505081905550846001600160a01b03167ffad31924d655455395c87544c8aa1ffdb5a7505a22a3c2e03f28003b6556a75f83604051610b5b918152604060208201819052600890820152672a3930b739b332b960c11b606082015260800190565b60405180910390a25b5050505050565b600260055403610bbd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104bf565b6002600555565b6001600160a01b038216610c1a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104bf565b8060026000828254610c2c91906110c6565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038316610ce75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104bf565b6001600160a01b038216610d495760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104bf565b6001600160a01b03831660009081526020819052604090205481811015610dc15760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104bf565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610a03565b6001600160a01b038216610e875760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104bf565b6001600160a01b03821660009081526020819052604090205481811015610efb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104bf565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610982565b600060208083528351808285015260005b81811015610f7e57858101830151858201604001528201610f62565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610fb657600080fd5b919050565b60008060408385031215610fce57600080fd5b610fd783610f9f565b946020939093013593505050565b600060208284031215610ff757600080fd5b61100082610f9f565b9392505050565b60008060006060848603121561101c57600080fd5b61102584610f9f565b925061103360208501610f9f565b9150604084013590509250925092565b6000806040838503121561105657600080fd5b61105f83610f9f565b915061106d60208401610f9f565b90509250929050565b600181811c9082168061108a57607f821691505b6020821081036110aa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561041a5761041a6110b0565b808202811582820484141761041a5761041a6110b0565b60008261110d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561041a5761041a6110b056fea26469706673582212201d6a555d209eb42265328df17e7751588e682fd2d74c3db5d57baf1155b5ee7264736f6c63430008140033

Verified Source Code Full Match

Compiler: v0.8.20+commit.a1b79de6 EVM: paris Optimization: Yes (200 runs)
ReentrancyGuard.sol 77 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}
ERC20.sol 365 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 default value returned by this function, unless
     * it's overridden.
     *
     * 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 virtual override returns (uint8) {
        return 18;
    }

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

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

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + 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) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` 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 += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

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

        _afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @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 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
CINDR.sol 144 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

/**
 * @title CINDR Token
 * @dev A NYTEMODE Project - https://nytemode.com
 *      A deflationary token with a fiery edge.
 *      Burns 5% on claims and transfers, fully decentralized with no admin control.
 *      https://cindrtoken.com
 * 
 *      "Burn, baby, burn."
 */
contract CINDR is ERC20, ReentrancyGuard {
    // Core constants
    uint256 private constant BURN_RATE = 500;      // 5% in basis points
    uint256 private constant BASIS_POINTS = 10_000; // 100% = 10,000 basis points
    uint256 private constant CLAIM_BASE = 100 * 10**18; // Base claim amount (100 tokens)
    uint256 private constant MAX_GAS_PRICE = 100 gwei;
    uint256 private constant MAX_TOTAL_SUPPLY = 1_000_000 * 10**18; // 1M tokens cap

    // State variables
    mapping(address => bool) public hasClaimed;
    uint256 public totalBurned;
    uint256 public totalClaimed;
    uint256 public uniqueClaimers;
    mapping(address => uint256) public claimBurnAmount;
    mapping(address => uint256) public transferBurnAmount; // Track burns from transfers per address

    // Events for transparency
    event TokensBurned(address indexed burner, uint256 amount, string context);
    event TokensClaimed(address indexed claimant, uint256 received, uint256 burned);

    /**
     * @dev Initializes the token with no initial supply.
     */
    constructor() ERC20("CINDR", "CINDR") {}

    /**
     * @dev Claims 95 tokens (after 5% burn) with anti-bot protections.
     * @notice Users receive 95 CINDR; 5 are burned from the intended 100.
     */
    function claimTokens() external nonReentrant {
        // Anti-bot measure: prevent gas wars
        require(tx.gasprice <= MAX_GAS_PRICE, "CINDR: Excessive gas price");

        // Basic claim restrictions
        require(!hasClaimed[msg.sender], "CINDR: Already claimed");
        require(totalClaimed + CLAIM_BASE <= MAX_TOTAL_SUPPLY, "CINDR: Supply cap reached");

        // Calculate burn and net amounts
        uint256 burn = (CLAIM_BASE * BURN_RATE) / BASIS_POINTS; // 5 tokens
        uint256 net = CLAIM_BASE - burn; // 95 tokens

        // Mint only the net amount directly to the user
        _mint(msg.sender, net);

        // Update state with virtual burn
        totalClaimed += CLAIM_BASE;
        totalBurned += burn;
        claimBurnAmount[msg.sender] = burn;
        uniqueClaimers += 1;
        hasClaimed[msg.sender] = true;

        // Emit events
        emit TokensClaimed(msg.sender, net, burn);
        emit TokensBurned(address(this), burn, "Claim");
    }

    /**
     * @dev Overrides _transfer to apply 5% burn on transfers.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual override {
        // Prevent transfers to the contract address
        require(recipient != address(this), "CINDR: Cannot transfer to contract address");
        
        // Calculate burn amount (5%)
        uint256 burnAmount = (amount * BURN_RATE) / BASIS_POINTS;
        uint256 transferAmount = amount - burnAmount;
        
        // Execute the transfer with reduced amount
        super._transfer(sender, recipient, transferAmount);
        
        // Burn the tokens
        if (burnAmount > 0) {
            super._burn(sender, burnAmount);
            totalBurned += burnAmount;
            transferBurnAmount[sender] += burnAmount; // Track this sender's burns
            emit TokensBurned(sender, burnAmount, "Transfer");
        }
    }

    /**
     * @dev Returns the remaining claimable supply.
     */
    function remainingClaimableSupply() external view returns (uint256) {
        return MAX_TOTAL_SUPPLY - totalClaimed;
    }

    /**
     * @dev Returns the current circulating supply.
     */
    function circulatingSupply() external view returns (uint256) {
        return totalSupply();
    }

    /**
     * @dev Calculates the burn percentage with 2 decimal precision (e.g., 1.25% = 125).
     */
    function burnPercentage() external view returns (uint256) {
        uint256 supply = totalSupply();
        return supply == 0 ? 0 : (totalBurned * BASIS_POINTS) / (supply + totalBurned);
    }

    /**
     * @dev Provides detailed claim statistics for an address.
     * @return hasClaimed, totalClaimed, totalBurned, individualBurn
     */
    function claimStats(address account) external view returns (bool, uint256, uint256, uint256) {
        return (hasClaimed[account], totalClaimed, totalBurned, claimBurnAmount[account]);
    }
    
    /**
     * @dev Returns the total amount of tokens an address has burned.
     * @param account The address to check burn amount for
     * @return Total tokens burned through claims and transfers
     */
    function addressBurnedAmount(address account) external view returns (uint256) {
        return claimBurnAmount[account] + transferBurnAmount[account];
    }
    
    /**
     * @dev Returns the number of unique addresses that have claimed tokens.
     */
    function numberOfClaimers() external view returns (uint256) {
        return uniqueClaimers;
    }
}

Read Contract

addressBurnedAmount 0xbdaf152d → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
burnPercentage 0xf01f20df → uint256
circulatingSupply 0x9358928b → uint256
claimBurnAmount 0x172b3346 → uint256
claimStats 0x99118e1c → bool, uint256, uint256, uint256
decimals 0x313ce567 → uint8
hasClaimed 0x73b2e80e → bool
name 0x06fdde03 → string
numberOfClaimers 0xbd7ba9f9 → uint256
remainingClaimableSupply 0xcb8a7a28 → uint256
symbol 0x95d89b41 → string
totalBurned 0xd89135cd → uint256
totalClaimed 0xd54ad2a1 → uint256
totalSupply 0x18160ddd → uint256
transferBurnAmount 0x7beaaf13 → uint256
uniqueClaimers 0xf0531066 → uint256

Write Contract 6 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
claimTokens 0x48c54b9d
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool

Recent Transactions

No transactions found for this address