S Price: $0.067548 (-3.08%)
Gas: 55 Gwei

Contract

0x7993620E9F66cB7cEF1fFB755aa8Ad8df4A10207

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Transfer Ownersh...367427002025-07-01 17:22:25208 days ago1751390545IN
0x7993620E...df4A10207
0 S0.001661955.01
Toggle367359442025-07-01 16:09:33208 days ago1751386173IN
0x7993620E...df4A10207
0 S0.0026093655

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
509759692025-10-17 11:22:52100 days ago1760700172
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477861872025-09-22 15:18:41125 days ago1758554321
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477833632025-09-22 14:48:41125 days ago1758552521
0x7993620E...df4A10207
0 S
477804062025-09-22 14:18:41125 days ago1758550721
0x7993620E...df4A10207
0 S
477804062025-09-22 14:18:41125 days ago1758550721
0x7993620E...df4A10207
0 S
477804062025-09-22 14:18:41125 days ago1758550721
0x7993620E...df4A10207
0 S
477804062025-09-22 14:18:41125 days ago1758550721
0x7993620E...df4A10207
0 S
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x12c0D2E6...5c01d15d1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
WomoTreasury

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

import {IUniswapV2Pair} from "./interfaces/external/IUniswapV2Pair.sol";
import {IWomo} from "./interfaces/external/IWomo.sol";
import {TransferHelper} from "./libs/TransferHelper.sol";
import {LowGasSafeMath} from "./libs/LowGasSafeMath.sol";
import {FixedPoint} from "./libs/FixedPoint.sol";
import {UQ112x112} from "./libs/UQ112x112.sol";
import {FullMath} from "./libs/FullMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IERC20 {
    function decimals() external view returns (uint);
}

library UniswapV2Library {
    using LowGasSafeMath for uint;

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(
        uint amountA,
        uint reserveA,
        uint reserveB
    ) internal pure returns (uint amountB) {
        require(amountA > 0, "UniswapV2Library: INSUFFICIENT_AMOUNT");
        require(
            reserveA > 0 && reserveB > 0,
            "UniswapV2Library: INSUFFICIENT_LIQUIDITY"
        );
        amountB = amountA.mul(reserveB) / reserveA;
    }
}

