MATIC Price: $1.07 (+5.47%)
Gas: 57 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x61012060532749712024-02-08 14:21:4423 days 2 hrs ago1707402104IN
 Create: CurveAMM
0 MATIC0.16087714117.94857644

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveAMM

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : CurveAMM.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

// ==========================================================
// ====================== CurveAMM.sol ====================
// ==========================================================

/**
 * @title Curve AMM
 * @dev Interactions with Curve Pool
 */

import { ChainlinkLibrary, IPriceFeed } from "../Libraries/Chainlink.sol";
import { IERC20Metadata } from "@openzeppelin/contracts/interfaces/IERC20Metadata.sol";
import { TransferHelper } from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import { ISweep } from "../Sweep/ISweep.sol";
import { ICurvePool } from "../Assets/Interfaces/Curve/ICurve.sol";
import { IMarketMaker } from "../Balancer/IMarketMaker.sol";

contract CurveAMM {

    ICurvePool public pool;
    IMarketMaker public marketMaker;
    mapping(address => uint8) public assetIndex;

    uint8 public constant USDX_IDX = 0;
    uint8 public constant SWEEP_IDX = 1;

    IERC20Metadata public immutable base;
    ISweep public immutable sweep;
    IPriceFeed public immutable oracleBase;
    IPriceFeed public immutable sequencer;
    uint256 public immutable frequency;

    constructor(
        address _sweep,
        address _base,
        address _sequencer,
        address _oracleBase,
        uint256 _frequency
    ) {
        sweep = ISweep(_sweep);
        base = IERC20Metadata(_base);
        oracleBase = IPriceFeed(_oracleBase);
        sequencer = IPriceFeed(_sequencer);
        frequency = _frequency;

        assetIndex[_base] = USDX_IDX;
        assetIndex[_sweep] = SWEEP_IDX;
    }

    // Events
    event Bought(uint256 usdxAmount);
    event Sold(uint256 sweepAmount);

    // Errors
    error ZeroAmount();
    error BadRate();
    error NotOwnerOrGov();

    modifier onlyOwner () {
        if (msg.sender != sweep.fastMultisig() && msg.sender != sweep.owner())
            revert NotOwnerOrGov();
        _;
    }

    function getSpotPrice() public view returns (uint256) {
        uint256 returnFactor = 1e6;
        uint256 quoteFactor = 1e18;
        uint256 priceFactor = 10 ** ChainlinkLibrary.getDecimals(oracleBase);

        uint256 quote = pool.last_price(USDX_IDX);
        uint256 price = ChainlinkLibrary.getPrice(oracleBase, sequencer, frequency);

        return quote * price * returnFactor / (priceFactor * quoteFactor);
    }

    /**
     * @notice Get Price
     * @dev Get the quote for selling 1 unit of a token.
     */
    function getPrice() public view returns (uint256) {
        if(address(pool) == address(0)) return 2e6;
        return getSpotPrice();
    }

    /**
     * @notice Get TWA Price
     * @dev Get the quote for selling 1 unit of a token.
     */
    function getTWAPrice() external view returns (uint256) {
        uint256 returnFactor = 1e6;
        uint256 quoteFactor = 1e18;
        uint256 priceFactor = 10 ** ChainlinkLibrary.getDecimals(oracleBase);

        uint256 quote = pool.price_oracle(USDX_IDX);
        uint256 price = ChainlinkLibrary.getPrice(oracleBase, sequencer, frequency);

        return quote * price * returnFactor / (priceFactor * quoteFactor);
    }

    function getPositions(uint256)
        public view
        returns (uint256 usdxAmount, uint256 sweepAmount, uint256 lp)
    {
        usdxAmount = pool.balances(USDX_IDX);
        sweepAmount = pool.balances(SWEEP_IDX);
        lp = pool.balanceOf(address(marketMaker));
    }

    /* ========== Actions ========== */

    /**
     * @notice Buy Sweep
     * @param usdxAddress Token Address to use for buying sweep.
     * @param usdxAmount Token Amount.
     * @param amountOutMin Minimum amount out.
     * @dev Increases the sweep balance and decrease collateral balance.
     */
    function buySweep(address usdxAddress, uint256 usdxAmount, uint256 amountOutMin) 
        external returns (uint256 sweepAmount)
    {
        emit Bought(usdxAmount);

        if (address(marketMaker) != address(0) && marketMaker.getBuyPrice() < getPrice()) {
            TransferHelper.safeTransferFrom(address(base), msg.sender, address(this), usdxAmount);
            TransferHelper.safeApprove(address(base), address(marketMaker), usdxAmount);
            sweepAmount = marketMaker.buySweep(usdxAmount);
            TransferHelper.safeTransfer(address(sweep), msg.sender, sweepAmount);
        } else {
            checkRate(usdxAddress, usdxAmount, amountOutMin);
            sweepAmount = swap(usdxAddress, address(sweep), usdxAmount, amountOutMin);
        }        
    }

    /**
     * @notice Sell Sweep
     * @param usdxAddress Token Address to return after selling sweep.
     * @param sweepAmount Sweep Amount.
     * @param amountOutMin Minimum amount out.
     * @dev Decreases the sweep balance and increase collateral balance
     */
    function sellSweep(
        address usdxAddress,
        uint256 sweepAmount,
        uint256 amountOutMin
    ) external returns (uint256 tokenAmount) {
        emit Sold(sweepAmount);
        checkRate(usdxAddress, amountOutMin, sweepAmount);
        tokenAmount = swap(address(sweep), usdxAddress, sweepAmount, amountOutMin);
    }

    /**
     * @notice Swap tokenIn for tokenOut using balancer exact input swap
     * @param tokenIn Address to in
     * @param tokenOut Address to out
     * @param amountIn Amount of _tokenA
     * @param amountOutMin Minimum amount out.
     */
    function swapExactInput(
        address tokenIn,
        address tokenOut,
        uint24,
        uint256 amountIn,
        uint256 amountOutMin
    ) public returns (uint256 amountOut) {
        return swap(tokenIn, tokenOut, amountIn, amountOutMin);
    }

    function checkRate(address token, uint256 tokenAmount, uint256 sweepAmount) internal view {
        if(tokenAmount == 0 || sweepAmount == 0) revert ZeroAmount();
        uint256 tokenFactor = 10 ** IERC20Metadata(token).decimals();
        uint256 sweepFactor = 10 ** sweep.decimals();
        uint256 rate = tokenAmount * sweepFactor * 1e6 / (tokenFactor * sweepAmount);
        if(rate > 16e5 || rate < 6e5) revert BadRate();
    }

    /**
     * @notice Swap tokenIn for tokenOut using balancer exact input swap
     * @param tokenIn Address to in
     * @param tokenOut Address to out
     * @param amountIn Amount of _tokenA
     * @param amountOutMin Minimum amount out.
     */
    function swap(address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOutMin) 
        private returns (uint256 amountOut)
    {
        TransferHelper.safeTransferFrom(tokenIn, msg.sender, address(pool), amountIn);

        amountOut = pool.exchange_received(
            int8(assetIndex[tokenIn]),
            int8(assetIndex[tokenOut]),
            amountIn,
            amountOutMin,
            msg.sender
        );
    }

    function setPool(address poolAddress) external {
        require(msg.sender == sweep.owner(), "BalancerAMM: Not Governance");
        pool = ICurvePool(poolAddress);
    }

    function setMarketMaker(address _marketMaker) external onlyOwner {
        marketMaker = IMarketMaker(_marketMaker);
    }
}

