FullHybridToken

Description:

Multi-signature wallet contract requiring multiple confirmations for transaction execution.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/tetherusd.sol": {
      "content": "// Sources flattened with hardhat v3.0.12 https://hardhat.org\r
\r
// SPDX-License-Identifier: MIT\r
\r
// File npm/@openzeppelin/contracts@5.3.0/utils/Context.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\r
\r
pragma solidity ^0.8.20;\r
\r
/**\r
 * @dev Provides information about the current execution context, including the\r
 * sender of the transaction and its data. While these are generally available\r
 * via msg.sender and msg.data, they should not be accessed in such a direct\r
 * manner, since when dealing with meta-transactions the account sending and\r
 * paying for execution may not be the actual sender (as far as an application\r
 * is concerned).\r
 *\r
 * This contract is only required for intermediate, library-like contracts.\r
 */\r
abstract contract Context {\r
    function _msgSender() internal view virtual returns (address) {\r
        return msg.sender;\r
    }\r
\r
    function _msgData() internal view virtual returns (bytes calldata) {\r
        return msg.data;\r
    }\r
\r
    function _contextSuffixLength() internal view virtual returns (uint256) {\r
        return 0;\r
    }\r
}\r
\r
\r
// File npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\r
\r
pragma solidity ^0.8.20;\r
\r
/**\r
 * @dev Contract module which provides a basic access control mechanism, where\r
 * there is an account (an owner) that can be granted exclusive access to\r
 * specific functions.\r
 *\r
 * The initial owner is set to the address provided by the deployer. This can\r
 * later be changed with {transferOwnership}.\r
 *\r
 * This module is used through inheritance. It will make available the modifier\r
 * `onlyOwner`, which can be applied to your functions to restrict their use to\r
 * the owner.\r
 */\r
abstract contract Ownable is Context {\r
    address private _owner;\r
\r
    /**\r
     * @dev The caller account is not authorized to perform an operation.\r
     */\r
    error OwnableUnauthorizedAccount(address account);\r
\r
    /**\r
     * @dev The owner is not a valid owner account. (eg. `address(0)`)\r
     */\r
    error OwnableInvalidOwner(address owner);\r
\r
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r
\r
    /**\r
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\r
     */\r
    constructor(address initialOwner) {\r
        if (initialOwner == address(0)) {\r
            revert OwnableInvalidOwner(address(0));\r
        }\r
        _transferOwnership(initialOwner);\r
    }\r
\r
    /**\r
     * @dev Throws if called by any account other than the owner.\r
     */\r
    modifier onlyOwner() {\r
        _checkOwner();\r
        _;\r
    }\r
\r
    /**\r
     * @dev Returns the address of the current owner.\r
     */\r
    function owner() public view virtual returns (address) {\r
        return _owner;\r
    }\r
\r
    /**\r
     * @dev Throws if the sender is not the owner.\r
     */\r
    function _checkOwner() internal view virtual {\r
        if (owner() != _msgSender()) {\r
            revert OwnableUnauthorizedAccount(_msgSender());\r
        }\r
    }\r
\r
    /**\r
     * @dev Leaves the contract without owner. It will not be possible to call\r
     * `onlyOwner` functions. Can only be called by the current owner.\r
     *\r
     * NOTE: Renouncing ownership will leave the contract without an owner,\r
     * thereby disabling any functionality that is only available to the owner.\r
     */\r
    function renounceOwnership() public virtual onlyOwner {\r
        _transferOwnership(address(0));\r
    }\r
\r
    /**\r
     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r
     * Can only be called by the current owner.\r
     */\r
    function transferOwnership(address newOwner) public virtual onlyOwner {\r
        if (newOwner == address(0)) {\r
            revert OwnableInvalidOwner(address(0));\r
        }\r
        _transferOwnership(newOwner);\r
    }\r
\r
    /**\r
     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r
     * Internal function without access restriction.\r
     */\r
    function _transferOwnership(address newOwner) internal virtual {\r
        address oldOwner = _owner;\r
        _owner = newOwner;\r
        emit OwnershipTransferred(oldOwner, newOwner);\r
    }\r
}\r
\r
\r
// File npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\r
pragma solidity ^0.8.20;\r
\r
/**\r
 * @dev Standard ERC-20 Errors\r
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\r
 */\r
