ETH Price: $2,443.55 (+4.30%)

Transaction Decoder

Block:
20743868 at Sep-13-2024 07:45:59 PM +UTC
Transaction Fee:
0.001237133033147088 ETH $3.02
Gas Used:
73,374 Gas / 16.860645912 Gwei

Account State Difference:

  Address   Before After State Difference Code
(Fee Recipient: 0x4831...f86)
3.286259283146542485 Eth3.286440137248743915 Eth0.00018085410220143
0x85A77d08...217c8e09F
0.820467211501922961 Eth
Nonce: 43
0.819230078468775873 Eth
Nonce: 44
0.001237133033147088

Execution Trace

0xf3de3c0d654fda23dad170f0f320a92172509127.9871efa4( )
  • OKX: Dex Aggregator.0a5ea466( )
    • TokenApprove.claimTokens( _token=0xDd95b4349a295bBEf55F43Fc1be47449B47f1505, _who=0x85A77d080bb51D7E57D3b29bF986D4d217c8e09F, _dest=0x2329809548668DDEa3552942af1aAE622C92f959, _amount=1890786276634771158 )
      • DOG.transferFrom( sender=0x85A77d080bb51D7E57D3b29bF986D4d217c8e09F, recipient=0x2329809548668DDEa3552942af1aAE622C92f959, amount=1890786276634771158 )
        File 1 of 2: TokenApprove
        /**
         *Submitted for verification at BscScan.com on 2023-06-26
        */
        
        // SPDX-License-Identifier: MIT
        pragma solidity ^0.8.0;
        
        // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
        
        // OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
        
        // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)
        
        // OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
        
        /**
         * @dev Collection of functions related to the address type
         */
        library AddressUpgradeable {
            /**
             * @dev Returns true if `account` is a contract.
             *
             * [IMPORTANT]
             * ====
             * It is unsafe to assume that an address for which this function returns
             * false is an externally-owned account (EOA) and not a contract.
             *
             * Among others, `isContract` will return false for the following
             * types of addresses:
             *
             *  - an externally-owned account
             *  - a contract in construction
             *  - an address where a contract will be created
             *  - an address where a contract lived, but was destroyed
             * ====
             */
            function isContract(address account) internal view returns (bool) {
                // This method relies on extcodesize, which returns 0 for contracts in
                // construction, since the code is only stored at the end of the
                // constructor execution.
        
                uint256 size;
                assembly {
                    size := extcodesize(account)
                }
                return size > 0;
            }
        
            /**
             * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
             * `recipient`, forwarding all available gas and reverting on errors.
             *
             * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
             * of certain opcodes, possibly making contracts go over the 2300 gas limit
             * imposed by `transfer`, making them unable to receive funds via
             * `transfer`. {sendValue} removes this limitation.
             *
             * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
             *
             * IMPORTANT: because control is transferred to `recipient`, care must be
             * taken to not create reentrancy vulnerabilities. Consider using
             * {ReentrancyGuard} or the
             * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
             */
            function sendValue(address payable recipient, uint256 amount) internal {
                require(address(this).balance >= amount, "Address: insufficient balance");
        
                (bool success, ) = recipient.call{value: amount}("");
                require(success, "Address: unable to send value, recipient may have reverted");
            }
        
            /**
             * @dev Performs a Solidity function call using a low level `call`. A
             * plain `call` is an unsafe replacement for a function call: use this
             * function instead.
             *
             * If `target` reverts with a revert reason, it is bubbled up by this
             * function (like regular Solidity function calls).
             *
             * Returns the raw returned data. To convert to the expected return value,
             * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
             *
             * Requirements:
             *
             * - `target` must be a contract.
             * - calling `target` with `data` must not revert.
             *
             * _Available since v3.1._
             */
            function functionCall(address target, bytes memory data) internal returns (bytes memory) {
                return functionCall(target, data, "Address: low-level call failed");
            }
        
            /**
             * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
             * `errorMessage` as a fallback revert reason when `target` reverts.
             *
             * _Available since v3.1._
             */
            function functionCall(
                address target,
                bytes memory data,
                string memory errorMessage
            ) internal returns (bytes memory) {
                return functionCallWithValue(target, data, 0, errorMessage);
            }
        
            /**
             * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
             * but also transferring `value` wei to `target`.
             *
             * Requirements:
             *
             * - the calling contract must have an ETH balance of at least `value`.
             * - the called Solidity function must be `payable`.
             *
             * _Available since v3.1._
             */
            function functionCallWithValue(
                address target,
                bytes memory data,
                uint256 value
            ) internal returns (bytes memory) {
                return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
            }
        
            /**
             * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
             * with `errorMessage` as a fallback revert reason when `target` reverts.
             *
             * _Available since v3.1._
             */
            function functionCallWithValue(
                address target,
                bytes memory data,
                uint256 value,
                string memory errorMessage
            ) internal returns (bytes memory) {
                require(address(this).balance >= value, "Address: insufficient balance for call");
                require(isContract(target), "Address: call to non-contract");
        
                (bool success, bytes memory returndata) = target.call{value: value}(data);
                return verifyCallResult(success, returndata, errorMessage);
            }
        
            /**
             * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
             * but performing a static call.
             *
             * _Available since v3.3._
             */
            function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
                return functionStaticCall(target, data, "Address: low-level static call failed");
            }
        
            /**
             * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
             * but performing a static call.
             *
             * _Available since v3.3._
             */
            function functionStaticCall(
                address target,
                bytes memory data,
                string memory errorMessage
            ) internal view returns (bytes memory) {
                require(isContract(target), "Address: static call to non-contract");
        
                (bool success, bytes memory returndata) = target.staticcall(data);
                return verifyCallResult(success, returndata, errorMessage);
            }
        
            /**
             * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
             * revert reason using the provided one.
             *
             * _Available since v4.3._
             */
            function verifyCallResult(
                bool success,
                bytes memory returndata,
                string memory errorMessage
            ) internal pure returns (bytes memory) {
                if (success) {
                    return returndata;
                } else {
                    // Look for revert reason and bubble it up if present
                    if (returndata.length > 0) {
                        // The easiest way to bubble the revert reason is using memory via assembly
        
                        assembly {
                            let returndata_size := mload(returndata)
                            revert(add(32, returndata), returndata_size)
                        }
                    } else {
                        revert(errorMessage);
                    }
                }
            }
        }
        
        /**
         * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
         * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
         * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
         * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
         *
         * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
         * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
         *
         * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
         * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
         *
         * [CAUTION]
         * ====
         * Avoid leaving a contract uninitialized.
         *
         * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
         * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
         * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
         *
         * [.hljs-theme-light.nopadding]
         * ```
         * /// @custom:oz-upgrades-unsafe-allow constructor
         * constructor() initializer {}
         * ```
         * ====
         */
        abstract contract Initializable {
            /**
             * @dev Indicates that the contract has been initialized.
             */
            bool private _initialized;
        
            /**
             * @dev Indicates that the contract is in the process of being initialized.
             */
            bool private _initializing;
        
            /**
             * @dev Modifier to protect an initializer function from being invoked twice.
             */
            modifier initializer() {
                // If the contract is initializing we ignore whether _initialized is set in order to support multiple
                // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
                // contract may have been reentered.
                require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");
        
                bool isTopLevelCall = !_initializing;
                if (isTopLevelCall) {
                    _initializing = true;
                    _initialized = true;
                }
        
                _;
        
                if (isTopLevelCall) {
                    _initializing = false;
                }
            }
        
            /**
             * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
             * {initializer} modifier, directly or indirectly.
             */
            modifier onlyInitializing() {
                require(_initializing, "Initializable: contract is not initializing");
                _;
            }
        
            function _isConstructor() private view returns (bool) {
                return !AddressUpgradeable.isContract(address(this));
            }
        }
        
        /**
         * @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 ContextUpgradeable is Initializable {
            function __Context_init() internal onlyInitializing {
                __Context_init_unchained();
            }
        
            function __Context_init_unchained() internal onlyInitializing {
            }
            function _msgSender() internal view virtual returns (address) {
                return msg.sender;
            }
        
            function _msgData() internal view virtual returns (bytes calldata) {
                return msg.data;
            }
            uint256[50] private __gap;
        }
        
        /**
         * @dev Contract module which provides a basic access control mechanism, where
         * there is an account (an owner) that can be granted exclusive access to
         * specific functions.
         *
         * By default, the owner account will be the one that deploys the contract. This
         * can later be changed with {transferOwnership}.
         *
         * This module is used through inheritance. It will make available the modifier
         * `onlyOwner`, which can be applied to your functions to restrict their use to
         * the owner.
         */
        abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
            address private _owner;
        
            event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
        
            /**
             * @dev Initializes the contract setting the deployer as the initial owner.
             */
            function __Ownable_init() internal onlyInitializing {
                __Context_init_unchained();
                __Ownable_init_unchained();
            }
        
            function __Ownable_init_unchained() internal onlyInitializing {
                _transferOwnership(_msgSender());
            }
        
            /**
             * @dev Returns the address of the current owner.
             */
            function owner() public view virtual returns (address) {
                return _owner;
            }
        
            /**
             * @dev Throws if called by any account other than the owner.
             */
            modifier onlyOwner() {
                require(owner() == _msgSender(), "Ownable: caller is not the owner");
                _;
            }
        
            /**
             * @dev Leaves the contract without owner. It will not be possible to call
             * `onlyOwner` functions anymore. Can only be called by the current owner.
             *
             * NOTE: Renouncing ownership will leave the contract without an owner,
             * thereby removing any functionality that is only available to the owner.
             */
            function renounceOwnership() public virtual onlyOwner {
                _transferOwnership(address(0));
            }
        
            /**
             * @dev Transfers ownership of the contract to a new account (`newOwner`).
             * Can only be called by the current owner.
             */
            function transferOwnership(address newOwner) public virtual onlyOwner {
                require(newOwner != address(0), "Ownable: new owner is the zero address");
                _transferOwnership(newOwner);
            }
        
            /**
             * @dev Transfers ownership of the contract to a new account (`newOwner`).
             * Internal function without access restriction.
             */
            function _transferOwnership(address newOwner) internal virtual {
                address oldOwner = _owner;
                _owner = newOwner;
                emit OwnershipTransferred(oldOwner, newOwner);
            }
            uint256[49] private __gap;
        }
        
        interface IERC20 {
            event Approval(address indexed owner, address indexed spender, uint value);
            event Transfer(address indexed from, address indexed to, uint value);
        
            function name() external view returns (string memory);
        
            function symbol() external view returns (string memory);
        
            function decimals() external view returns (uint8);
        
            function totalSupply() external view returns (uint);
        
            function balanceOf(address owner) external view returns (uint);
        
            function allowance(address owner, address spender) external view returns (uint);
        
            function approve(address spender, uint value) external returns (bool);
        
            function transfer(address to, uint value) external returns (bool);
        
            function transferFrom(address from, address to, uint value) external returns (bool);
        }
        
        library SafeMath {
            uint256 constant WAD = 10 ** 18;
            uint256 constant RAY = 10 ** 27;
        
            function wad() public pure returns (uint256) {
                return WAD;
            }
        
            function ray() public pure returns (uint256) {
                return RAY;
            }
        
            function add(uint256 a, uint256 b) internal pure returns (uint256) {
                uint256 c = a + b;
                require(c >= a, "SafeMath: addition overflow");
        
                return c;
            }
        
            function sub(uint256 a, uint256 b) internal pure returns (uint256) {
                return sub(a, b, "SafeMath: subtraction overflow");
            }
        
            function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
                require(b <= a, errorMessage);
                uint256 c = a - b;
        
                return c;
            }
        
            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;
            }
        
            function div(uint256 a, uint256 b) internal pure returns (uint256) {
                return div(a, b, "SafeMath: division by zero");
            }
        
            function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
                // Solidity only automatically asserts when dividing by 0
                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;
            }
        
            function mod(uint256 a, uint256 b) internal pure returns (uint256) {
                return mod(a, b, "SafeMath: modulo by zero");
            }
        
            function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
                require(b != 0, errorMessage);
                return a % b;
            }
        
            function min(uint256 a, uint256 b) internal pure returns (uint256) {
                return a <= b ? a : b;
            }
        
            function max(uint256 a, uint256 b) internal pure returns (uint256) {
                return a >= b ? a : b;
            }
        
            function sqrt(uint256 a) internal pure returns (uint256 b) {
                if (a > 3) {
                    b = a;
                    uint256 x = a / 2 + 1;
                    while (x < b) {
                        b = x;
                        x = (a / x + x) / 2;
                    }
                } else if (a != 0) {
                    b = 1;
                }
            }
        
            function wmul(uint256 a, uint256 b) internal pure returns (uint256) {
                return mul(a, b) / WAD;
            }
        
            function wmulRound(uint256 a, uint256 b) internal pure returns (uint256) {
                return add(mul(a, b), WAD / 2) / WAD;
            }
        
            function rmul(uint256 a, uint256 b) internal pure returns (uint256) {
                return mul(a, b) / RAY;
            }
        
            function rmulRound(uint256 a, uint256 b) internal pure returns (uint256) {
                return add(mul(a, b), RAY / 2) / RAY;
            }
        
            function wdiv(uint256 a, uint256 b) internal pure returns (uint256) {
                return div(mul(a, WAD), b);
            }
        
            function wdivRound(uint256 a, uint256 b) internal pure returns (uint256) {
                return add(mul(a, WAD), b / 2) / b;
            }
        
            function rdiv(uint256 a, uint256 b) internal pure returns (uint256) {
                return div(mul(a, RAY), b);
            }
        
            function rdivRound(uint256 a, uint256 b) internal pure returns (uint256) {
                return add(mul(a, RAY), b / 2) / b;
            }
        
            function wpow(uint256 x, uint256 n) internal pure returns (uint256) {
                uint256 result = WAD;
                while (n > 0) {
                    if (n % 2 != 0) {
                        result = wmul(result, x);
                    }
                    x = wmul(x, x);
                    n /= 2;
                }
                return result;
            }
        
            function rpow(uint256 x, uint256 n) internal pure returns (uint256) {
                uint256 result = RAY;
                while (n > 0) {
                    if (n % 2 != 0) {
                        result = rmul(result, x);
                    }
                    x = rmul(x, x);
                    n /= 2;
                }
                return result;
            }
        
            function divCeil(uint256 a, uint256 b) internal pure returns (uint256) {
                uint256 quotient = div(a, b);
                uint256 remainder = a - quotient * b;
                if (remainder > 0) {
                    return quotient + 1;
                } else {
                    return quotient;
                }
            }
        }
        
        /**
         * @dev Collection of functions related to the address type
         */
        library Address {
            /**
             * @dev Returns true if `account` is a contract.
             *
             * [IMPORTANT]
             * ====
             * It is unsafe to assume that an address for which this function returns
             * false is an externally-owned account (EOA) and not a contract.
             *
             * Among others, `isContract` will return false for the following 
             * types of addresses:
             *
             *  - an externally-owned account
             *  - a contract in construction
             *  - an address where a contract will be created
             *  - an address where a contract lived, but was destroyed
             * ====
             */
            function isContract(address account) internal view returns (bool) {
                // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
                // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
                // for accounts without code, i.e. `keccak256('')`
                bytes32 codehash;
                bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
                // solhint-disable-next-line no-inline-assembly
                assembly { codehash := extcodehash(account) }
                return (codehash != accountHash && codehash != 0x0);
            }
        
            /**
             * @dev Converts an `address` into `address payable`. Note that this is
             * simply a type cast: the actual underlying value is not changed.
             *
             * _Available since v2.4.0._
             */
            function toPayable(address account) internal pure returns (address payable) {
                return payable(account);
            }
        
            /**
             * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
             * `recipient`, forwarding all available gas and reverting on errors.
             *
             * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
             * of certain opcodes, possibly making contracts go over the 2300 gas limit
             * imposed by `transfer`, making them unable to receive funds via
             * `transfer`. {sendValue} removes this limitation.
             *
             * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
             *
             * IMPORTANT: because control is transferred to `recipient`, care must be
             * taken to not create reentrancy vulnerabilities. Consider using
             * {ReentrancyGuard} or the
             * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
             *
             * _Available since v2.4.0._
             */
            function sendValue(address recipient, uint256 amount) internal {
                require(address(this).balance >= amount, "Address: insufficient balance");
        
                // solhint-disable-next-line avoid-call-value
                (bool success, ) = recipient.call{ value: amount }("");
                require(success, "Address: unable to send value, recipient may have reverted");
            }
        }
        
        /**
         * @title SafeERC20
         * @dev Wrappers around ERC20 operations that throw on failure (when the token
         * contract returns false). Tokens that return no value (and instead revert or
         * throw on failure) are also supported, non-reverting calls are assumed to be
         * successful.
         * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
         * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
         */
        library SafeERC20 {
            using SafeMath for uint256;
            using Address for address;
        
            function safeTransfer(IERC20 token, address to, uint256 value) internal {
                callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
            }
        
            function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
                callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
            }
        
            function safeApprove(IERC20 token, address spender, uint256 value) internal {
                // safeApprove should only be called when setting an initial allowance,
                // or when resetting it to zero. To increase and decrease it, use
                // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
                // solhint-disable-next-line max-line-length
                require((value == 0) || (token.allowance(address(this), spender) == 0),
                    "SafeERC20: approve from non-zero to non-zero allowance"
                );
                callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
            }
        
            function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
                uint256 newAllowance = token.allowance(address(this), spender).add(value);
                callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
            }
        
            function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
                uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
                callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
            }
        
            /**
             * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
             * on the return value: the return value is optional (but if data is returned, it must not be false).
             * @param token The token targeted by the call.
             * @param data The call data (encoded using abi.encode or one of its variants).
             */
            function callOptionalReturn(IERC20 token, bytes memory data) private {
                // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
                // we're implementing it ourselves.
        
                // A Solidity high level call has three parts:
                //  1. The target address is checked to verify it contains contract code
                //  2. The call itself is made, and success asserted
                //  3. The return value is decoded, which in turn checks the size of the returned data.
                // solhint-disable-next-line max-line-length
                require(address(token).isContract(), "SafeERC20: call to non-contract");
        
                // solhint-disable-next-line avoid-low-level-calls
                (bool success, bytes memory returndata) = address(token).call(data);
                require(success, "SafeERC20: low-level call failed");
        
                if (returndata.length > 0) { // Return data is optional
                    // solhint-disable-next-line max-line-length
                    require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
                }
            }
        }
        
        /// @title Handle authorizations in dex platform
        /// @notice Explain to an end user what this does
        /// @dev Explain to a developer any extra details
        contract TokenApprove is OwnableUpgradeable {
          using SafeERC20 for IERC20;
        
          address public tokenApproveProxy;
        
          function initialize(address _tokenApproveProxy) public initializer {
            __Ownable_init();
            tokenApproveProxy = _tokenApproveProxy;
          }
        
          //-------------------------------
          //------- Events ----------------
          //-------------------------------
        
          event ProxyUpdate(address indexed oldProxy, address indexed newProxy);
        
          //-------------------------------
          //------- Modifier --------------
          //-------------------------------
        
          //--------------------------------
          //------- Internal Functions -----
          //--------------------------------
        
          //---------------------------------
          //------- Admin functions ---------
          //---------------------------------
        
          function setApproveProxy(address _newTokenApproveProxy) external onlyOwner {
            tokenApproveProxy = _newTokenApproveProxy;
            emit ProxyUpdate(tokenApproveProxy, _newTokenApproveProxy);
          }
        
          //---------------------------------
          //-------  Users Functions --------
          //---------------------------------
        
          function claimTokens(
            address _token,
            address _who,
            address _dest,
            uint256 _amount
          ) external {
            require(msg.sender == tokenApproveProxy, "TokenApprove: Access restricted");
            if (_amount > 0) {
              IERC20(_token).safeTransferFrom(_who, _dest, _amount);
            }
          }
        }

        File 2 of 2: DOG
        /*
        
        Twitter - https://x.com/Dog_On_X                                               
        
        Tg - https://t.me/Dog_on_ETH                                                
        
        Web - https://dogoneth.xyz/
        
        */
        
        // SPDX-License-Identifier: MIT
        
        pragma solidity 0.8.25;
        
        abstract contract Context {
            function _msgSender() internal view virtual returns (address) {
                return msg.sender;
            }
        }
        
        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);
        }
        
        library SafeMath {
            function add(uint256 a, uint256 b) internal pure returns (uint256) {
                uint256 c = a + b;
                require(c >= a, "SafeMath: addition overflow");
                return c;
            }
        
            function sub(uint256 a, uint256 b) internal pure returns (uint256) {
                return sub(a, b, "SafeMath: subtraction overflow");
            }
        
            function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
                require(b <= a, errorMessage);
                uint256 c = a - b;
                return c;
            }
        
            function mul(uint256 a, uint256 b) internal pure returns (uint256) {
                if (a == 0) {
                    return 0;
                }
                uint256 c = a * b;
                require(c / a == b, "SafeMath: multiplication overflow");
                return c;
            }
        
            function div(uint256 a, uint256 b) internal pure returns (uint256) {
                return div(a, b, "SafeMath: division by zero");
            }
        
            function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
                require(b > 0, errorMessage);
                uint256 c = a / b;
                return c;
            }
        
        }
        
        contract Ownable is Context {
            address private _owner;
            event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
        
            constructor () {
                address msgSender = _msgSender();
                _owner = msgSender;
                emit OwnershipTransferred(address(0), msgSender);
            }
        
            function owner() public view returns (address) {
                return _owner;
            }
        
            modifier onlyOwner() {
                require(_owner == _msgSender(), "Ownable: caller is not the owner");
                _;
            }
        
            function renounceOwnership() public virtual onlyOwner {
                emit OwnershipTransferred(_owner, address(0));
                _owner = address(0);
            }
        
            function transferOwnership(address newOwner) public virtual onlyOwner {
                require(newOwner != address(0), "Ownable: new owner is the zero address");
                emit OwnershipTransferred(_owner, newOwner);
                _owner = newOwner;
            }
        }
        
        interface IUniswapV2Factory {
            function createPair(address tokenA, address tokenB) external returns (address pair);
        }
        
        interface IUniswapV2Router02 {
            function swapExactTokensForETHSupportingFeeOnTransferTokens(
                uint amountIn,
                uint amountOutMin,
                address[] calldata path,
                address to,
                uint deadline
            ) external;
            function factory() external pure returns (address);
            function WETH() external pure returns (address);
            function addLiquidityETH(
                address token,
                uint amountTokenDesired,
                uint amountTokenMin,
                uint amountETHMin,
                address to,
                uint deadline
            ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
        }
        
        contract DOG is Context, IERC20, Ownable {
            using SafeMath for uint256;
            mapping (address => uint256) private _balances;
            mapping (address => mapping (address => uint256)) private _allowances;
            mapping (address => bool) private isExile;
            mapping (address => bool) public marketPair;
            mapping (uint256 => uint256) private perBuyCount;
            address payable private _taxWallet;
            uint256 private firstBlock = 0;
        
            uint256 private _initialBuyTax=15;
            uint256 private _initialSellTax=15;
            uint256 private _finalBuyTax=0;
            uint256 private _finalSellTax=0;
        
            uint256 private _reduceBuyTaxAt=30;
        
            uint256 private _reduceSellTaxAt=35;
            uint256 private _preventSwapBefore=35;
            uint256 private _buyCount=0;
            uint256 private sellCount = 0;
            uint256 private lastSellBlock = 0;
        
            uint8 private constant _decimals = 9;
            uint256 private constant _tTotal = 420690000000 * 10**_decimals;
            string private constant _name = unicode"Dog";
            string private constant _symbol = unicode"DOG";
            uint256 public _maxTxAmount =   8413800000 * 10**_decimals;
            uint256 public _maxWalletSize = 8413800000 * 10**_decimals;
            uint256 public _taxSwapThreshold= 4206900000 * 10**_decimals;
            uint256 public _maxTaxSwap= 4206900000 * 10**_decimals;
        
            IUniswapV2Router02 private uniswapV2Router;
            address public uniswapV2Pair;
            bool private tradingOpen;
            uint256 private sellsPerBlock = 3;
            uint256 private buysFirstBlock = 21;
            bool private inSwap = false;
            bool private swapEnabled = false;
        
            event MaxTxAmountUpdated(uint _maxTxAmount);
            modifier lockTheSwap {
                inSwap = true;
                _;
                inSwap = false;
            }
        
            constructor () {
        
                _taxWallet = payable(_msgSender());
                _balances[_msgSender()] = _tTotal;
                isExile[owner()] = true;
                isExile[address(this)] = true;
                isExile[address(uniswapV2Pair)] = true;
                
                emit Transfer(address(0), _msgSender(), _tTotal);
        
                uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
                _approve(address(this), address(uniswapV2Router), _tTotal);
                uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
                marketPair[address(uniswapV2Pair)] = true;
                isExile[address(uniswapV2Pair)] = true;
            }
        
            function name() public pure returns (string memory) {
                return _name;
            }
        
            function symbol() public pure returns (string memory) {
                return _symbol;
            }
        
            function decimals() public pure returns (uint8) {
                return _decimals;
            }
        
            function totalSupply() public pure override returns (uint256) {
                return _tTotal;
            }
        
            function balanceOf(address account) public view override returns (uint256) {
                return _balances[account];
            }
        
            function transfer(address recipient, uint256 amount) public override returns (bool) {
                _transfer(_msgSender(), recipient, amount);
                return true;
            }
        
            function allowance(address owner, address spender) public view override returns (uint256) {
                return _allowances[owner][spender];
            }
        
            function approve(address spender, uint256 amount) public override returns (bool) {
                _approve(_msgSender(), spender, amount);
                return true;
            }
        
            function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
                _transfer(sender, recipient, amount);
                _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
                return true;
            }
        
            function _approve(address owner, address spender, uint256 amount) private {
                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 _transfer(address from, address to, uint256 amount) private {
                require(from != address(0), "ERC20: transfer from the zero address");
                require(to != address(0), "ERC20: transfer to the zero address");
                require(amount > 0, "Transfer amount must be greater than zero");
                uint256 taxAmount=0;
        
                if (from != owner() && to != owner()) {
                    taxAmount = amount.mul((_buyCount> _reduceBuyTaxAt)? _finalBuyTax: _initialBuyTax).div(100);
        
                    if(block.number == firstBlock){
                       require(perBuyCount[block.number] < buysFirstBlock, "Exceeds buys on the first block.");
                       perBuyCount[block.number]++;
                    }
        
                    if (marketPair[from] && to != address(uniswapV2Router) && ! isExile[to] ) {
                        require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
                        require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
                        _buyCount++;
                    }
        
                    if (!marketPair[to] && ! isExile[to]) {
                        require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
                    }
        
                    if(marketPair[to] && from!= address(this) ){
                        taxAmount = amount.mul((_buyCount> _reduceSellTaxAt)? _finalSellTax: _initialSellTax).div(100);
                    }
        
        	    if (!marketPair[from] && !marketPair[to] && from!= address(this) ) {
                        taxAmount = 0;
                    }
        
                    uint256 contractTokenBalance = balanceOf(address(this));
                    if (!inSwap && marketPair[to] && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
                        if (block.number > lastSellBlock) {
                            sellCount = 0;
                        }
                        require(sellCount < sellsPerBlock);
                        swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
                        uint256 contractETHBalance = address(this).balance;
                        if(contractETHBalance > 0) {
                            sendETHToFee(address(this).balance);
                        }
                        sellCount++;
                        lastSellBlock = block.number;
                    }
        
                    else if(!inSwap && marketPair[to] && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
                        swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
                        uint256 contractETHBalance = address(this).balance;
                        if(contractETHBalance > 0) {
                            sendETHToFee(address(this).balance);
                        }
                    }
                }
        
                if(taxAmount>0){
                  _balances[address(this)]=_balances[address(this)].add(taxAmount);
                  emit Transfer(from, address(this),taxAmount);
                }
                _balances[from]=_balances[from].sub(amount);
                _balances[to]=_balances[to].add(amount.sub(taxAmount));
                emit Transfer(from, to, amount.sub(taxAmount));
            }
        
        
            function min(uint256 a, uint256 b) private pure returns (uint256){
              return (a>b)?b:a;
            }
        
            function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
                address[] memory path = new address[](2);
                path[0] = address(this);
                path[1] = uniswapV2Router.WETH();
                _approve(address(this), address(uniswapV2Router), tokenAmount);
                uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
                    tokenAmount,
                    0,
                    path,
                    address(this),
                    block.timestamp
                );
            }
        
            function sendETHToFee(uint256 amount) private {
                _taxWallet.transfer(amount);
            }
        
            function rescueETH() external {
                require(_msgSender() == _taxWallet);
                payable(_taxWallet).transfer(address(this).balance);
            }
        
            function rescueTokens(address _tokenAddr, uint _amount) external {
                require(_msgSender() == _taxWallet);
                IERC20(_tokenAddr).transfer(_taxWallet, _amount);
            }
        
            function isNotRestricted() external onlyOwner{
                _maxTxAmount = _tTotal;
                _maxWalletSize=_tTotal;
                emit MaxTxAmountUpdated(_tTotal);
            }
        
            function enableTrading() external onlyOwner() {
                require(!tradingOpen,"trading is already open");
                uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
                IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
                swapEnabled = true;
                tradingOpen = true;
                firstBlock = block.number;
            }
        
            receive() external payable {}
        }