File 2 of 9 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/extensions/IERC20Metadata.sol";

File 3 of 9 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 5 of 9 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

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

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

File 6 of 9 : ICurve.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

interface ICurvePoolFactory {
    function deploy_plain_pool(
        string memory _name,
        string memory _symbol,
        address[] memory _coins,
        uint256 _A,
        uint256 _fee,
        uint256 _offpeg_fee_multiplier,
        uint256 _ma_exp_time,
        uint256 _implementation_idx,
        uint8[] memory _asset_types,
        bytes4[] memory _method_ids,
        address[] memory _oracles
    ) external returns (address);
}

interface ICurvePool {
    function exchange(int128 i, int128 j, uint256 _dx, uint256 _min_dy, address _receiver) external returns (uint256);
    function exchange_received(int128 i, int128 j, uint256 _dx, uint256 _min_dy, address _receiver) external returns (uint256);

    function add_liquidity(uint256[] memory _amounts, uint256 _min_mint_amount) external returns (uint256);
    function remove_liquidity(uint256 _burn_amount, uint256[] memory _min_amounts) external returns (uint256[] memory);
    function remove_liquidity_one_coin(uint256 _burn_amount, int128 _i, uint256 _min_received) external returns (uint256);
    function remove_liquidity_imbalance(uint256[] memory _amounts, uint256 _max_burn_amount) external returns (uint256);