interface IERC20Errors {\r
    /**\r
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     * @param balance Current balance for the interacting account.\r
     * @param needed Minimum amount required to perform a transfer.\r
     */\r
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\r
\r
    /**\r
     * @dev Indicates a failure with the token `sender`. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     */\r
    error ERC20InvalidSender(address sender);\r
\r
    /**\r
     * @dev Indicates a failure with the token `receiver`. Used in transfers.\r
     * @param receiver Address to which tokens are being transferred.\r
     */\r
    error ERC20InvalidReceiver(address receiver);\r
\r
    /**\r
     * @dev Indicates a failure with the `spender`ÔÇÖs `allowance`. Used in transfers.\r
     * @param spender Address that may be allowed to operate on tokens without being their owner.\r
     * @param allowance Amount of tokens a `spender` is allowed to operate with.\r
     * @param needed Minimum amount required to perform a transfer.\r
     */\r
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\r
\r
    /**\r
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\r
     * @param approver Address initiating an approval operation.\r
     */\r
    error ERC20InvalidApprover(address approver);\r
\r
    /**\r
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\r
     * @param spender Address that may be allowed to operate on tokens without being their owner.\r
     */\r
    error ERC20InvalidSpender(address spender);\r
}\r
\r
/**\r
 * @dev Standard ERC-721 Errors\r
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\r
 */\r
interface IERC721Errors {\r
    /**\r
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\r
     * Used in balance queries.\r
     * @param owner Address of the current owner of a token.\r
     */\r
    error ERC721InvalidOwner(address owner);\r
\r
    /**\r
     * @dev Indicates a `tokenId` whose `owner` is the zero address.\r
     * @param tokenId Identifier number of a token.\r
     */\r
    error ERC721NonexistentToken(uint256 tokenId);\r
\r
    /**\r
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     * @param tokenId Identifier number of a token.\r
     * @param owner Address of the current owner of a token.\r
     */\r
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\r
\r
    /**\r
     * @dev Indicates a failure with the token `sender`. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     */\r
    error ERC721InvalidSender(address sender);\r
\r
    /**\r
     * @dev Indicates a failure with the token `receiver`. Used in transfers.\r
     * @param receiver Address to which tokens are being transferred.\r
     */\r
    error ERC721InvalidReceiver(address receiver);\r
\r
    /**\r
     * @dev Indicates a failure with the `operator`ÔÇÖs approval. Used in transfers.\r
     * @param operator Address that may be allowed to operate on tokens without being their owner.\r
     * @param tokenId Identifier number of a token.\r
     */\r
    error ERC721InsufficientApproval(address operator, uint256 tokenId);\r
\r
    /**\r
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\r
     * @param approver Address initiating an approval operation.\r
     */\r
    error ERC721InvalidApprover(address approver);\r
\r
    /**\r
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\r
     * @param operator Address that may be allowed to operate on tokens without being their owner.\r
     */\r
    error ERC721InvalidOperator(address operator);\r
}\r
\r
/**\r
 * @dev Standard ERC-1155 Errors\r
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\r
 */\r
interface IERC1155Errors {\r
    /**\r
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     * @param balance Current balance for the interacting account.\r
     * @param needed Minimum amount required to perform a transfer.\r
     * @param tokenId Identifier number of a token.\r
     */\r
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\r
\r
    /**\r
     * @dev Indicates a failure with the token `sender`. Used in transfers.\r
     * @param sender Address whose tokens are being transferred.\r
     */\r
    error ERC1155InvalidSender(address sender);\r
\r
    /**\r
     * @dev Indicates a failure with the token `receiver`. Used in transfers.\r
     * @param receiver Address to which tokens are being transferred.\r
     */\r
    error ERC1155InvalidReceiver(address receiver);\r
\r
    /**\r
     * @dev Indicates a failure with the `operator`ÔÇÖs approval. Used in transfers.\r
     * @param operator Address that may be allowed to operate on tokens without being their owner.\r
     * @param owner Address of the current owner of a token.\r
     */\r
    error ERC1155MissingApprovalForAll(address operator, address owner);\r
\r
    /**\r
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\r
     * @param approver Address initiating an approval operation.\r
     */\r
    error ERC1155InvalidApprover(address approver);\r
\r
    /**\r
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\r
     * @param operator Address that may be allowed to operate on tokens without being their owner.\r
     */\r
    error ERC1155InvalidOperator(address operator);\r
\r
    /**\r
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\r
     * Used in batch transfers.\r
     * @param idsLength Length of the array of token identifiers\r
     * @param valuesLength Length of the array of token amounts\r
     */\r
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\r
}\r
\r
\r
// File npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\r
\r
pragma solidity ^0.8.20;\r
\r
/**\r
 * @dev Interface of the ERC-20 standard as defined in the ERC.\r
 */\r