contract WomoTreasury is Ownable {
    using LowGasSafeMath for uint;
    using FixedPoint for *;
    using UQ112x112 for uint224;

    event ChangeActivated(address activated, bool result);
    event ChangeLimitAmount(uint256 amount);
    event ReservesUpdated(uint indexed totalReserves);
    event Deposit(
        address indexed from,
        uint amount0,
        uint amount1,
        uint fragments
    );

    uint256 public PERIOD = 1 minutes;

    mapping(address => bool) public isLiquidityDepositor;

    IWomo public immutable womo;

    IUniswapV2Pair public immutable pair;
    address public token0;
    address public token1;

    uint public totalReserves; // Risk-free value of all assets
    bool private immutable womoIsToken0;

    PairInfo public pairInfo;

    struct PairInfo {
        uint256 reserveCumulativeLast0;
        uint256 reserveCumulativeLast1;
        uint32 blockTimestampLast;
        FixedPoint.uq112x112 priceAverage;
    }

    constructor(IWomo _womo, IUniswapV2Pair _pair) {
        womo = _womo;
        token0 = _pair.token0();
        token1 = _pair.token1();
        require(token0 == address(womo) || token1 == address(womo));
        womoIsToken0 = token0 == address(womo);
        pair = _pair;
        pair.sync();
        (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = pair
            .getReserves();

        require(reserve0 != 0 && reserve1 != 0, "IUniswapV2Pair: NO_RESERVES");

        (uint reserve0Cumulative, uint reserve1Cumulative, ) = pair
            .currentCumulativePrices();

        pairInfo.blockTimestampLast = blockTimestampLast;

        pairInfo.reserveCumulativeLast0 = reserve0Cumulative;

        pairInfo.reserveCumulativeLast1 = reserve1Cumulative;
        require(
            pairInfo.reserveCumulativeLast0 != 0 &&
                pairInfo.reserveCumulativeLast1 != 0,
            "IUniswapV2Pair: NO_RES_CUMULATIVE"
        );

        pairInfo.priceAverage = womoIsToken0
            ? FixedPoint.uq112x112(UQ112x112.encode(reserve1).uqdiv(reserve0))
            : FixedPoint.uq112x112(UQ112x112.encode(reserve0).uqdiv(reserve1));
    }

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, "UniswapV2Router: EXPIRED");
        _;
    }

    function _updateAvaragePrice() internal {
        uint32 blockTimestamp = uint32(block.timestamp % 2 ** 32);
        uint32 timeElapsed = blockTimestamp - pairInfo.blockTimestampLast;
        if (timeElapsed < PERIOD) {
            return;
        }
        pair.sync();

        (uint reserve0Cumulative, uint reserve1Cumulative, ) = pair
            .currentCumulativePrices();

        if (womoIsToken0) {
            pairInfo.priceAverage = FixedPoint.uq112x112(
                uint224(
                    (((reserve1Cumulative - pairInfo.reserveCumulativeLast1) /
                        timeElapsed) * (2 ** 112)) /
                        ((reserve0Cumulative -
                            pairInfo.reserveCumulativeLast0) / timeElapsed)
                )
            );
        } else {
            pairInfo.priceAverage = FixedPoint.uq112x112(
                uint224(
                    (((reserve0Cumulative - pairInfo.reserveCumulativeLast0) /
                        timeElapsed) * (2 ** 112)) /
                        ((reserve1Cumulative -
                            pairInfo.reserveCumulativeLast1) / timeElapsed)
                )
            );
        }

        pairInfo.reserveCumulativeLast0 = reserve0Cumulative;
        pairInfo.reserveCumulativeLast1 = reserve1Cumulative;
        pairInfo.blockTimestampLast = blockTimestamp;
    }

    function getReadablePrice() external view returns (uint) {
        uint decimals;
        if (womoIsToken0) {
            decimals = IERC20(pair.token1()).decimals();
        } else {
            decimals = IERC20(pair.token0()).decimals();
        }
        return (uint(pairInfo.priceAverage._x) * 10 ** decimals) / (2 ** 112);
    }

    function valueOf(
        uint amountADesired,
        uint amountBDesired
    ) public view returns (uint value) {
        uint224 rawPrice = pairInfo.priceAverage._x;
        require(rawPrice > 0, "Invalid price");
        uint256 price18 = FullMath.mulDiv(uint256(rawPrice), 1e18, 2 ** 112);

        if (womoIsToken0) {
            value =
                amountADesired +
                FullMath.mulDiv(amountBDesired, 1e18, price18);
        } else {
            value =
                amountBDesired +
                FullMath.mulDiv(amountADesired, 1e18, price18);
        }
    }

    function getOptimalAmounts(
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal view returns (uint amountA, uint amountB) {
        (uint reserveA, uint reserveB, ) = pair.getReserves();
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = UniswapV2Library.quote(
                amountADesired,
                reserveA,
                reserveB
            );
            if (amountBOptimal <= amountBDesired) {
                require(
                    amountBOptimal >= amountBMin,
                    "UniswapV2Router: INSUFFICIENT_B_AMOUNT"
                );
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = UniswapV2Library.quote(
                    amountBDesired,
                    reserveB,
                    reserveA
                );
                assert(amountAOptimal <= amountADesired);
                require(
                    amountAOptimal >= amountAMin,
                    "UniswapV2Router: INSUFFICIENT_A_AMOUNT"
                );
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }

    function addLiquidity(
        address _from,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        uint deadline
    )
        internal
        ensure(deadline)
        returns (uint amountA, uint amountB, uint liquidity)
    {
        require(
            amountADesired >= amountAMin && amountBDesired >= amountBMin,
            "ANA"
        );
        (amountA, amountB) = getOptimalAmounts(
            amountADesired,
            amountBDesired,
            amountAMin,
            amountBMin
        );
        TransferHelper.safeTransferFrom(token0, _from, address(pair), amountA);
        TransferHelper.safeTransferFrom(token1, _from, address(pair), amountB);
        liquidity = IUniswapV2Pair(pair).mint(address(this));
    }

    function deposit(
        address _from,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        uint deadline
    ) external returns (uint fragments) {
        require(isLiquidityDepositor[msg.sender], "Not approved");
        _updateAvaragePrice();
        (uint amount0, uint amount1, ) = addLiquidity(
            _from,
            amountADesired,
            amountBDesired,
            amountAMin,
            amountBMin,
            deadline
        );
        fragments = valueOf(amount0, amount1);
        totalReserves = totalReserves.add(fragments);
        emit ReservesUpdated(totalReserves);
        emit Deposit(_from, amount0, amount1, fragments);
    }

    function removeLiquidity(
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) internal ensure(deadline) returns (uint amountA, uint amountB) {
        pair.transfer(address(pair), liquidity); // send liquidity to pair
        (amountA, amountB) = IUniswapV2Pair(pair).burn(to);
        require(
            amountA >= amountAMin,
            "UniswapV2Router: INSUFFICIENT_A_AMOUNT"
        );
        require(
            amountB >= amountBMin,
            "UniswapV2Router: INSUFFICIENT_B_AMOUNT"
        );
    }

    function withdraw(
        address to,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        uint deadline
    ) external onlyOwner returns (uint256 amount0, uint256 amount1) {
        uint balance = pair.balanceOf(address(this));
        require(liquidity > 0 && liquidity <= balance);
        (amount0, amount1) = removeLiquidity(
            liquidity,
            amountAMin,
            amountBMin,
            to,
            deadline
        );
    }

    function toggle(address _address) external onlyOwner returns (bool) {
        require(_address != address(0), "IA");
        bool result;

        result = !isLiquidityDepositor[_address];
        isLiquidityDepositor[_address] = result;

        emit ChangeActivated(_address, result);
        return true;
    }

    function setUpdatePeriod(uint256 _period) external onlyOwner {
        require(_period >= 5 minutes, "TTS");
        PERIOD = _period;
    }

    // Rescue tokens
    function rescueTokens(
        address token,
        address to,
        uint256 amount
    ) public onlyOwner returns (bool) {
        // transfer to
        TransferHelper.safeTransfer(token, to, amount);
        return true;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IUniswapV2Pair {
    struct Observation {
        uint256 timestamp;
        uint256 reserve0Cumulative;
        uint256 reserve1Cumulative;
    }

    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);

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

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint);

    function fee() 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);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint);

    function permit(
        address owner,
        address spender,
        uint value,
        uint deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(
        address indexed sender,
        uint amount0,
        uint amount1,
        address indexed to
    );
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function price0CumulativeLast() external view returns (uint);

    function price1CumulativeLast() external view returns (uint);

    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);

    function burn(address to) external returns (uint amount0, uint amount1);

    function swap(
        uint amount0Out,
        uint amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;

    function currentCumulativePrices()
        external
        view
        returns (
            uint256 reserve0Cumulative,
            uint256 reserve1Cumulative,
            uint256 blockTimestamp
        );

    function lastObservation() external view returns (Observation memory);

    /// SHADOW V2 ONLY
    function getAmountOut(
        uint amountIn,
        address tokenIn
    ) external view returns (uint amountOut);
}