    function last_price(uint256 i) external view returns (uint256);
    function ema_price(uint256 i) external view returns (uint256);
    function price_oracle(uint256 i) external view returns (uint256);
    function stored_rates() external view returns (uint256[] memory);
    function get_virtual_price() external view returns (uint256);

    function balances(uint256 i) external view returns (uint256);
    function balanceOf(address) external view returns (uint256);
    function decimals() external view returns (uint8);
}

File 7 of 9 : IMarketMaker.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

interface IMarketMaker {
    function getBuyPrice() external view returns (uint256 price); 
    function buySweep(uint256 usdxAmount) external returns (uint256 sweepAmount);
}

File 8 of 9 : Chainlink.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

interface IPriceFeed {
    function latestAnswer() external view returns (int256);

    function latestTimestamp() external view returns (uint256);

    function latestRound() external view returns (uint256);

    function getAnswer(uint256 roundId) external view returns (int256);

    function getTimestamp(uint256 roundId) external view returns (uint256);

    function decimals() external view returns (uint8);

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

    function version() external view returns (uint256);

    function getRoundData(
        uint80 _roundId
    )
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );

    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

library ChainlinkLibrary {
    uint8 constant USD_DECIMALS = 6;

    function getDecimals(IPriceFeed oracle) internal view returns (uint8) {
        return oracle.decimals();
    }

    function getPrice(IPriceFeed oracle) internal view returns (uint256) {
        (
            uint80 roundID,
            int256 price,
            ,
            uint256 timeStamp,
            uint80 answeredInRound
        ) = oracle.latestRoundData();
        require(answeredInRound >= roundID, "Old data");
        require(timeStamp > 0, "Round not complete");

        return uint256(price);
    }

    function getPrice(
        IPriceFeed oracle,
        IPriceFeed sequencerOracle,
        uint256 frequency
    ) internal view returns (uint256) {
        if (address(sequencerOracle) != address(0))
            checkUptime(sequencerOracle);

        (uint256 roundId, int256 price, , uint256 updatedAt, ) = oracle
            .latestRoundData();
        require(price > 0 && roundId != 0 && updatedAt != 0, "Invalid Price");
        if (frequency > 0)
            require(block.timestamp - updatedAt <= frequency, "Stale Price");

        return uint256(price);
    }

    function checkUptime(IPriceFeed sequencerOracle) internal view {
        (, int256 answer, uint256 startedAt, , ) = sequencerOracle
            .latestRoundData();
        require(answer <= 0, "Sequencer Down"); // 0: Sequencer is up, 1: Sequencer is down
        require(block.timestamp - startedAt > 1 hours, "Grace Period Not Over");
    }

    function convertTokenToToken(
        uint256 amount0,
        uint8 token0Decimals,
        uint8 token1Decimals,
        IPriceFeed oracle0,
        IPriceFeed oracle1
    ) internal view returns (uint256 amount1) {
        uint256 price0 = getPrice(oracle0);
        uint256 price1 = getPrice(oracle1);
        amount1 =
            (amount0 * price0 * (10 ** token1Decimals)) /
            (price1 * (10 ** token0Decimals));
    }

    function convertTokenToUsd(
        uint256 amount,
        uint8 tokenDecimals,
        IPriceFeed oracle
    ) internal view returns (uint256 amountUsd) {
        uint8 decimals = getDecimals(oracle);
        uint256 price = getPrice(oracle);

        amountUsd =
            (amount * price * (10 ** USD_DECIMALS)) /
            10 ** (decimals + tokenDecimals);
    }

    function convertUsdToToken(
        uint256 amountUsd,
        uint256 tokenDecimals,
        IPriceFeed oracle
    ) internal view returns (uint256 amount) {
        uint8 decimals = getDecimals(oracle);
        uint256 price = getPrice(oracle);

        amount =
            (amountUsd * 10 ** (decimals + tokenDecimals)) /
            (price * (10 ** USD_DECIMALS));
    }
}

File 9 of 9 : ISweep.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

interface ISweep {
    struct Minter {
        uint256 maxAmount;
        uint256 mintedAmount;
        bool isListed;
        bool isEnabled;
    }

    function isMintingAllowed() external view returns (bool);

    function DEFAULT_ADMIN_ADDRESS() external view returns (address);

    function balancer() external view returns (address);

    function treasury() external view returns (address);

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

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

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

    function decimals() external view returns (uint8);