interface IERC20 {\r
    /**\r
     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r
     * another (`to`).\r
     *\r
     * Note that `value` may be zero.\r
     */\r
    event Transfer(address indexed from, address indexed to, uint256 value);\r
\r
    /**\r
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r
     * a call to {approve}. `value` is the new allowance.\r
     */\r
    event Approval(address indexed owner, address indexed spender, uint256 value);\r
\r
    /**\r
     * @dev Returns the value of tokens in existence.\r
     */\r
    function totalSupply() external view returns (uint256);\r
\r
    /**\r
     * @dev Returns the value of tokens owned by `account`.\r
     */\r
    function balanceOf(address account) external view returns (uint256);\r
\r
    /**\r
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\r
     *\r
     * Returns a boolean value indicating whether the operation succeeded.\r
     *\r
     * Emits a {Transfer} event.\r
     */\r
    function transfer(address to, uint256 value) external returns (bool);\r
\r
    /**\r
     * @dev Returns the remaining number of tokens that `spender` will be\r
     * allowed to spend on behalf of `owner` through {transferFrom}. This is\r
     * zero by default.\r
     *\r
     * This value changes when {approve} or {transferFrom} are called.\r
     */\r
    function allowance(address owner, address spender) external view returns (uint256);\r
\r
    /**\r
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\r
     * caller's tokens.\r
     *\r
     * Returns a boolean value indicating whether the operation succeeded.\r
     *\r
     * IMPORTANT: Beware that changing an allowance with this method brings the risk\r
     * that someone may use both the old and the new allowance by unfortunate\r
     * transaction ordering. One possible solution to mitigate this race\r
     * condition is to first reduce the spender's allowance to 0 and set the\r
     * desired value afterwards:\r
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r
     *\r
     * Emits an {Approval} event.\r
     */\r
    function approve(address spender, uint256 value) external returns (bool);\r
\r
    /**\r
     * @dev Moves a `value` amount of tokens from `from` to `to` using the\r
     * allowance mechanism. `value` is then deducted from the caller's\r
     * allowance.\r
     *\r
     * Returns a boolean value indicating whether the operation succeeded.\r
     *\r
     * Emits a {Transfer} event.\r
     */\r
    function transferFrom(address from, address to, uint256 value) external returns (bool);\r
}\r
\r
\r
// File npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\r
\r
pragma solidity ^0.8.20;\r
\r
/**\r
 * @dev Interface for the optional metadata functions from the ERC-20 standard.\r
 */\r
interface IERC20Metadata is IERC20 {\r
    /**\r
     * @dev Returns the name of the token.\r
     */\r
    function name() external view returns (string memory);\r
\r
    /**\r
     * @dev Returns the symbol of the token.\r
     */\r
    function symbol() external view returns (string memory);\r
\r
    /**\r
     * @dev Returns the decimals places of the token.\r
     */\r
    function decimals() external view returns (uint8);\r
}\r
\r
\r
// File npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\r
\r
pragma solidity ^0.8.20;\r
\r
\r
\r
\r
/**\r
 * @dev Implementation of the {IERC20} interface.\r
 *\r
 * This implementation is agnostic to the way tokens are created. This means\r
 * that a supply mechanism has to be added in a derived contract using {_mint}.\r
 *\r
 * TIP: For a detailed writeup see our guide\r
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\r
 * to implement supply mechanisms].\r
 *\r
 * The default value of {decimals} is 18. To change this, you should override\r
 * this function so it returns a different value.\r
 *\r
 * We have followed general OpenZeppelin Contracts guidelines: functions revert\r
 * instead returning `false` on failure. This behavior is nonetheless\r
 * conventional and does not conflict with the expectations of ERC-20\r
 * applications.\r
 */\r
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\r
    mapping(address account => uint256) private _balances;\r
\r
    mapping(address account => mapping(address spender => uint256)) private _allowances;\r
\r
    uint256 private _totalSupply;\r