//SPDX-License-Identifier: UNLICENSE
pragma solidity >=0.5.0;

interface IWomo {
    function rebase(
        uint256 epoch,
        uint256 indexDelta,
        bool positive
    ) external returns (uint256);

    function totalSupply() external view returns (uint256);

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

    function tokensScalingFactor() external view returns (uint256);

    function mint(address to, uint256 amount) external;

    function mintUnderlying(address to, uint256 amount) external;

    function transferUnderlying(
        address to,
        uint256 value
    ) external returns (bool);

    function fragmentToToken(uint256 value) external view returns (uint256);

    function tokenToFragment(uint256 token) external view returns (uint256);

    function balanceOfUnderlying(address who) external view returns (uint256);

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

    function approve(address to, uint amount) external;

    function grantRole(bytes32 role, address account) external;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./FullMath.sol";

library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint256 _x;
    }

    uint8 private constant RESOLUTION = 112;
    uint256 private constant Q112 = 0x10000000000000000000000000000;
    uint256 private constant Q224 =
        0x100000000000000000000000000000000000000000000000000000000;
    uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }

    // multiply a UQ112x112 by a uint256, returning a UQ144x112
    // reverts on overflow
    function mul(
        uq112x112 memory self,
        uint256 y
    ) internal pure returns (uq144x112 memory) {
        uint256 z = 0;
        require(
            y == 0 || (z = self._x * y) / y == self._x,
            "FixedPoint::mul: overflow"
        );
        return uq144x112(z);
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // lossy if either numerator or denominator is greater than 112 bits
    function fraction(
        uint256 numerator,
        uint256 denominator
    ) internal pure returns (uq112x112 memory) {
        require(denominator > 0, "FixedPoint::fraction: div by 0");
        if (numerator == 0) return FixedPoint.uq112x112(0);

        if (numerator <= type(uint144).max) {
            uint256 result = (numerator << RESOLUTION) / denominator;
            require(
                result <= type(uint224).max,
                "FixedPoint::fraction: overflow"
            );
            return uq112x112(uint224(result));
        } else {
            uint256 result = FullMath.mulDiv(numerator, Q112, denominator);
            require(
                result <= type(uint224).max,
                "FixedPoint::fraction: overflow"
            );
            return uq112x112(uint224(result));
        }
    }
}

File 8 of 11 : FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = a * b
            // Compute the product mod 2**256 and mod 2**256 - 1
            // then use the Chinese Remainder Theorem to reconstruct
            // the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2**256 + prod0
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(a, b, not(0))
                prod0 := mul(a, b)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division
            if (prod1 == 0) {
                require(denominator > 0);
                assembly {
                    result := div(prod0, denominator)
                }
                return result;
            }

            // Make sure the result is less than 2**256.
            // Also prevents denominator == 0
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0]
            // Compute remainder using mulmod
            uint256 remainder;
            assembly {
                remainder := mulmod(a, b, denominator)
            }
            // Subtract 256 bit number from 512 bit number
            assembly {
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator
            // Compute largest power of two divisor of denominator.
            // Always >= 1.
            // EDIT for 0.8 compatibility:
            // see: https://ethereum.stackexchange.com/questions/96642/unary-operator-cannot-be-applied-to-type-uint256
            uint256 twos = denominator & (~denominator + 1);

            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

library LowGasSafeMath {
    /// @notice Returns x + y, reverts if sum overflows uint256
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x);
    }

    function add32(uint32 x, uint32 y) internal pure returns (uint32 z) {
        require((z = x + y) >= x);
    }

    /// @notice Returns x - y, reverts if underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x);
    }

    function sub32(uint32 x, uint32 y) internal pure returns (uint32 z) {
        require((z = x - y) <= x);
    }

    /// @notice Returns x * y, reverts if overflows
    /// @param x The multiplicand
    /// @param y The multiplier
    /// @return z The product of x and y
    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(x == 0 || (z = x * y) / x == y);
    }

    /// @notice Returns x + y, reverts if overflows or underflows
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x + y) >= x == (y >= 0));
    }

    /// @notice Returns x - y, reverts if overflows or underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x - y) <= x == (y >= 0));
    }
}

// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(
                IERC20.transferFrom.selector,
                from,
                to,
                value
            )
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "STF"
        );
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(address token, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "ST"
        );
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(address token, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "SA"
        );
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

library UQ112x112 {
    uint224 constant Q112 = 2 ** 112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IWomo","name":"_womo","type":"address"},{"internalType":"contract IUniswapV2Pair","name":"_pair","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"activated","type":"address"},{"indexed":false,"internalType":"bool","name":"result","type":"bool"}],"name":"ChangeActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ChangeLimitAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fragments","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"totalReserves","type":"uint256"}],"name":"ReservesUpdated","type":"event"},{"inputs":[],"name":"PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"fragments","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReadablePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLiquidityDepositor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairInfo","outputs":[{"internalType":"uint256","name":"reserveCumulativeLast0","type":"uint256"},{"internalType":"uint256","name":"reserveCumulativeLast1","type":"uint256"},{"internalType":"uint32","name":"blockTimestampLast","type":"uint32"},{"components":[{"internalType":"uint224","name":"_x","type":"uint224"}],"internalType":"struct FixedPoint.uq112x112","name":"priceAverage","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setUpdatePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"toggle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"}],"name":"valueOf","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"womo","outputs":[{"internalType":"contract IWomo","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

0x60e060409080825234620004f8575f90828162001bd080380380916200002682856200052c565b833981010312620004785780516001600160a01b03928382168203620004f55760208093015184811690818103620004f15782546001600160a01b0319808216339081178655895196919289167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08780a3603c600155608052630dfe168160e01b855260049486818781875afa908115620004e7579088918691620004c5575b501680826003541617600355885163d21220a760e01b815287818881885afa908115620004bb57908991879162000487575b50168092875416178655876080511680911490819282156200047c575b5050156200042d5760c05260a052803b1562000478578180918488518094819363fff6cae960e01b83525af180156200046e5762000443575b50908360a051169285518094630240bc6b60e21b8252818460609384935afa80156200043957849685968692620003cd575b506001600160701b0388811615159081620003c0575b50156200037d57908285939260a051168a5194858092631df8c71760e01b82525afa9283156200037357869287946200032f575b505063ffffffff1663ffffffff19600854161760085580600655816007551515908162000324575b5015620002d857505060c051159050620002aa5790620002166200021c9262000586565b620005ca565b8151906200022a82620004fc565b6001600160e01b031681525b60018060e01b0390511663ffffffff60e01b6009541617600955516115d19081620005ff82396080518161038f015260a0518181816103f2015281816105a8015281816108b501528181610b7801528181610c980152610f6a015260c051818181610b3601528181610eb80152610fea0152f35b62000216620002b99262000586565b815190620002c782620004fc565b6001600160e01b0316815262000236565b855162461bcd60e51b815291820152602160248201527f49556e69737761705632506169723a204e4f5f5245535f43554d554c415449566044820152604560f81b606482015260849150fd5b905015155f620001f2565b809294508193503d83116200036b575b6200034b81836200052c565b8101031262000367578051908301519163ffffffff5f620001ca565b8480fd5b503d6200033f565b89513d88823e3d90fd5b885162461bcd60e51b8152808601859052601b60248201527f49556e69737761705632506169723a204e4f5f524553455256455300000000006044820152606490fd5b9050871615155f62000196565b97509550508086813d831162000431575b620003ea81836200052c565b810103126200042d57620003fe8662000571565b94876200040d84890162000571565b9701519563ffffffff8716870362000429579695905f62000180565b8580fd5b8380fd5b503d620003de565b87513d86823e3d90fd5b6001600160401b0381116200045b5785525f6200014e565b506041602492634e487b7160e01b835252fd5b86513d84823e3d90fd5b5080fd5b1490505f8062000115565b620004ac9150893d8b11620004b3575b620004a381836200052c565b81019062000550565b5f620000f8565b503d62000497565b8a513d88823e3d90fd5b620004e09150883d8a11620004b357620004a381836200052c565b5f620000c6565b89513d87823e3d90fd5b8280fd5b80fd5b5f80fd5b602081019081106001600160401b038211176200051857604052565b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176200051857604052565b90816020910312620004f857516001600160a01b0381168103620004f85790565b51906001600160701b0382168203620004f857565b607081901b600160701b600160e01b0316906001600160701b03168015908204600160701b141715620005b65790565b634e487b7160e01b5f52601160045260245ffd5b6001600160701b03909116908115620005ea576001600160e01b03160490565b634e487b7160e01b5f52601260045260245ffdfe6080604081815260049182361015610015575f80fd5b5f92833560e01c9182630dfe168114610d415750816313d77aba14610b22578163588f9acc14610a7057816364095b4f1461086d5781636cfa22931461052a578163715018a6146104d057816375bedf12146104a65781638da5cb5b1461047e5781638f840ddd1461045f578163a1210a2d14610421578163a8aa1b31146103dd578163b4d1d795146103be578163c899bb481461037a578163cea9d26f1461028c578163d21220a714610264578163e55fae771461020c578163f2fde38b14610145575063fc2a5b1d146100e8575f80fd5b34610141578160031936011261014157608090600654906007549063ffffffff6008541681519161011883610d80565b6009546001600160e01b0390811684528151958652602086019490945284015251166060820152f35b5080fd5b90503461020857602036600319011261020857610160610d66565b90610169610dd2565b6001600160a01b039182169283156101b657505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b9050346102085760203660031901126102085780359161022a610dd2565b61012c831061023b57505060015580f35b906020606492519162461bcd60e51b8352820152600360248201526254545360e81b6044820152fd5b9050346102085782600319360112610208575490516001600160a01b03909116815260209150f35b90508234610377576060366003190112610377576102a8610d66565b6024356001600160a01b0381168103610208579082916102c6610dd2565b855163a9059cbb60e01b602082019081526001600160a01b039290921660248201526044803581830152815283906102ff606482610db0565b51925af161030b61148f565b81610348575b5015610321576020825160018152f35b6020606492519162461bcd60e51b8352820152600260248201526114d560f21b6044820152fd5b805180159250821561035d575b505083610311565b610370925060208091830101910161139d565b8380610355565b80fd5b505034610141578160031936011261014157517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5050346101415781600319360112610141576020906001549051908152f35b505034610141578160031936011261014157517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5050346101415760203660031901126101415760209160ff9082906001600160a01b0361044c610d66565b1681526002855220541690519015158152f35b5050346101415781600319360112610141576020906005549051908152f35b505034610141578160031936011261014157905490516001600160a01b039091168152602090f35b828434610377578160031936011261037757506104c96020926024359035610e9a565b9051908152f35b83346103775780600319360112610377576104e9610dd2565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b919050346102085760c036600319011261020857610546610d66565b926024359360443590606435956084353385526020976002895260ff87872054161561083b57610574610f42565b6105824260a43510156111a3565b8083101580610831575b15610808578651630240bc6b60e21b81526001600160a01b03957f000000000000000000000000000000000000000000000000000000000000000087169391929091906060848c81885afa9384156107fe5791899593918d959387908895610792575b506001600160701b03948516941680158061078a575b1561071b575050506024915094995b6106248b84898b600354166114ce565b6106338684898b8554166114ce565b895194859384926335313c2160e11b845230908401525af18015610711579088916106e4575b50506106658187610e9a565b956005546106738882610e8d565b9081106106e0579160609391837f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e96946005557f93bb8edd35984706eee1b92541281f7f62d33c01c5b2ec0929a113603bd21d6689519880a286528886015286868601521692a251908152f35b8580fd5b813d831161070a575b6106f78183610db0565b8101031261070657865f610659565b8380fd5b503d6106ed565b86513d87823e3d90fd5b61072985828b9695966112b4565b9483861161074b575050505090610744602492821015611259565b9499610614565b929650925093955061075e9250846112b4565b938411610777579160248a9261074489958710156111fe565b634e487b7160e01b875260018952602487fd5b508415610605565b9650509193955091506060843d82116107f6575b816107b360609383610db0565b810103126107f2578b8a6107d16107c9876111ea565b9287016111ea565b95015163ffffffff8116036107ee5791899593918d95935f6105ef565b8980fd5b8880fd5b3d91506107a6565b8a513d8b823e3d90fd5b865162461bcd60e51b81528089018a90526003602482015262414e4160e81b6044820152606490fd5b508185101561058c565b865162461bcd60e51b81528089018a9052600c60248201526b139bdd08185c1c1c9bdd995960a21b6044820152606490fd5b839150346101415760a036600319011261014157610889610d66565b60243590610895610dd2565b84516370a0823160e01b815230848201526020926001600160a01b0392917f0000000000000000000000000000000000000000000000000000000000000000841691908581602481865afa908115610a66578891610a35575b508115159081610a2a575b5015610a265784610943916109124260843510156111a3565b895163a9059cbb60e01b81526001600160a01b03851689820190815260208101929092529283918291604090910190565b03818a865af18015610a1c576024928995949289926109ef575b508551978895869463226bf2d160e21b865216908401525af19182156109e5578380936109ad575b50506109956044358410156111fe565b6109a3606435831015611259565b8351928352820152f35b91925092508383813d83116109de575b6109c78183610db0565b810103126103775750808251920151908480610985565b503d6109bd565b84513d85823e3d90fd5b610a0e90883d8a11610a15575b610a068183610db0565b81019061139d565b508a61095d565b503d6109fc565b88513d89823e3d90fd5b8680fd5b9050811115896108f9565b90508581813d8311610a5f575b610a4c8183610db0565b81010312610a5b5751896108ee565b8780fd5b503d610a42565b89513d8a823e3d90fd5b9050823461037757602036600319011261037757610a8c610d66565b610a94610dd2565b6001600160a01b0316918215610afa576020847f86c85a76b94c689f6ffe9d0b8447c0040ff7aa88abfe4336e1904ab53ea83f4881868187828152600287522080549060ff8216159160ff83169060ff1916179055825191825285820152a15160018152f35b606490602085519162461bcd60e51b83528201526002602482015261494160f01b6044820152fd5b8284346103775780600319360112610377577f000000000000000000000000000000000000000000000000000000000000000015610c7a57815163d21220a760e01b81526020906001600160a01b0390828187817f000000000000000000000000000000000000000000000000000000000000000086165afa908115610c70579083918591610c43575b508686518094819363313ce56760e01b8352165afa9182156109e5578392610c15575b50505b6009546001600160e01b031691604d8211610c0257602084610bf88585600a0a90610e48565b60701c9051908152f35b634e487b7160e01b815260118552602490fd5b90809250813d8311610c3c575b610c2c8183610db0565b8101031261014157518480610bcf565b503d610c22565b610c639150823d8411610c69575b610c5b8183610db0565b810190610e29565b87610bac565b503d610c51565b85513d86823e3d90fd5b8151630dfe168160e01b81526020906001600160a01b0390828187817f000000000000000000000000000000000000000000000000000000000000000086165afa908115610c70579083918591610d24575b508686518094819363313ce56760e01b8352165afa9182156109e5578392610cf6575b5050610bd2565b90809250813d8311610d1d575b610d0d8183610db0565b8101031261014157518480610cef565b503d610d03565b610d3b9150823d8411610c6957610c5b8183610db0565b87610ccc565b8490346101415781600319360112610141576003546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d7c57565b5f80fd5b6020810190811067ffffffffffffffff821117610d9c57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff821117610d9c57604052565b5f546001600160a01b03163303610de557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90816020910312610d7c57516001600160a01b0381168103610d7c5790565b81810292918115918404141715610e5b57565b634e487b7160e01b5f52601160045260245ffd5b8115610e79570490565b634e487b7160e01b5f52601260045260245ffd5b91908201809211610e5b57565b6009546001600160e01b03168015610f0057610eb5906113b5565b917f000000000000000000000000000000000000000000000000000000000000000015610ef257610eef92610ee991611403565b90610e8d565b90565b90610eef92610ee991611403565b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420707269636560981b6044820152606490fd5b91908203918211610e5b57565b5f63ffffffff9081421691806008541683039080821161118f57600154911690811061118a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b1561020857604091825163fff6cae960e01b8152848160048183865af1801561118057611150575b5090606083926004945194858092631df8c71760e01b82525afa938415611145578093819561110b575b507f0000000000000000000000000000000000000000000000000000000000000000156110a5576110238261101e60075488610f35565b610e6f565b908160701b91808304600160701b1490151715611091575061105c9061105660018060e01b039361101e60065488610f35565b90610e6f565b1680915161106981610d80565b5263ffffffff60e01b60095416176009555b60065560075563ffffffff196008541617600855565b634e487b7160e01b81526011600452602490fd5b6110b58261101e60065487610f35565b908160701b91808304600160701b149015171561109157506110e89061105660018060e01b039361101e60075489610f35565b168091516110f581610d80565b5263ffffffff60e01b600954161760095561107b565b935093506060833d821161113d575b8161112760609383610db0565b810103126107065760208351930151935f610fe7565b3d915061111a565b8251903d90823e3d90fd5b67ffffffffffffffff819592951161116c578352926060610fbd565b634e487b7160e01b82526041600452602482fd5b84513d87823e3d90fd5b505050565b634e487b7160e01b83526011600452602483fd5b156111aa57565b60405162461bcd60e51b8152602060048201526018602482015277155b9a5cddd85c158c949bdd5d195c8e881156141254915160421b6044820152606490fd5b51906001600160701b0382168203610d7c57565b1561120557565b60405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f415f604482015265105353d5539560d21b6064820152608490fd5b1561126057565b60405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f425f604482015265105353d5539560d21b6064820152608490fd5b91821561134a5781151580611341575b156112eb576112dd6112d68285610e48565b9384610e6f565b03610d7c57610eef91610e6f565b60405162461bcd60e51b815260206004820152602860248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604482015267495155494449545960c01b6064820152608490fd5b508015156112c4565b60405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608490fd5b90816020910312610d7c57518015158103610d7c5790565b670de0b6b3a7640000905f1982820990828102928380841093039280840393146113fa57600160701b9183831115610d7c570990828211900360901b910360701c1790565b50505060701c90565b90670de0b6b3a7640000905f1982840992828102928380861095039480860395146114815784831115610d7c5782910960018219018216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b505080925015610d7c570490565b3d156114c9573d9067ffffffffffffffff8211610d9c57604051916114be601f8201601f191660200184610db0565b82523d5f602084013e565b606090565b6040516323b872dd60e01b602082019081526001600160a01b03938416602483015292909316604484015260648084019490945292825260a08201929067ffffffffffffffff841183851017610d9c575f809493819460405251925af161153361148f565b8161156c575b501561154157565b60405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606490fd5b8051801592508215611581575b50505f611539565b611594925060208091830101910161139d565b5f8061157956fea2646970667358221220d91cd501a0640a8a525e52ea86a46db26ee0f53a2a0b0e1a0798980d23af7d2664736f6c634300081400330000000000000000000000003e08cb3067dc198fc313e1789347c9ae72c079d40000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf

Deployed Bytecode

0x6080604081815260049182361015610015575f80fd5b5f92833560e01c9182630dfe168114610d415750816313d77aba14610b22578163588f9acc14610a7057816364095b4f1461086d5781636cfa22931461052a578163715018a6146104d057816375bedf12146104a65781638da5cb5b1461047e5781638f840ddd1461045f578163a1210a2d14610421578163a8aa1b31146103dd578163b4d1d795146103be578163c899bb481461037a578163cea9d26f1461028c578163d21220a714610264578163e55fae771461020c578163f2fde38b14610145575063fc2a5b1d146100e8575f80fd5b34610141578160031936011261014157608090600654906007549063ffffffff6008541681519161011883610d80565b6009546001600160e01b0390811684528151958652602086019490945284015251166060820152f35b5080fd5b90503461020857602036600319011261020857610160610d66565b90610169610dd2565b6001600160a01b039182169283156101b657505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b9050346102085760203660031901126102085780359161022a610dd2565b61012c831061023b57505060015580f35b906020606492519162461bcd60e51b8352820152600360248201526254545360e81b6044820152fd5b9050346102085782600319360112610208575490516001600160a01b03909116815260209150f35b90508234610377576060366003190112610377576102a8610d66565b6024356001600160a01b0381168103610208579082916102c6610dd2565b855163a9059cbb60e01b602082019081526001600160a01b039290921660248201526044803581830152815283906102ff606482610db0565b51925af161030b61148f565b81610348575b5015610321576020825160018152f35b6020606492519162461bcd60e51b8352820152600260248201526114d560f21b6044820152fd5b805180159250821561035d575b505083610311565b610370925060208091830101910161139d565b8380610355565b80fd5b505034610141578160031936011261014157517f0000000000000000000000003e08cb3067dc198fc313e1789347c9ae72c079d46001600160a01b03168152602090f35b5050346101415781600319360112610141576020906001549051908152f35b505034610141578160031936011261014157517f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf6001600160a01b03168152602090f35b5050346101415760203660031901126101415760209160ff9082906001600160a01b0361044c610d66565b1681526002855220541690519015158152f35b5050346101415781600319360112610141576020906005549051908152f35b505034610141578160031936011261014157905490516001600160a01b039091168152602090f35b828434610377578160031936011261037757506104c96020926024359035610e9a565b9051908152f35b83346103775780600319360112610377576104e9610dd2565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b919050346102085760c036600319011261020857610546610d66565b926024359360443590606435956084353385526020976002895260ff87872054161561083b57610574610f42565b6105824260a43510156111a3565b8083101580610831575b15610808578651630240bc6b60e21b81526001600160a01b03957f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf87169391929091906060848c81885afa9384156107fe5791899593918d959387908895610792575b506001600160701b03948516941680158061078a575b1561071b575050506024915094995b6106248b84898b600354166114ce565b6106338684898b8554166114ce565b895194859384926335313c2160e11b845230908401525af18015610711579088916106e4575b50506106658187610e9a565b956005546106738882610e8d565b9081106106e0579160609391837f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e96946005557f93bb8edd35984706eee1b92541281f7f62d33c01c5b2ec0929a113603bd21d6689519880a286528886015286868601521692a251908152f35b8580fd5b813d831161070a575b6106f78183610db0565b8101031261070657865f610659565b8380fd5b503d6106ed565b86513d87823e3d90fd5b61072985828b9695966112b4565b9483861161074b575050505090610744602492821015611259565b9499610614565b929650925093955061075e9250846112b4565b938411610777579160248a9261074489958710156111fe565b634e487b7160e01b875260018952602487fd5b508415610605565b9650509193955091506060843d82116107f6575b816107b360609383610db0565b810103126107f2578b8a6107d16107c9876111ea565b9287016111ea565b95015163ffffffff8116036107ee5791899593918d95935f6105ef565b8980fd5b8880fd5b3d91506107a6565b8a513d8b823e3d90fd5b865162461bcd60e51b81528089018a90526003602482015262414e4160e81b6044820152606490fd5b508185101561058c565b865162461bcd60e51b81528089018a9052600c60248201526b139bdd08185c1c1c9bdd995960a21b6044820152606490fd5b839150346101415760a036600319011261014157610889610d66565b60243590610895610dd2565b84516370a0823160e01b815230848201526020926001600160a01b0392917f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf841691908581602481865afa908115610a66578891610a35575b508115159081610a2a575b5015610a265784610943916109124260843510156111a3565b895163a9059cbb60e01b81526001600160a01b03851689820190815260208101929092529283918291604090910190565b03818a865af18015610a1c576024928995949289926109ef575b508551978895869463226bf2d160e21b865216908401525af19182156109e5578380936109ad575b50506109956044358410156111fe565b6109a3606435831015611259565b8351928352820152f35b91925092508383813d83116109de575b6109c78183610db0565b810103126103775750808251920151908480610985565b503d6109bd565b84513d85823e3d90fd5b610a0e90883d8a11610a15575b610a068183610db0565b81019061139d565b508a61095d565b503d6109fc565b88513d89823e3d90fd5b8680fd5b9050811115896108f9565b90508581813d8311610a5f575b610a4c8183610db0565b81010312610a5b5751896108ee565b8780fd5b503d610a42565b89513d8a823e3d90fd5b9050823461037757602036600319011261037757610a8c610d66565b610a94610dd2565b6001600160a01b0316918215610afa576020847f86c85a76b94c689f6ffe9d0b8447c0040ff7aa88abfe4336e1904ab53ea83f4881868187828152600287522080549060ff8216159160ff83169060ff1916179055825191825285820152a15160018152f35b606490602085519162461bcd60e51b83528201526002602482015261494160f01b6044820152fd5b8284346103775780600319360112610377577f000000000000000000000000000000000000000000000000000000000000000015610c7a57815163d21220a760e01b81526020906001600160a01b0390828187817f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf86165afa908115610c70579083918591610c43575b508686518094819363313ce56760e01b8352165afa9182156109e5578392610c15575b50505b6009546001600160e01b031691604d8211610c0257602084610bf88585600a0a90610e48565b60701c9051908152f35b634e487b7160e01b815260118552602490fd5b90809250813d8311610c3c575b610c2c8183610db0565b8101031261014157518480610bcf565b503d610c22565b610c639150823d8411610c69575b610c5b8183610db0565b810190610e29565b87610bac565b503d610c51565b85513d86823e3d90fd5b8151630dfe168160e01b81526020906001600160a01b0390828187817f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf86165afa908115610c70579083918591610d24575b508686518094819363313ce56760e01b8352165afa9182156109e5578392610cf6575b5050610bd2565b90809250813d8311610d1d575b610d0d8183610db0565b8101031261014157518480610cef565b503d610d03565b610d3b9150823d8411610c6957610c5b8183610db0565b87610ccc565b8490346101415781600319360112610141576003546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d7c57565b5f80fd5b6020810190811067ffffffffffffffff821117610d9c57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff821117610d9c57604052565b5f546001600160a01b03163303610de557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90816020910312610d7c57516001600160a01b0381168103610d7c5790565b81810292918115918404141715610e5b57565b634e487b7160e01b5f52601160045260245ffd5b8115610e79570490565b634e487b7160e01b5f52601260045260245ffd5b91908201809211610e5b57565b6009546001600160e01b03168015610f0057610eb5906113b5565b917f000000000000000000000000000000000000000000000000000000000000000015610ef257610eef92610ee991611403565b90610e8d565b90565b90610eef92610ee991611403565b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420707269636560981b6044820152606490fd5b91908203918211610e5b57565b5f63ffffffff9081421691806008541683039080821161118f57600154911690811061118a577f0000000000000000000000001844f04a2e2f0aef0f72ba3ef9d94ac9b07fa8bf6001600160a01b031690813b1561020857604091825163fff6cae960e01b8152848160048183865af1801561118057611150575b5090606083926004945194858092631df8c71760e01b82525afa938415611145578093819561110b575b507f0000000000000000000000000000000000000000000000000000000000000000156110a5576110238261101e60075488610f35565b610e6f565b908160701b91808304600160701b1490151715611091575061105c9061105660018060e01b039361101e60065488610f35565b90610e6f565b1680915161106981610d80565b5263ffffffff60e01b60095416176009555b60065560075563ffffffff196008541617600855565b634e487b7160e01b81526011600452602490fd5b6110b58261101e60065487610f35565b908160701b91808304600160701b149015171561109157506110e89061105660018060e01b039361101e60075489610f35565b168091516110f581610d80565b5263ffffffff60e01b600954161760095561107b565b935093506060833d821161113d575b8161112760609383610db0565b810103126107065760208351930151935f610fe7565b3d915061111a565b8251903d90823e3d90fd5b67ffffffffffffffff819592951161116c578352926060610fbd565b634e487b7160e01b82526041600452602482fd5b84513d87823e3d90fd5b505050565b634e487b7160e01b83526011600452602483fd5b156111aa57565b60405162461bcd60e51b8152602060048201526018602482015277155b9a5cddd85c158c949bdd5d195c8e881156141254915160421b6044820152606490fd5b51906001600160701b0382168203610d7c57565b1561120557565b60405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f415f604482015265105353d5539560d21b6064820152608490fd5b1561126057565b60405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f425f604482015265105353d5539560d21b6064820152608490fd5b91821561134a5781151580611341575b156112eb576112dd6112d68285610e48565b9384610e6f565b03610d7c57610eef91610e6f565b60405162461bcd60e51b815260206004820152602860248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604482015267495155494449545960c01b6064820152608490fd5b508015156112c4565b60405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608490fd5b90816020910312610d7c57518015158103610d7c5790565b670de0b6b3a7640000905f1982820990828102928380841093039280840393146113fa57600160701b9183831115610d7c570990828211900360901b910360701c1790565b50505060701c90565b90670de0b6b3a7640000905f1982840992828102928380861095039480860395146114815784831115610d7c5782910960018219018216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b505080925015610d7c570490565b3d156114c9573d9067ffffffffffffffff8211610d9c57604051916114be601f8201601f191660200184610db0565b82523d5f602084013e565b606090565b6040516323b872dd60e01b602082019081526001600160a01b03938416602483015292909316604484015260648084019490945292825260a08201929067ffffffffffffffff841183851017610d9c575f809493819460405251925af161153361148f565b8161156c575b501561154157565b60405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606490fd5b8051801592508215611581575b50505f611539565b611594925060208091830101910161139d565b5f8061157956fea2646970667358221220d91cd501a0640a8a525e52ea86a46db26ee0f53a2a0b0e1a0798980d23af7d2664736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.