    function decreaseAllowance(
        address spender,
        uint256 subtractedValue
    ) external returns (bool);

    function isValidMinter(address) external view returns (bool);

    function amm() external view returns (address);

    function ammPrice() external view returns (uint256);

    function twaPrice() external view returns (uint256);

    function increaseAllowance(
        address spender,
        uint256 addedValue
    ) external returns (bool);

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

    function owner() external view returns (address);

    function fastMultisig() external view returns (address);

    function burn(uint256 amount) external;

    function mint(uint256 amount) external;

    function minters(address minterAaddress) external returns (Minter memory);

    function minterAddresses(uint256 index) external view returns (address);

    function getMinters() external view returns (address[] memory);

    function targetPrice() external view returns (uint256);

    function interestRate() external view returns (int256);

    function periodStart() external view returns (uint256);

    function stepValue() external view returns (int256);

    function arbSpread() external view returns (uint256);

    function refreshInterestRate(int256 newInterestRate, uint256 newPeriodStart) external;

    function setTargetPrice(
        uint256 currentTargetPrice,
        uint256 nextTargetPrice
    ) external;

    function setInterestRate(
        int256 currentInterestRate,
        int256 nextInterestRate
    ) external;

    function setPeriodStart(
        uint256 currentPeriodStart,
        uint256 nextPeriodStart
    ) external;

    function startNewPeriod() external;

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

    function totalSupply() external view returns (uint256);

    function convertToUSD(uint256 amount) external view returns (uint256);