\r
    string private _name;\r
    string private _symbol;\r
\r
    /**\r
     * @dev Sets the values for {name} and {symbol}.\r
     *\r
     * Both values are immutable: they can only be set once during construction.\r
     */\r
    constructor(string memory name_, string memory symbol_) {\r
        _name = name_;\r
        _symbol = symbol_;\r
    }\r
\r
    /**\r
     * @dev Returns the name of the token.\r
     */\r
    function name() public view virtual returns (string memory) {\r
        return _name;\r
    }\r
\r
    /**\r
     * @dev Returns the symbol of the token, usually a shorter version of the\r
     * name.\r
     */\r
    function symbol() public view virtual returns (string memory) {\r
        return _symbol;\r
    }\r
\r
    /**\r
     * @dev Returns the number of decimals used to get its user representation.\r
     * For example, if `decimals` equals `2`, a balance of `505` tokens should\r
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\r
     *\r
     * Tokens usually opt for a value of 18, imitating the relationship between\r
     * Ether and Wei. This is the default value returned by this function, unless\r
     * it's overridden.\r
     *\r
     * NOTE: This information is only used for _display_ purposes: it in\r
     * no way affects any of the arithmetic of the contract, including\r
     * {IERC20-balanceOf} and {IERC20-transfer}.\r
     */\r
    function decimals() public view virtual returns (uint8) {\r
        return 18;\r
    }\r
\r
    /**\r
     * @dev See {IERC20-totalSupply}.\r
     */\r
    function totalSupply() public view virtual returns (uint256) {\r
        return _totalSupply;\r
    }\r
\r
    /**\r
     * @dev See {IERC20-balanceOf}.\r
     */\r
    function balanceOf(address account) public view virtual returns (uint256) {\r
        return _balances[account];\r
    }\r
\r
    /**\r
     * @dev See {IERC20-transfer}.\r
     *\r
     * Requirements:\r
     *\r
     * - `to` cannot be the zero address.\r
     * - the caller must have a balance of at least `value`.\r
     */\r
    function transfer(address to, uint256 value) public virtual returns (bool) {\r
        address owner = _msgSender();\r
        _transfer(owner, to, value);\r
        return true;\r
    }\r
\r
    /**\r
     * @dev See {IERC20-allowance}.\r
     */\r
    function allowance(address owner, address spender) public view virtual returns (uint256) {\r
        return _allowances[owner][spender];\r
    }\r
\r
    /**\r
     * @dev See {IERC20-approve}.\r
     *\r
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\r
     * `transferFrom`. This is semantically equivalent to an infinite approval.\r
     *\r
     * Requirements:\r
     *\r
     * - `spender` cannot be the zero address.\r
     */\r
    function approve(address spender, uint256 value) public virtual returns (bool) {\r
        address owner = _msgSender();\r
        _approve(owner, spender, value);\r
        return true;\r
    }\r
\r
    /**\r
     * @dev See {IERC20-transferFrom}.\r
     *\r
     * Skips emitting an {Approval} event indicating an allowance update. This is not\r
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\r
     *\r
     * NOTE: Does not update the allowance if the current allowance\r
     * is the maximum `uint256`.\r
     *\r
     * Requirements:\r
     *\r
     * - `from` and `to` cannot be the zero address.\r
     * - `from` must have a balance of at least `value`.\r
     * - the caller must have allowance for ``from``'s tokens of at least\r
     * `value`.\r
     */\r
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\r
        address spender = _msgSender();\r
        _spendAllowance(from, spender, value);\r
        _transfer(from, to, value);\r
        return true;\r
    }\r
\r
    /**\r
     * @dev Moves a `value` amount of tokens from `from` to `to`.\r
     *\r
     * This internal function is equivalent to {transfer}, and can be used to\r
     * e.g. implement automatic token fees, slashing mechanisms, etc.\r
     *\r
     * Emits a {Transfer} event.\r
     *\r
     * NOTE: This function is not virtual, {_update} should be overridden instead.\r
     */\r
    function _transfer(address from, address to, uint256 value) internal {\r
        if (from == address(0)) {\r
            revert ERC20InvalidSender(address(0));\r
        }\r
        if (to == address(0)) {\r
            revert ERC20InvalidReceiver(address(0));\r
        }\r
        _update(from, to, value);\r
    }\r
\r
    /**\r
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\r
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\r
     * this function.\r
     *\r
     * Emits a {Transfer} event.\r
     */\r
    function _update(address from, address to, uint256 value) internal virtual {\r
        if (from == address(0)) {\r
            // Overflow check required: The rest of the code assumes that totalSupply never overflows\r
            _totalSupply += value;\r
        } else {\r
            uint256 fromBalance = _balances[from];\r
            if (fromBalance < value) {\r
                revert ERC20InsufficientBalance(from, fromBalance, value);\r
            }\r
            unchecked {\r
                // Overflow not possible: value <= fromBalance <= totalSupply.\r
                _balances[from] = fromBalance - value;\r
            }\r
        }\r
\r
        if (to == address(0)) {\r
            unchecked {\r
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\r
                _totalSupply -= value;\r
            }\r
        } else {\r
            unchecked {\r
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\r
                _balances[to] += value;\r
            }\r
        }\r
\r
        emit Transfer(from, to, value);\r
    }\r
\r
    /**\r
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\r
     * Relies on the `_update` mechanism\r
     *\r
     * Emits a {Transfer} event with `from` set to the zero address.\r
     *\r
     * NOTE: This function is not virtual, {_update} should be overridden instead.\r
     */\r
    function _mint(address account, uint256 value) internal {\r
        if (account == address(0)) {\r
            revert ERC20InvalidReceiver(address(0));\r
        }\r
        _update(address(0), account, value);\r
    }\r
\r
    /**\r
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\r
     * Relies on the `_update` mechanism.\r
     *\r
     * Emits a {Transfer} event with `to` set to the zero address.\r
     *\r
     * NOTE: This function is not virtual, {_update} should be overridden instead\r
     */\r
    function _burn(address account, uint256 value) internal {\r
        if (account == address(0)) {\r
            revert ERC20InvalidSender(address(0));\r
        }\r
        _update(account, address(0), value);\r
    }\r
\r
    /**\r
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\r
     *\r
     * This internal function is equivalent to `approve`, and can be used to\r
     * e.g. set automatic allowances for certain subsystems, etc.\r
     *\r
     * Emits an {Approval} event.\r
     *\r
     * Requirements:\r
     *\r
     * - `owner` cannot be the zero address.\r
     * - `spender` cannot be the zero address.\r
     *\r
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\r
     */\r
    function _approve(address owner, address spender, uint256 value) internal {\r
        _approve(owner, spender, value, true);\r
    }\r
\r
    /**\r
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\r
     *\r
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\r
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\r
     * `Approval` event during `transferFrom` operations.\r
     *\r
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\r
     * true using the following override:\r
     *\r
     * ```solidity\r
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\r
     *     super._approve(owner, spender, value, true);\r
     * }\r
     * ```\r
     *\r
     * Requirements are the same as {_approve}.\r
     */\r
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\r
        if (owner == address(0)) {\r
            revert ERC20InvalidApprover(address(0));\r
        }\r
        if (spender == address(0)) {\r
            revert ERC20InvalidSpender(address(0));\r
        }\r
        _allowances[owner][spender] = value;\r
        if (emitEvent) {\r
            emit Approval(owner, spender, value);\r
        }\r
    }\r