    function convertToSWEEP(uint256 amount) external view returns (uint256);

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_sweep","type":"address"},{"internalType":"address","name":"_base","type":"address"},{"internalType":"address","name":"_sequencer","type":"address"},{"internalType":"address","name":"_oracleBase","type":"address"},{"internalType":"uint256","name":"_frequency","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadRate","type":"error"},{"inputs":[],"name":"NotOwnerOrGov","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"usdxAmount","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"sweepAmount","type":"uint256"}],"name":"Sold","type":"event"},{"inputs":[],"name":"SWEEP_IDX","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDX_IDX","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"base","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usdxAddress","type":"address"},{"internalType":"uint256","name":"usdxAmount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"buySweep","outputs":[{"internalType":"uint256","name":"sweepAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"frequency","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getPositions","outputs":[{"internalType":"uint256","name":"usdxAmount","type":"uint256"},{"internalType":"uint256","name":"sweepAmount","type":"uint256"},{"internalType":"uint256","name":"lp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSpotPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTWAPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketMaker","outputs":[{"internalType":"contract IMarketMaker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleBase","outputs":[{"internalType":"contract IPriceFeed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract ICurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usdxAddress","type":"address"},{"internalType":"uint256","name":"sweepAmount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"sellSweep","outputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sequencer","outputs":[{"internalType":"contract IPriceFeed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_marketMaker","type":"address"}],"name":"setMarketMaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"","type":"uint24"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"swapExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sweep","outputs":[{"internalType":"contract ISweep","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101206040523480156200001257600080fd5b50604051620018f6380380620018f68339810160408190526200003591620000ab565b6001600160a01b0394851660a0819052938516608081905291851660c0529190931660e05261010052600091825260026020526040808320805460ff199081169091559183529091208054909116600117905562000112565b80516001600160a01b0381168114620000a657600080fd5b919050565b600080600080600060a08688031215620000c457600080fd5b620000cf866200008e565b9450620000df602087016200008e565b9350620000ef604087016200008e565b9250620000ff606087016200008e565b9150608086015190509295509295909350565b60805160a05160c05160e0516101005161173d620001b9600039600081816102ce015261070601526000818161028401526106e501526000818161022e01528181610618015281816106c401526109b30152600081816101d1015281816104cb015281816104fc0152818161090f0152818161094b01528181610a3301528181610ad10152610c450152600081816102550152818161083a015261086a015261173d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806359879099116100ad578063ead50da311610071578063ead50da3146102c9578063eda28b11146102f0578063efad6f6c14610303578063f54c42d71461030b578063fde03f771461031e57600080fd5b806359879099146102775780635c1bba381461027f5780638c60c71c146102a657806398d5fdca146102b9578063dc76fabc146102c157600080fd5b806335faa416116100f457806335faa416146101cc57806338da412e146101f35780634437152a146102145780634562aee3146102295780635001f3b51461025057600080fd5b806314526ea21461012657806316f0115b146101605780631f21f9af1461018b57806330e005961461019e575b600080fd5b6101496101343660046113cb565b60026020526000908152604090205460ff1681565b60405160ff90911681526020015b60405180910390f35b600054610173906001600160a01b031681565b6040516001600160a01b039091168152602001610157565b600154610173906001600160a01b031681565b6101b16101ac3660046113e8565b610326565b60408051938452602084019290925290820152606001610157565b6101737f000000000000000000000000000000000000000000000000000000000000000081565b610206610201366004611401565b610480565b604051908152602001610157565b6102276102223660046113cb565b6104fa565b005b6101737f000000000000000000000000000000000000000000000000000000000000000081565b6101737f000000000000000000000000000000000000000000000000000000000000000081565b610206610603565b6101737f000000000000000000000000000000000000000000000000000000000000000081565b6102066102b4366004611401565b61075f565b610206610978565b61020661099e565b6102067f000000000000000000000000000000000000000000000000000000000000000081565b6102066102fe366004611436565b610a19565b610149600081565b6102276103193660046113cb565b610a31565b610149600181565b60008054604051634903b0d160e01b815260048101839052829182916001600160a01b0390911690634903b0d190602401602060405180830381865afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190611499565b600054604051634903b0d160e01b8152600160048201529194506001600160a01b031690634903b0d190602401602060405180830381865afa1580156103e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104069190611499565b6000546001546040516370a0823160e01b81526001600160a01b03918216600482015292945016906370a0823190602401602060405180830381865afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190611499565b929491935050565b60007f92f64ca637d023f354075a4be751b169c1a8a9ccb6d33cdd0cb3520543995727836040516104b391815260200190565b60405180910390a16104c6848385610ba7565b6104f27f0000000000000000000000000000000000000000000000000000000000000000858585610d3a565b949350505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057c91906114b2565b6001600160a01b0316336001600160a01b0316146105e15760405162461bcd60e51b815260206004820152601b60248201527f42616c616e636572414d4d3a204e6f7420476f7665726e616e6365000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000620f4240670de0b6b3a76400008261063c7f0000000000000000000000000000000000000000000000000000000000000000610e07565b61064790600a6115c9565b60008054604051636872765360e01b81526004810183905292935090916001600160a01b03909116906368727653906024015b602060405180830381865afa158015610697573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bb9190611499565b9050600061072a7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610e71565b905061073684846115d8565b8561074183856115d8565b61074b91906115d8565b61075591906115ef565b9550505050505090565b60007f4e08ba899977cf7d4c2964bce71c6b9a7ef76ee5166a4c1249a1e08016e33ef18360405161079291815260200190565b60405180910390a16001546001600160a01b03161580159061083057506107b7610978565b600160009054906101000a90046001600160a01b03166001600160a01b031663018a25e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e9190611499565b105b1561093a576108617f0000000000000000000000000000000000000000000000000000000000000000333086610fb3565b600154610899907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0316856110b5565b6001546040516369ae990b60e01b8152600481018590526001600160a01b03909116906369ae990b906024016020604051808303816000875af11580156108e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109089190611499565b90506109357f000000000000000000000000000000000000000000000000000000000000000033836111b5565b610971565b610945848484610ba7565b6104f2847f00000000000000000000000000000000000000000000000000000000000000008585610d3a565b9392505050565b600080546001600160a01b03166109915750621e848090565b61099961099e565b905090565b6000620f4240670de0b6b3a7640000826109d77f0000000000000000000000000000000000000000000000000000000000000000610e07565b6109e290600a6115c9565b60008054604051631c98d5a960e11b81526004810183905292935090916001600160a01b0390911690633931ab529060240161067a565b6000610a2786868585610d3a565b9695505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663baf4a3126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab391906114b2565b6001600160a01b0316336001600160a01b031614158015610b6757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5191906114b2565b6001600160a01b0316336001600160a01b031614155b15610b85576040516338ae11af60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b811580610bb2575080155b15610bd057604051631f2a200560e01b815260040160405180910390fd5b6000836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c349190611611565b610c3f90600a6115c9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190611611565b610cd090600a6115c9565b90506000610cde84846115d8565b610ce883876115d8565b610cf590620f42406115d8565b610cff91906115ef565b905062186a00811180610d145750620927c081105b15610d325760405163491dee2160e01b815260040160405180910390fd5b505050505050565b60008054610d5590869033906001600160a01b031686610fb3565b600080546001600160a01b038781168352600260205260408084205488831685528185205491516357da180960e11b815260ff918216860b6004820152911690930b60248401526044830186905260648301859052336084840152169063afb430129060a4016020604051808303816000875af1158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190611499565b95945050505050565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b9190611611565b92915050565b60006001600160a01b03831615610e8b57610e8b836112ae565b6000806000866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611653565b50935050925069ffffffffffffffffffff169250600082138015610f1557508215155b8015610f2057508015155b610f5c5760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420507269636560981b60448201526064016105d8565b8415610fa95784610f6d82426116a3565b1115610fa95760405162461bcd60e51b815260206004820152600b60248201526a5374616c6520507269636560a81b60448201526064016105d8565b5095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161101791906116b6565b6000604051808303816000865af19150503d8060008114611054576040519150601f19603f3d011682016040523d82523d6000602084013e611059565b606091505b509150915081801561108357508051158061108357508080602001905181019061108391906116e5565b610d325760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b60448201526064016105d8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161111191906116b6565b6000604051808303816000865af19150503d806000811461114e576040519150601f19603f3d011682016040523d82523d6000602084013e611153565b606091505b509150915081801561117d57508051158061117d57508080602001905181019061117d91906116e5565b6111ae5760405162461bcd60e51b8152602060048201526002602482015261534160f01b60448201526064016105d8565b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161121191906116b6565b6000604051808303816000865af19150503d806000811461124e576040519150601f19603f3d011682016040523d82523d6000602084013e611253565b606091505b509150915081801561127d57508051158061127d57508080602001905181019061127d91906116e5565b6111ae5760405162461bcd60e51b815260206004820152600260248201526114d560f21b60448201526064016105d8565b600080826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156112ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113139190611653565b50509250925050600082131561135c5760405162461bcd60e51b815260206004820152600e60248201526d29b2b8bab2b731b2b9102237bbb760911b60448201526064016105d8565b610e1061136982426116a3565b116113ae5760405162461bcd60e51b815260206004820152601560248201527423b930b1b2902832b934b7b2102737ba1027bb32b960591b60448201526064016105d8565b505050565b6001600160a01b03811681146113c857600080fd5b50565b6000602082840312156113dd57600080fd5b8135610971816113b3565b6000602082840312156113fa57600080fd5b5035919050565b60008060006060848603121561141657600080fd5b8335611421816113b3565b95602085013595506040909401359392505050565b600080600080600060a0868803121561144e57600080fd5b8535611459816113b3565b94506020860135611469816113b3565b9350604086013562ffffff8116811461148157600080fd5b94979396509394606081013594506080013592915050565b6000602082840312156114ab57600080fd5b5051919050565b6000602082840312156114c457600080fd5b8151610971816113b3565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115611520578160001904821115611506576115066114cf565b8085161561151357918102915b93841c93908002906114ea565b509250929050565b60008261153757506001610e6b565b8161154457506000610e6b565b816001811461155a576002811461156457611580565b6001915050610e6b565b60ff841115611575576115756114cf565b50506001821b610e6b565b5060208310610133831016604e8410600b84101617156115a3575081810a610e6b565b6115ad83836114e5565b80600019048211156115c1576115c16114cf565b029392505050565b600061097160ff841683611528565b8082028115828204841417610e6b57610e6b6114cf565b60008261160c57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561162357600080fd5b815160ff8116811461097157600080fd5b805169ffffffffffffffffffff8116811461164e57600080fd5b919050565b600080600080600060a0868803121561166b57600080fd5b61167486611634565b945060208601519350604086015192506060860151915061169760808701611634565b90509295509295909350565b81810381811115610e6b57610e6b6114cf565b6000825160005b818110156116d757602081860181015185830152016116bd565b506000920191825250919050565b6000602082840312156116f757600080fd5b8151801515811461097157600080fdfea2646970667358221220b64d22e93c334a59badd78b7302e524faa04d846d4a5bf724c5486484cde98fe64736f6c63430008130033000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435740000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c33590000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f70000000000000000000000000000000000000000000000000000000000015180

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c806359879099116100ad578063ead50da311610071578063ead50da3146102c9578063eda28b11146102f0578063efad6f6c14610303578063f54c42d71461030b578063fde03f771461031e57600080fd5b806359879099146102775780635c1bba381461027f5780638c60c71c146102a657806398d5fdca146102b9578063dc76fabc146102c157600080fd5b806335faa416116100f457806335faa416146101cc57806338da412e146101f35780634437152a146102145780634562aee3146102295780635001f3b51461025057600080fd5b806314526ea21461012657806316f0115b146101605780631f21f9af1461018b57806330e005961461019e575b600080fd5b6101496101343660046113cb565b60026020526000908152604090205460ff1681565b60405160ff90911681526020015b60405180910390f35b600054610173906001600160a01b031681565b6040516001600160a01b039091168152602001610157565b600154610173906001600160a01b031681565b6101b16101ac3660046113e8565b610326565b60408051938452602084019290925290820152606001610157565b6101737f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d4357481565b610206610201366004611401565b610480565b604051908152602001610157565b6102276102223660046113cb565b6104fa565b005b6101737f000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f781565b6101737f0000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c335981565b610206610603565b6101737f000000000000000000000000000000000000000000000000000000000000000081565b6102066102b4366004611401565b61075f565b610206610978565b61020661099e565b6102067f000000000000000000000000000000000000000000000000000000000001518081565b6102066102fe366004611436565b610a19565b610149600081565b6102276103193660046113cb565b610a31565b610149600181565b60008054604051634903b0d160e01b815260048101839052829182916001600160a01b0390911690634903b0d190602401602060405180830381865afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190611499565b600054604051634903b0d160e01b8152600160048201529194506001600160a01b031690634903b0d190602401602060405180830381865afa1580156103e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104069190611499565b6000546001546040516370a0823160e01b81526001600160a01b03918216600482015292945016906370a0823190602401602060405180830381865afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190611499565b929491935050565b60007f92f64ca637d023f354075a4be751b169c1a8a9ccb6d33cdd0cb3520543995727836040516104b391815260200190565b60405180910390a16104c6848385610ba7565b6104f27f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d43574858585610d3a565b949350505050565b7f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435746001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057c91906114b2565b6001600160a01b0316336001600160a01b0316146105e15760405162461bcd60e51b815260206004820152601b60248201527f42616c616e636572414d4d3a204e6f7420476f7665726e616e6365000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000620f4240670de0b6b3a76400008261063c7f000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f7610e07565b61064790600a6115c9565b60008054604051636872765360e01b81526004810183905292935090916001600160a01b03909116906368727653906024015b602060405180830381865afa158015610697573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bb9190611499565b9050600061072a7f000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f77f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000015180610e71565b905061073684846115d8565b8561074183856115d8565b61074b91906115d8565b61075591906115ef565b9550505050505090565b60007f4e08ba899977cf7d4c2964bce71c6b9a7ef76ee5166a4c1249a1e08016e33ef18360405161079291815260200190565b60405180910390a16001546001600160a01b03161580159061083057506107b7610978565b600160009054906101000a90046001600160a01b03166001600160a01b031663018a25e86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e9190611499565b105b1561093a576108617f0000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359333086610fb3565b600154610899907f0000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359906001600160a01b0316856110b5565b6001546040516369ae990b60e01b8152600481018590526001600160a01b03909116906369ae990b906024016020604051808303816000875af11580156108e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109089190611499565b90506109357f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d4357433836111b5565b610971565b610945848484610ba7565b6104f2847f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435748585610d3a565b9392505050565b600080546001600160a01b03166109915750621e848090565b61099961099e565b905090565b6000620f4240670de0b6b3a7640000826109d77f000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f7610e07565b6109e290600a6115c9565b60008054604051631c98d5a960e11b81526004810183905292935090916001600160a01b0390911690633931ab529060240161067a565b6000610a2786868585610d3a565b9695505050505050565b7f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435746001600160a01b031663baf4a3126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab391906114b2565b6001600160a01b0316336001600160a01b031614158015610b6757507f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435746001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5191906114b2565b6001600160a01b0316336001600160a01b031614155b15610b85576040516338ae11af60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b811580610bb2575080155b15610bd057604051631f2a200560e01b815260040160405180910390fd5b6000836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c349190611611565b610c3f90600a6115c9565b905060007f000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435746001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190611611565b610cd090600a6115c9565b90506000610cde84846115d8565b610ce883876115d8565b610cf590620f42406115d8565b610cff91906115ef565b905062186a00811180610d145750620927c081105b15610d325760405163491dee2160e01b815260040160405180910390fd5b505050505050565b60008054610d5590869033906001600160a01b031686610fb3565b600080546001600160a01b038781168352600260205260408084205488831685528185205491516357da180960e11b815260ff918216860b6004820152911690930b60248401526044830186905260648301859052336084840152169063afb430129060a4016020604051808303816000875af1158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190611499565b95945050505050565b6000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b9190611611565b92915050565b60006001600160a01b03831615610e8b57610e8b836112ae565b6000806000866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611653565b50935050925069ffffffffffffffffffff169250600082138015610f1557508215155b8015610f2057508015155b610f5c5760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420507269636560981b60448201526064016105d8565b8415610fa95784610f6d82426116a3565b1115610fa95760405162461bcd60e51b815260206004820152600b60248201526a5374616c6520507269636560a81b60448201526064016105d8565b5095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161101791906116b6565b6000604051808303816000865af19150503d8060008114611054576040519150601f19603f3d011682016040523d82523d6000602084013e611059565b606091505b509150915081801561108357508051158061108357508080602001905181019061108391906116e5565b610d325760405162461bcd60e51b815260206004820152600360248201526229aa2360e91b60448201526064016105d8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161111191906116b6565b6000604051808303816000865af19150503d806000811461114e576040519150601f19603f3d011682016040523d82523d6000602084013e611153565b606091505b509150915081801561117d57508051158061117d57508080602001905181019061117d91906116e5565b6111ae5760405162461bcd60e51b8152602060048201526002602482015261534160f01b60448201526064016105d8565b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161121191906116b6565b6000604051808303816000865af19150503d806000811461124e576040519150601f19603f3d011682016040523d82523d6000602084013e611253565b606091505b509150915081801561127d57508051158061127d57508080602001905181019061127d91906116e5565b6111ae5760405162461bcd60e51b815260206004820152600260248201526114d560f21b60448201526064016105d8565b600080826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156112ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113139190611653565b50509250925050600082131561135c5760405162461bcd60e51b815260206004820152600e60248201526d29b2b8bab2b731b2b9102237bbb760911b60448201526064016105d8565b610e1061136982426116a3565b116113ae5760405162461bcd60e51b815260206004820152601560248201527423b930b1b2902832b934b7b2102737ba1027bb32b960591b60448201526064016105d8565b505050565b6001600160a01b03811681146113c857600080fd5b50565b6000602082840312156113dd57600080fd5b8135610971816113b3565b6000602082840312156113fa57600080fd5b5035919050565b60008060006060848603121561141657600080fd5b8335611421816113b3565b95602085013595506040909401359392505050565b600080600080600060a0868803121561144e57600080fd5b8535611459816113b3565b94506020860135611469816113b3565b9350604086013562ffffff8116811461148157600080fd5b94979396509394606081013594506080013592915050565b6000602082840312156114ab57600080fd5b5051919050565b6000602082840312156114c457600080fd5b8151610971816113b3565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115611520578160001904821115611506576115066114cf565b8085161561151357918102915b93841c93908002906114ea565b509250929050565b60008261153757506001610e6b565b8161154457506000610e6b565b816001811461155a576002811461156457611580565b6001915050610e6b565b60ff841115611575576115756114cf565b50506001821b610e6b565b5060208310610133831016604e8410600b84101617156115a3575081810a610e6b565b6115ad83836114e5565b80600019048211156115c1576115c16114cf565b029392505050565b600061097160ff841683611528565b8082028115828204841417610e6b57610e6b6114cf565b60008261160c57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561162357600080fd5b815160ff8116811461097157600080fd5b805169ffffffffffffffffffff8116811461164e57600080fd5b919050565b600080600080600060a0868803121561166b57600080fd5b61167486611634565b945060208601519350604086015192506060860151915061169760808701611634565b90509295509295909350565b81810381811115610e6b57610e6b6114cf565b6000825160005b818110156116d757602081860181015185830152016116bd565b506000920191825250919050565b6000602082840312156116f757600080fd5b8151801515811461097157600080fdfea2646970667358221220b64d22e93c334a59badd78b7302e524faa04d846d4a5bf724c5486484cde98fe64736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d435740000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c33590000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f70000000000000000000000000000000000000000000000000000000000015180

-----Decoded View---------------
Arg [0] : _sweep (address): 0xB88a5Ac00917a02d82c7cd6CEBd73E2852d43574
Arg [1] : _base (address): 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
Arg [2] : _sequencer (address): 0x0000000000000000000000000000000000000000
Arg [3] : _oracleBase (address): 0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7
Arg [4] : _frequency (uint256): 86400

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000b88a5ac00917a02d82c7cd6cebd73e2852d43574
Arg [1] : 0000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 000000000000000000000000fe4a8cc5b5b2366c1b58bea3858e81843581b2f7
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015180


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.