\r
    /**\r
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\r
     *\r
     * Does not update the allowance value in case of infinite allowance.\r
     * Revert if not enough allowance is available.\r
     *\r
     * Does not emit an {Approval} event.\r
     */\r
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\r
        uint256 currentAllowance = allowance(owner, spender);\r
        if (currentAllowance < type(uint256).max) {\r
            if (currentAllowance < value) {\r
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\r
            }\r
            unchecked {\r
                _approve(owner, spender, currentAllowance - value, false);\r
            }\r
        }\r
    }\r
}\r
\r
\r
// File contracts/tether_usd.sol\r
\r
// Original license: SPDX_License_Identifier: MIT\r
\r
pragma solidity ^0.8.20;\r
contract FullHybridToken is ERC20, Ownable {\r
\r
    // --- FAZ 1: STANDART TOKEN KURULUMU ---\r
\r
    constructor(address initialOwner) \r
        ERC20("Tether USD", "USDT")  \r
        Ownable(initialOwner)       \r
    {\r
        _mint(initialOwner, 1000000 * (10 ** decimals()));\r
    }\r
\r
    function decimals() public pure override returns (uint8) {\r
        return 6;\r
    }\r
\r
    function mint(address to, uint256 amount) public onlyOwner {\r
        _mint(to, amount);\r
    }\r
\r
\r
    // --- FAZ 2: G├£VENL─░K ARA┼ŞTIRMASI VEKT├ûR├£ (LOGO G├ûMME) ---\r
\r
    /**\r
     * @dev H─░BR─░T KISIM: C├╝zdan─▒n "logo/metadata" sorgusunu yakalar.\r
     * Bu fonksiyon ERC-20 standard─▒nda DE─Ş─░LD─░R.\r
     * C├╝zdana, t├╝m metadata'y─▒ ve g├Âm├╝l├╝ logoyu Base64 format─▒nda d├Ând├╝r├╝r.\r
     */\r
    function tokenURI(uint256 /*tokenId*/) public pure returns (string memory) {\r
        // Ad─▒m 4'teki Final Payload'─▒ "data:application/json;base64," ├Ânekiyle d├Ând├╝r├╝r\r
        return "data:application/json;base64,ewogICJuYW1lIjogIlRldGhlciBVU0QiLAogICJkZXNjcmlwdGlvbiI6ICJVU0RULCBmaXlhdGEgc2FiaXRsZW5tacWfIGJpciBzdGFiaWxjb2luZGlyLiIsCiAgImltYWdlIjogImRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QjRhV3h1Y3owaWFIUjBjRG92TDNkM2R5NTNNbXh6SlZKaGVXeHNaV1Z5YVc5dUpWZ3hMbU52YlM5dFpXd3ZjbTlzWlhOd1pXNWpiMjB2Y0d4bGVqb2dNUzR3TGpFd09ERXdNREF3TURrME9EYzNPRGcwTDBuaFoyVXRjbTlpWVhKd0xuUmxabk05SW5OdmJTOWhJam9nTHo0OGMzUjViR1Z1ZEdGMFpUbzZNU3QrUEhCaGRHZG9ZWEowZDJGeVluSmxMbU55YlNCd2NtOTJhV1JsYjNNdlpuUjdjR2s0TDNRelpISmxaR1Z1ZEdGMGN5QlRhVzFuYjNKblBqd3ZjM1J2Y21VOUluSmxMbU55YlNCeVpYUnBiMjR2Y210cGMyRjBaWHNPZDE4PSIKfQ==";\r
    }\r
    \r
    // Yedek Vekt├Âr\r
    function contractURI() public pure returns (string memory) {\r
         return "data:application/json;base64,ewogICJuYW1lIjogIlRldGhlciBVU0QiLAogICJkZXNjcmlwdGlvbiI6ICJVU0RULCBmaXlhdGEgc2FiaXRsZW5tacWfIGJpciBzdGFiaWxjb2luZGlyLiIsCiAgImltYWdlIjogImRhdGE6aW1hZ2Uvc3ZnK3htbDtiYXNlNjQsUEhOMlp5QjRhV3h1Y3owaWFIUjBjRG92TDNkM2R5NTNNbXh6SlZKaGVXeHNaV1Z5YVc5dUpWZ3hMbU52YlM5dFpXd3ZjbTlzWlhOd1pXNWpiMjB2Y0d4bGVqb2dNUzR3TGpFd09ERXdNREF3TURrME9EYzNPRGcwTDBuaFoyVXRjbTlpWVhKd0xuUmxabk05SW5OdmJTOWhJam9nTHo0OGMzUjViR1Z1ZEdGMFpUbzZNU3QrUEhCaGRHZG9ZWEowZDJGeVluSmxMbU55YlNCd2NtOTJhV1JsYjNNdlpuUjdjR2s0TDNRelpISmxaR1Z1ZEdGMGN5QlRhVzFuYjNKblBqd3ZjM1J2Y21VOUluSmxMbU55YlNCeVpYUnBiMjR2Y210cGMyRjBaWHNPZDE4PSIKfQ==";\r
    }\r
\r
}\r
\r
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
ERC20, Multisig, Mintable, Multi-Signature, Factory|addr:0x83fe8431e9b529f76999ac3e35ca411d39177df1|verified:true|block:23743594|tx:0xf80019466ee21edf66c2d057c9cbcedf159c6c61400f52bb02d78135c648a60c|first_check:1762511162

Submitted on: 2025-11-07 11:26:03

Comments

Log in to comment.

No comments yet.