ETH Price: $2,832.23 (+2.29%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x61036060236756782025-10-28 11:38:5926 days ago1761651539
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060236756742025-10-28 11:38:1126 days ago1761651491
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060236464952025-10-24 9:41:1130 days ago1761298871
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060232251062025-08-26 11:51:3589 days ago1756209095
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060227330702025-06-18 18:11:35158 days ago1750270295
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060226606292025-06-08 15:01:47168 days ago1749394907
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060226443842025-06-06 8:31:47170 days ago1749198707
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060225621542025-05-25 20:15:59182 days ago1748204159
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060225224712025-05-20 6:52:47187 days ago1747723967
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060223991522025-05-02 22:41:23205 days ago1746225683
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060223479462025-04-25 18:52:35212 days ago1745607155
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060222585982025-04-13 7:36:47224 days ago1744529807
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060221267722025-03-25 22:04:23243 days ago1742940263
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060221226712025-03-25 8:17:11243 days ago1742890631
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060221012172025-03-22 8:26:11246 days ago1742631971
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060221012132025-03-22 8:25:23246 days ago1742631923
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060218454262025-02-14 14:54:23282 days ago1739544863
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060217833422025-02-05 22:40:23291 days ago1738795223
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060217833402025-02-05 22:39:59291 days ago1738795199
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060217833372025-02-05 22:39:23291 days ago1738795163
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060217445762025-01-31 12:42:11296 days ago1738327331
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060217377772025-01-30 13:53:59297 days ago1738245239
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060216836552025-01-23 0:36:59304 days ago1737592619
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060216836132025-01-23 0:28:35304 days ago1737592115
Fluid: Dex Factory
 Contract Creation0 ETH
0x61036060216403362025-01-16 23:28:59310 days ago1737070139
Fluid: Dex Factory
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FluidDexFactory

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 10000000 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import { Owned } from "solmate/src/auth/Owned.sol";
import { ErrorTypes } from "../errorTypes.sol";
import { Error } from "../error.sol";
import { AddressCalcs } from "../../../libraries/addressCalcs.sol";
import { StorageRead } from "../../../libraries/storageRead.sol";

abstract contract DexFactoryVariables is Owned, StorageRead, Error {
    /*//////////////////////////////////////////////////////////////
                          STORAGE VARIABLES
    //////////////////////////////////////////////////////////////*/

    // ------------ storage variables from inherited contracts (Owned) come before vars here --------

    // ----------------------- slot 0 ---------------------------
    // address public owner; // from Owned

    // 12 bytes empty

    // ----------------------- slot 1  ---------------------------
    /// @dev deployer can deploy new Dex Pool contract
    /// owner can add/remove deployer.
    /// Owner is deployer by default.
    mapping(address => bool) internal _deployers;

    // ----------------------- slot 2  ---------------------------
    /// @dev global auths can update any dex pool config.
    /// owner can add/remove global auths.
    /// Owner is global auth by default.
    mapping(address => bool) internal _globalAuths;

    // ----------------------- slot 3  ---------------------------
    /// @dev dex auths can update specific dex config.
    /// owner can add/remove dex auths.
    /// Owner is dex auth by default.
    /// dex => auth => add/remove
    mapping(address => mapping(address => bool)) internal _dexAuths;

    // ----------------------- slot 4 ---------------------------
    /// @dev total no of dexes deployed by the factory
    /// only addresses that have deployer role or owner can deploy new dex pool.
    uint256 internal _totalDexes;

    // ----------------------- slot 5 ---------------------------
    /// @dev dex deployment logics for deploying dex pool
    /// These logic contracts hold the deployment logics of specific dexes and are called via .delegatecall inside deployDex().
    /// only addresses that have owner can add/remove new dex deployment logic.
    mapping(address => bool) internal _dexDeploymentLogics;

    /*//////////////////////////////////////////////////////////////
                          CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/
    constructor(address owner_) Owned(owner_) {}
}

abstract contract DexFactoryEvents {
    /// @dev Emitted when a new dex is deployed.
    /// @param dex The address of the newly deployed dex.
    /// @param dexId The id of the newly deployed dex.
    event LogDexDeployed(address indexed dex, uint256 indexed dexId);

    /// @dev Emitted when the deployer is modified by owner.
    /// @param deployer Address whose deployer status is updated.
    /// @param allowed Indicates whether the address is authorized as a deployer or not.
    event LogSetDeployer(address indexed deployer, bool indexed allowed);

    /// @dev Emitted when the globalAuth is modified by owner.
    /// @param globalAuth Address whose globalAuth status is updated.
    /// @param allowed Indicates whether the address is authorized as a deployer or not.
    event LogSetGlobalAuth(address indexed globalAuth, bool indexed allowed);

    /// @dev Emitted when the dexAuth is modified by owner.
    /// @param dexAuth Address whose dexAuth status is updated.
    /// @param allowed Indicates whether the address is authorized as a deployer or not.
    /// @param dex Address of the specific dex related to the authorization change.
    event LogSetDexAuth(address indexed dexAuth, bool indexed allowed, address indexed dex);

    /// @dev Emitted when the dex deployment logic is modified by owner.
    /// @param dexDeploymentLogic The address of the dex deployment logic contract.
    /// @param allowed  Indicates whether the address is authorized as a deployer or not.
    event LogSetDexDeploymentLogic(address indexed dexDeploymentLogic, bool indexed allowed);
}

abstract contract DexFactoryCore is DexFactoryVariables, DexFactoryEvents {
    constructor(address owner_) validAddress(owner_) DexFactoryVariables(owner_) {}

    /// @dev validates that an address is not the zero address
    modifier validAddress(address value_) {
        if (value_ == address(0)) {
            revert FluidDexFactoryError(ErrorTypes.DexFactory__InvalidParams);
        }
        _;
    }
}

/// @dev Implements Dex Factory auth-only callable methods. Owner / auths can set various config values and
/// can define the allow-listed deployers.
abstract contract DexFactoryAuth is DexFactoryCore {
    /// @notice                         Sets an address (`deployer_`) as allowed deployer or not.
    ///                                 This function can only be called by the owner.
    /// @param deployer_                The address to be set as deployer.
    /// @param allowed_                 A boolean indicating whether the specified address is allowed to deploy dexes.
    function setDeployer(address deployer_, bool allowed_) external onlyOwner validAddress(deployer_) {
        _deployers[deployer_] = allowed_;

        emit LogSetDeployer(deployer_, allowed_);
    }

    /// @notice                         Sets an address (`globalAuth_`) as a global authorization or not.
    ///                                 This function can only be called by the owner.
    /// @param globalAuth_              The address to be set as global authorization.
    /// @param allowed_                 A boolean indicating whether the specified address is allowed to update any dex config.
    function setGlobalAuth(address globalAuth_, bool allowed_) external onlyOwner validAddress(globalAuth_) {
        _globalAuths[globalAuth_] = allowed_;

        emit LogSetGlobalAuth(globalAuth_, allowed_);
    }

    /// @notice                         Sets an address (`dexAuth_`) as allowed dex authorization or not for a specific dex (`dex_`).
    ///                                 This function can only be called by the owner.
    /// @param dex_                     The address of the dex for which the authorization is being set.
    /// @param dexAuth_                 The address to be set as dex authorization.
    /// @param allowed_                 A boolean indicating whether the specified address is allowed to update the specific dex config.
    function setDexAuth(address dex_, address dexAuth_, bool allowed_) external onlyOwner validAddress(dexAuth_) {
        _dexAuths[dex_][dexAuth_] = allowed_;

        emit LogSetDexAuth(dexAuth_, allowed_, dex_);
    }

    /// @notice                         Sets an address as allowed dex deployment logic (`deploymentLogic_`) contract or not.
    ///                                 This function can only be called by the owner.
    /// @param deploymentLogic_         The address of the dex deployment logic contract to be set.
    /// @param allowed_                 A boolean indicating whether the specified address is allowed to deploy new type of dex.
    function setDexDeploymentLogic(
        address deploymentLogic_,
        bool allowed_
    ) public onlyOwner validAddress(deploymentLogic_) {
        _dexDeploymentLogics[deploymentLogic_] = allowed_;

        emit LogSetDexDeploymentLogic(deploymentLogic_, allowed_);
    }

    /// @notice                         Spell allows owner aka governance to do any arbitrary call on factory
    /// @param target_                  Address to which the call needs to be delegated
    /// @param data_                    Data to execute at the delegated address
    function spell(address target_, bytes memory data_) external onlyOwner returns (bytes memory response_) {
        assembly {
            let succeeded := delegatecall(gas(), target_, add(data_, 0x20), mload(data_), 0, 0)
            let size := returndatasize()

            response_ := mload(0x40)
            mstore(0x40, add(response_, and(add(add(size, 0x20), 0x1f), not(0x1f))))
            mstore(response_, size)
            returndatacopy(add(response_, 0x20), 0, size)

            switch iszero(succeeded)
            case 1 {
                // throw if delegatecall failed
                returndatacopy(0x00, 0x00, size)
                revert(0x00, size)
            }
        }
    }

    /// @notice                         Checks if the provided address (`deployer_`) is authorized as a deployer.
    /// @param deployer_                The address to be checked for deployer authorization.
    /// @return                         Returns `true` if the address is a deployer, otherwise `false`.
    function isDeployer(address deployer_) public view returns (bool) {
        return _deployers[deployer_] || owner == deployer_;
    }

    /// @notice                         Checks if the provided address (`globalAuth_`) has global dex authorization privileges.
    /// @param globalAuth_              The address to be checked for global authorization privileges.
    /// @return                         Returns `true` if the given address has global authorization privileges, otherwise `false`.
    function isGlobalAuth(address globalAuth_) public view returns (bool) {
        return _globalAuths[globalAuth_] || owner == globalAuth_;
    }

    /// @notice                         Checks if the provided address (`dexAuth_`) has dex authorization privileges for the specified dex (`dex_`).
    /// @param dex_                     The address of the dex to check.
    /// @param dexAuth_                 The address to be checked for dex authorization privileges.
    /// @return                         Returns `true` if the given address has dex authorization privileges for the specified dex, otherwise `false`.
    function isDexAuth(address dex_, address dexAuth_) public view returns (bool) {
        return _dexAuths[dex_][dexAuth_] || owner == dexAuth_;
    }

    /// @notice                         Checks if the provided (`dexDeploymentLogic_`) address has authorization for dex deployment.
    /// @param dexDeploymentLogic_      The address of the dex deploy logic to check for authorization privileges.
    /// @return                         Returns `true` if the given address has authorization privileges for dex deployment, otherwise `false`.
    function isDexDeploymentLogic(address dexDeploymentLogic_) public view returns (bool) {
        return _dexDeploymentLogics[dexDeploymentLogic_];
    }
}

/// @dev implements DexFactory deploy dex related methods.
abstract contract DexFactoryDeployment is DexFactoryCore, DexFactoryAuth {
    /// @dev                            Deploys a contract using the CREATE opcode with the provided bytecode (`bytecode_`).
    ///                                 This is an internal function, meant to be used within the contract to facilitate the deployment of other contracts.
    /// @param bytecode_                The bytecode of the contract to be deployed.
    /// @return address_                Returns the address of the deployed contract.
    function _deploy(bytes memory bytecode_) internal returns (address address_) {
        if (bytecode_.length == 0) {
            revert FluidDexError(ErrorTypes.DexFactory__InvalidOperation);
        }
        /// @solidity memory-safe-assembly
        assembly {
            address_ := create(0, add(bytecode_, 0x20), mload(bytecode_))
        }
        if (address_ == address(0)) {
            revert FluidDexError(ErrorTypes.DexFactory__InvalidOperation);
        }
    }

    /// @notice                       Deploys a new dex using the specified deployment logic `dexDeploymentLogic_` and data `dexDeploymentData_`.
    ///                               Only accounts with deployer access or the owner can deploy a new dex.
    /// @param dexDeploymentLogic_    The address of the dex deployment logic contract.
    /// @param dexDeploymentData_     The data to be used for dex deployment.
    /// @return dex_                  Returns the address of the newly deployed dex.
    function deployDex(address dexDeploymentLogic_, bytes calldata dexDeploymentData_) external returns (address dex_) {
        // Revert if msg.sender doesn't have deployer access or is an owner.
        if (!isDeployer(msg.sender)) revert FluidDexError(ErrorTypes.DexFactory__Unauthorized);
        // Revert if dexDeploymentLogic_ is not whitelisted.
        if (!isDexDeploymentLogic(dexDeploymentLogic_)) revert FluidDexError(ErrorTypes.DexFactory__Unauthorized);

        // Dex ID for the new dex and also acts as `nonce` for CREATE
        uint256 dexId_ = ++_totalDexes;

        // compute dex address for dex id.
        dex_ = getDexAddress(dexId_);

        // deploy the dex using dex deployment logic by making .delegatecall
        (bool success_, bytes memory data_) = dexDeploymentLogic_.delegatecall(dexDeploymentData_);

        if (!(success_ && dex_ == _deploy(abi.decode(data_, (bytes))) && isDex(dex_))) {
            revert FluidDexError(ErrorTypes.DexFactory__InvalidDexAddress);
        }

        emit LogDexDeployed(dex_, dexId_);
    }

    /// @notice                       Computes the address of a dex based on its given ID (`dexId_`).
    /// @param dexId_                 The ID of the dex.
    /// @return dex_                  Returns the computed address of the dex.
    function getDexAddress(uint256 dexId_) public view returns (address dex_) {
        return AddressCalcs.addressCalc(address(this), dexId_);
    }

    /// @notice                         Checks if a given address (`dex_`) corresponds to a valid dex.
    /// @param dex_                     The dex address to check.
    /// @return                         Returns `true` if the given address corresponds to a valid dex, otherwise `false`.
    function isDex(address dex_) public view returns (bool) {
        if (dex_.code.length == 0) {
            return false;
        } else {
            // DEX_ID() function signature is 0xf4b9a3fb
            (bool success_, bytes memory data_) = dex_.staticcall(hex"f4b9a3fb");
            return success_ && dex_ == getDexAddress(abi.decode(data_, (uint256)));
        }
    }

    /// @notice                   Returns the total number of dexes deployed by the factory.
    /// @return                   Returns the total number of dexes.
    function totalDexes() external view returns (uint256) {
        return _totalDexes;
    }
}

/// @title Fluid DexFactory
/// @notice creates Fluid dex protocol dexes, which are interacting with Fluid Liquidity to deposit / borrow funds.
/// Dexes are created at a deterministic address, given an incrementing `dexId` (see `getDexAddress()`).
/// Dexes can only be deployed by allow-listed deployer addresses.
/// @dev Note the deployed dexes start out with no config at Liquidity contract.
/// This must be done by Liquidity auths in a separate step, otherwise no deposits will be possible.
/// This contract is not upgradeable. It supports adding new dex deployment logic contracts for new, future dexes.
contract FluidDexFactory is DexFactoryCore, DexFactoryAuth, DexFactoryDeployment {
    constructor(address owner_) DexFactoryCore(owner_) {}
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

/// @notice implements calculation of address for contracts deployed through CREATE.
/// Accepts contract deployed from which address & nonce
library AddressCalcs {

    /// @notice                         Computes the address of a contract based
    /// @param deployedFrom_            Address from which the contract was deployed
    /// @param nonce_                   Nonce at which the contract was deployed
    /// @return contract_               Address of deployed contract
    function addressCalc(address deployedFrom_, uint nonce_) internal pure returns (address contract_) {
        // @dev based on https://ethereum.stackexchange.com/a/61413

        // nonce of smart contract always starts with 1. so, with nonce 0 there won't be any deployment
        // hence, nonce of vault deployment starts with 1.
        bytes memory data;
        if (nonce_ == 0x00) {
            return address(0);
        } else if (nonce_ <= 0x7f) {
            data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployedFrom_, uint8(nonce_));
        } else if (nonce_ <= 0xff) {
            data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployedFrom_, bytes1(0x81), uint8(nonce_));
        } else if (nonce_ <= 0xffff) {
            data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployedFrom_, bytes1(0x82), uint16(nonce_));
        } else if (nonce_ <= 0xffffff) {
            data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployedFrom_, bytes1(0x83), uint24(nonce_));
        } else {
            data = abi.encodePacked(bytes1(0xda), bytes1(0x94), deployedFrom_, bytes1(0x84), uint32(nonce_));
        }

        return address(uint160(uint256(keccak256(data))));
    }

}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

/// @notice implements a method to read uint256 data from storage at a bytes32 storage slot key.
contract StorageRead {
    function readFromStorage(bytes32 slot_) public view returns (uint256 result_) {
        assembly {
            result_ := sload(slot_) // read value from the storage slot
        }
    }
}

File 4 of 7 : error.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import { Structs } from "./poolT1/coreModule/structs.sol";

abstract contract Error {
    error FluidDexError(uint256 errorId_);

    error FluidDexFactoryError(uint256 errorId);

    /// @notice used to simulate swap to find the output amount
    error FluidDexSwapResult(uint256 amountOut);

    error FluidDexPerfectLiquidityOutput(uint256 token0Amt, uint token1Amt);

    error FluidDexSingleTokenOutput(uint256 tokenAmt);

    error FluidDexLiquidityOutput(uint256 shares_);

    error FluidDexPricesAndExchangeRates(Structs.PricesAndExchangePrice pex_);
}

File 5 of 7 : errorTypes.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

library ErrorTypes {
    /***********************************|
    |             DexT1                 | 
    |__________________________________*/

    /// @notice thrown at reentrancy
    uint256 internal constant DexT1__AlreadyEntered = 51001;

    uint256 internal constant DexT1__NotAnAuth = 51002;

    uint256 internal constant DexT1__SmartColNotEnabled = 51003;

    uint256 internal constant DexT1__SmartDebtNotEnabled = 51004;

    uint256 internal constant DexT1__PoolNotInitialized = 51005;

    uint256 internal constant DexT1__TokenReservesTooLow = 51006;

    uint256 internal constant DexT1__EthAndAmountInMisMatch = 51007;

    uint256 internal constant DexT1__EthSentForNonNativeSwap = 51008;

    uint256 internal constant DexT1__NoSwapRoute = 51009;

    uint256 internal constant DexT1__NotEnoughAmountOut = 51010;

    uint256 internal constant DexT1__LiquidityLayerTokenUtilizationCapReached = 51011;

    uint256 internal constant DexT1__HookReturnedFalse = 51012;

    // Either user's config are not set or user is paused
    uint256 internal constant DexT1__UserSupplyInNotOn = 51013;

    // Either user's config are not set or user is paused
    uint256 internal constant DexT1__UserDebtInNotOn = 51014;

    // Thrown when contract asks for more token0 or token1 than what user's wants to give on deposit
    uint256 internal constant DexT1__AboveDepositMax = 51015;

    uint256 internal constant DexT1__MsgValueLowOnDepositOrPayback = 51016;

    uint256 internal constant DexT1__WithdrawLimitReached = 51017;

    // Thrown when contract gives less token0 or token1 than what user's wants on withdraw
    uint256 internal constant DexT1__BelowWithdrawMin = 51018;

    uint256 internal constant DexT1__DebtLimitReached = 51019;

    // Thrown when contract gives less token0 or token1 than what user's wants on borrow
    uint256 internal constant DexT1__BelowBorrowMin = 51020;

    // Thrown when contract asks for more token0 or token1 than what user's wants on payback
    uint256 internal constant DexT1__AbovePaybackMax = 51021;

    uint256 internal constant DexT1__InvalidDepositAmts = 51022;

    uint256 internal constant DexT1__DepositAmtsZero = 51023;

    uint256 internal constant DexT1__SharesMintedLess = 51024;

    uint256 internal constant DexT1__WithdrawalNotEnough = 51025;

    uint256 internal constant DexT1__InvalidWithdrawAmts = 51026;

    uint256 internal constant DexT1__WithdrawAmtsZero = 51027;

    uint256 internal constant DexT1__WithdrawExcessSharesBurn = 51028;

    uint256 internal constant DexT1__InvalidBorrowAmts = 51029;

    uint256 internal constant DexT1__BorrowAmtsZero = 51030;

    uint256 internal constant DexT1__BorrowExcessSharesMinted = 51031;

    uint256 internal constant DexT1__PaybackAmtTooHigh = 51032;

    uint256 internal constant DexT1__InvalidPaybackAmts = 51033;

    uint256 internal constant DexT1__PaybackAmtsZero = 51034;

    uint256 internal constant DexT1__PaybackSharedBurnedLess = 51035;

    uint256 internal constant DexT1__NothingToArbitrage = 51036;

    uint256 internal constant DexT1__MsgSenderNotLiquidity = 51037;

    // On liquidity callback reentrancy bit should be on
    uint256 internal constant DexT1__ReentrancyBitShouldBeOn = 51038;

    // Thrown is reentrancy is already on and someone tries to fetch oracle price. Should not be possible to this
    uint256 internal constant DexT1__OraclePriceFetchAlreadyEntered = 51039;

    // Thrown when swap changes the current price by more than 5%
    uint256 internal constant DexT1__OracleUpdateHugeSwapDiff = 51040;

    uint256 internal constant DexT1__Token0ShouldBeSmallerThanToken1 = 51041;

    uint256 internal constant DexT1__OracleMappingOverflow = 51042;

    /// @notice thrown if governance has paused the swapping & arbitrage so only perfect functions are usable
    uint256 internal constant DexT1__SwapAndArbitragePaused = 51043;

    uint256 internal constant DexT1__ExceedsAmountInMax = 51044;

    /// @notice thrown if amount in is too high or too low
    uint256 internal constant DexT1__SwapInLimitingAmounts = 51045;

    /// @notice thrown if amount out is too high or too low
    uint256 internal constant DexT1__SwapOutLimitingAmounts = 51046;

    uint256 internal constant DexT1__MintAmtOverflow = 51047;

    uint256 internal constant DexT1__BurnAmtOverflow = 51048;

    uint256 internal constant DexT1__LimitingAmountsSwapAndNonPerfectActions = 51049;

    uint256 internal constant DexT1__InsufficientOracleData = 51050;

    uint256 internal constant DexT1__SharesAmountInsufficient = 51051;

    uint256 internal constant DexT1__CenterPriceOutOfRange = 51052;

    uint256 internal constant DexT1__DebtReservesTooLow = 51053;

    uint256 internal constant DexT1__SwapAndDepositTooLowOrTooHigh = 51054;

    uint256 internal constant DexT1__WithdrawAndSwapTooLowOrTooHigh = 51055;

    uint256 internal constant DexT1__BorrowAndSwapTooLowOrTooHigh = 51056;

    uint256 internal constant DexT1__SwapAndPaybackTooLowOrTooHigh = 51057;

    uint256 internal constant DexT1__InvalidImplementation = 51058;

    uint256 internal constant DexT1__OnlyDelegateCallAllowed = 51059;

    uint256 internal constant DexT1__IncorrectDataLength = 51060;

    uint256 internal constant DexT1__AmountToSendLessThanAmount = 51061;

    uint256 internal constant DexT1__InvalidCollateralReserves = 51062;

    uint256 internal constant DexT1__InvalidDebtReserves = 51063;

    uint256 internal constant DexT1__SupplySharesOverflow = 51064;

    uint256 internal constant DexT1__BorrowSharesOverflow = 51065;

    uint256 internal constant DexT1__OracleNotActive = 51066;

    /***********************************|
    |            DEX Admin              | 
    |__________________________________*/

    /// @notice thrown when pool is not initialized
    uint256 internal constant DexT1Admin__PoolNotInitialized = 52001;

    uint256 internal constant DexT1Admin__SmartColIsAlreadyOn = 52002;

    uint256 internal constant DexT1Admin__SmartDebtIsAlreadyOn = 52003;

    /// @notice thrown when any of the configs value overflow the maximum limit
    uint256 internal constant DexT1Admin__ConfigOverflow = 52004;

    uint256 internal constant DexT1Admin__AddressNotAContract = 52005;

    uint256 internal constant DexT1Admin__InvalidParams = 52006;

    uint256 internal constant DexT1Admin__UserNotDefined = 52007;

    uint256 internal constant DexT1Admin__OnlyDelegateCallAllowed = 52008;

    uint256 internal constant DexT1Admin__UnexpectedPoolState = 52009;

    /// @notice thrown when trying to pause or unpause but user is already in the target pause state
    uint256 internal constant DexT1Admin__InvalidPauseToggle = 52009;

    /***********************************|
    |            DEX Factory            | 
    |__________________________________*/

    uint256 internal constant DexFactory__InvalidOperation = 53001;
    uint256 internal constant DexFactory__Unauthorized = 53002;
    uint256 internal constant DexFactory__SameTokenNotAllowed = 53003;
    uint256 internal constant DexFactory__TokenConfigNotProper = 53004;
    uint256 internal constant DexFactory__InvalidParams = 53005;
    uint256 internal constant DexFactory__OnlyDelegateCallAllowed = 53006;
    uint256 internal constant DexFactory__InvalidDexAddress = 53007;
}

File 6 of 7 : structs.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

abstract contract Structs {
    struct PricesAndExchangePrice {
        uint lastStoredPrice; // last stored price in 1e27 decimals
        uint centerPrice; // last stored price in 1e27 decimals
        uint upperRange; // price at upper range in 1e27 decimals
        uint lowerRange; // price at lower range in 1e27 decimals
        uint geometricMean; // geometric mean of upper range & lower range in 1e27 decimals
        uint supplyToken0ExchangePrice;
        uint borrowToken0ExchangePrice;
        uint supplyToken1ExchangePrice;
        uint borrowToken1ExchangePrice;
    }

    struct ExchangePrices {
        uint supplyToken0ExchangePrice;
        uint borrowToken0ExchangePrice;
        uint supplyToken1ExchangePrice;
        uint borrowToken1ExchangePrice;
    }

    struct CollateralReserves {
        uint token0RealReserves;
        uint token1RealReserves;
        uint token0ImaginaryReserves;
        uint token1ImaginaryReserves;
    }

    struct CollateralReservesSwap {
        uint tokenInRealReserves;
        uint tokenOutRealReserves;
        uint tokenInImaginaryReserves;
        uint tokenOutImaginaryReserves;
    }

    struct DebtReserves {
        uint token0Debt;
        uint token1Debt;
        uint token0RealReserves;
        uint token1RealReserves;
        uint token0ImaginaryReserves;
        uint token1ImaginaryReserves;
    }

    struct DebtReservesSwap {
        uint tokenInDebt;
        uint tokenOutDebt;
        uint tokenInRealReserves;
        uint tokenOutRealReserves;
        uint tokenInImaginaryReserves;
        uint tokenOutImaginaryReserves;
    }

    struct SwapInMemory {
        address tokenIn;
        address tokenOut;
        uint256 amtInAdjusted;
        address withdrawTo;
        address borrowTo;
        uint price; // price of pool after swap
        uint fee; // fee of pool
        uint revenueCut; // revenue cut of pool
        bool swap0to1;
        int swapRoutingAmt;
        bytes data; // just added to avoid stack-too-deep error
    }

    struct SwapOutMemory {
        address tokenIn;
        address tokenOut;
        uint256 amtOutAdjusted;
        address withdrawTo;
        address borrowTo;
        uint price; // price of pool after swap
        uint fee;
        uint revenueCut; // revenue cut of pool
        bool swap0to1;
        int swapRoutingAmt;
        bytes data; // just added to avoid stack-too-deep error
        uint msgValue;
    }

    struct DepositColMemory {
        uint256 token0AmtAdjusted;
        uint256 token1AmtAdjusted;
        uint256 token0ReservesInitial;
        uint256 token1ReservesInitial;
    }

    struct WithdrawColMemory {
        uint256 token0AmtAdjusted;
        uint256 token1AmtAdjusted;
        uint256 token0ReservesInitial;
        uint256 token1ReservesInitial;
        address to;
    }

    struct BorrowDebtMemory {
        uint256 token0AmtAdjusted;
        uint256 token1AmtAdjusted;
        uint256 token0DebtInitial;
        uint256 token1DebtInitial;
        address to;
    }

    struct PaybackDebtMemory {
        uint256 token0AmtAdjusted;
        uint256 token1AmtAdjusted;
        uint256 token0DebtInitial;
        uint256 token1DebtInitial;
    }

    struct OraclePriceMemory {
        uint lowestPrice1by0;
        uint highestPrice1by0;
        uint oracleSlot;
        uint oracleMap;
        uint oracle;
    }

    struct Oracle {
        uint twap1by0; // TWAP price
        uint lowestPrice1by0; // lowest price point
        uint highestPrice1by0; // highest price point
        uint twap0by1; // TWAP price
        uint lowestPrice0by1; // lowest price point
        uint highestPrice0by1; // highest price point
    }

    struct Implementations {
        address shift;
        address admin;
        address colOperations;
        address debtOperations;
        address perfectOperationsAndSwapOut;
    }

    struct ConstantViews {
        uint256 dexId;
        address liquidity;
        address factory;
        Implementations implementations;
        address deployerContract;
        address token0;
        address token1;
        bytes32 supplyToken0Slot;
        bytes32 borrowToken0Slot;
        bytes32 supplyToken1Slot;
        bytes32 borrowToken1Slot;
        bytes32 exchangePriceToken0Slot;
        bytes32 exchangePriceToken1Slot;
        uint256 oracleMapping;
    }

    struct ConstantViews2 {
        uint token0NumeratorPrecision;
        uint token0DenominatorPrecision;
        uint token1NumeratorPrecision;
        uint token1DenominatorPrecision;
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

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

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"errorId_","type":"uint256"}],"name":"FluidDexError","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorId","type":"uint256"}],"name":"FluidDexFactoryError","type":"error"},{"inputs":[{"internalType":"uint256","name":"shares_","type":"uint256"}],"name":"FluidDexLiquidityOutput","type":"error"},{"inputs":[{"internalType":"uint256","name":"token0Amt","type":"uint256"},{"internalType":"uint256","name":"token1Amt","type":"uint256"}],"name":"FluidDexPerfectLiquidityOutput","type":"error"},{"inputs":[{"components":[{"internalType":"uint256","name":"lastStoredPrice","type":"uint256"},{"internalType":"uint256","name":"centerPrice","type":"uint256"},{"internalType":"uint256","name":"upperRange","type":"uint256"},{"internalType":"uint256","name":"lowerRange","type":"uint256"},{"internalType":"uint256","name":"geometricMean","type":"uint256"},{"internalType":"uint256","name":"supplyToken0ExchangePrice","type":"uint256"},{"internalType":"uint256","name":"borrowToken0ExchangePrice","type":"uint256"},{"internalType":"uint256","name":"supplyToken1ExchangePrice","type":"uint256"},{"internalType":"uint256","name":"borrowToken1ExchangePrice","type":"uint256"}],"internalType":"struct Structs.PricesAndExchangePrice","name":"pex_","type":"tuple"}],"name":"FluidDexPricesAndExchangeRates","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenAmt","type":"uint256"}],"name":"FluidDexSingleTokenOutput","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"FluidDexSwapResult","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dex","type":"address"},{"indexed":true,"internalType":"uint256","name":"dexId","type":"uint256"}],"name":"LogDexDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetDeployer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dexAuth","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"},{"indexed":true,"internalType":"address","name":"dex","type":"address"}],"name":"LogSetDexAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dexDeploymentLogic","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetDexDeploymentLogic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"globalAuth","type":"address"},{"indexed":true,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetGlobalAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"dexDeploymentLogic_","type":"address"},{"internalType":"bytes","name":"dexDeploymentData_","type":"bytes"}],"name":"deployDex","outputs":[{"internalType":"address","name":"dex_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dexId_","type":"uint256"}],"name":"getDexAddress","outputs":[{"internalType":"address","name":"dex_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployer_","type":"address"}],"name":"isDeployer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dex_","type":"address"}],"name":"isDex","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dex_","type":"address"},{"internalType":"address","name":"dexAuth_","type":"address"}],"name":"isDexAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dexDeploymentLogic_","type":"address"}],"name":"isDexDeploymentLogic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"globalAuth_","type":"address"}],"name":"isGlobalAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"slot_","type":"bytes32"}],"name":"readFromStorage","outputs":[{"internalType":"uint256","name":"result_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deployer_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setDeployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dex_","type":"address"},{"internalType":"address","name":"dexAuth_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setDexAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"deploymentLogic_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setDexDeploymentLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"globalAuth_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setGlobalAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"spell","outputs":[{"internalType":"bytes","name":"response_","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516118aa3803806118aa83398101604081905261002f916100b8565b600080546001600160a01b0319166001600160a01b03831690811782556040518392839283929091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508190506001600160a01b0381166100b05760405163aeae7c0d60e01b815261cf0d600482015260240160405180910390fd5b5050506100e8565b6000602082840312156100ca57600080fd5b81516001600160a01b03811681146100e157600080fd5b9392505050565b6117b3806100f76000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638f2db95d11610097578063c7acb01f11610066578063c7acb01f14610230578063f2fde38b14610250578063f4be578714610263578063fbeeca2c1461029c57600080fd5b80638f2db95d146101e657806393656c17146101f9578063a34b5ee81461020b578063b5c736e41461021e57600080fd5b80635f574d4a116100d35780635f574d4a1461018b57806378c7e138146101a057806387339817146101b35780638da5cb5b146101c657600080fd5b806312e366aa146101055780633c11e12a146101425780634502d0631461016557806350c358a414610178575b600080fd5b610118610113366004611329565b6102af565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610155610150366004611366565b6102c1565b6040519015158152602001610139565b610155610173366004611366565b6103d4565b610155610186366004611366565b610425565b61019e610199366004611391565b610476565b005b61019e6101ae3660046113c4565b6105ce565b6101186101c1366004611407565b610735565b6000546101189073ffffffffffffffffffffffffffffffffffffffff1681565b61019e6101f4366004611391565b610959565b6004545b604051908152602001610139565b61019e610219366004611391565b610aac565b6101fd61022c366004611329565b5490565b61024361023e36600461154e565b610bff565b6040516101399190611603565b61019e61025e366004611366565b610ccd565b610155610271366004611366565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6101556102aa366004611654565b610dbe565b60006102bb3083610e22565b92915050565b60008173ffffffffffffffffffffffffffffffffffffffff163b6000036102ea57506000919050565b6000808373ffffffffffffffffffffffffffffffffffffffff16604051610334907ff4b9a3fb00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d806000811461036f576040519150601f19603f3d011682016040523d82523d6000602084013e610374565b606091505b50915091508180156103c7575061039881806020019051810190610113919061167e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604081205460ff16806102bb57505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff16806102bb57505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff811661054e576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f862a194379bf36d614b7bbc811097fc33a06ab67366fb58db1f4de91438e369f91a3505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff81166106a1576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526003602090815260408083209488168084529490915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687151590811790915590519293909290917f6dc7f25a946e48c9a5dec5f836659d8470be4b350e53b78df89037bffcdb268791a450505050565b600061074033610425565b61077a576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0a60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090205460ff166107dd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0a60048201526024016104f3565b60006004600081546107ee90611697565b918290555090506107fe816102af565b91506000808673ffffffffffffffffffffffffffffffffffffffff16868660405161082a9291906116f6565b600060405180830381855af49150503d8060008114610865576040519150601f19603f3d011682016040523d82523d6000602084013e61086a565b606091505b50915091508180156108c257506108938180602001905181019061088e9190611706565b61128c565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80156108d257506108d2846102c1565b61090c576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0f60048201526024016104f3565b604051839073ffffffffffffffffffffffffffffffffffffffff8616907f80d4769bbf5966f1c91cdab7c477bd8f74016bd5f5ed3ad18af6b32e29f6da7f90600090a35050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff8116610a2c576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f0a1c6cd77aa2e405e482adf6ee6cf190a27682b6dd1234403f7602e5203c83bb91a3505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff8116610b7f576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f48cc5b4660fae22eabe5e803ee595e63572773d114bcd54ecc118c1efa8d75af91a3505050565b60005460609073ffffffffffffffffffffffffffffffffffffffff163314610c83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e811560018103610cc457816000803e816000fd5b50505092915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260036020908152604080832093851683529290529081205460ff1680610e1b575060005473ffffffffffffffffffffffffffffffffffffffff8381169116145b9392505050565b6000606082600003610e385760009150506102bb565b607f8311610f01576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b604051602081830303815290604052905061127d565b60ff8311610fde576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff00000000000000000000000000000000000000000000000000000000000000166037820152603801610eeb565b61ffff83116110bc576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b166037820152603901610eeb565b62ffffff831161119b576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a01610eeb565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b80516020909101209392505050565b600081516000036112cd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0960048201526024016104f3565b8151602083016000f0905073ffffffffffffffffffffffffffffffffffffffff81166103cf576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0960048201526024016104f3565b60006020828403121561133b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103cf57600080fd5b60006020828403121561137857600080fd5b610e1b82611342565b803580151581146103cf57600080fd5b600080604083850312156113a457600080fd5b6113ad83611342565b91506113bb60208401611381565b90509250929050565b6000806000606084860312156113d957600080fd5b6113e284611342565b92506113f060208501611342565b91506113fe60408501611381565b90509250925092565b60008060006040848603121561141c57600080fd5b61142584611342565b9250602084013567ffffffffffffffff8082111561144257600080fd5b818601915086601f83011261145657600080fd5b81358181111561146557600080fd5b87602082850101111561147757600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156115005761150061148a565b604052919050565b600067ffffffffffffffff8211156115225761152261148a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000806040838503121561156157600080fd5b61156a83611342565b9150602083013567ffffffffffffffff81111561158657600080fd5b8301601f8101851361159757600080fd5b80356115aa6115a582611508565b6114b9565b8181528660208385010111156115bf57600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156115fa5781810151838201526020016115e2565b50506000910152565b60208152600082518060208401526116228160408501602087016115df565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561166757600080fd5b61167083611342565b91506113bb60208401611342565b60006020828403121561169057600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036116ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b8183823760009101908152919050565b60006020828403121561171857600080fd5b815167ffffffffffffffff81111561172f57600080fd5b8201601f8101841361174057600080fd5b805161174e6115a582611508565b81815285602083850101111561176357600080fd5b6117748260208301602086016115df565b9594505050505056fea264697066735822122053019f29ffa92a010959310242eea0d1c89fce0dd52ccba09fb7d8f754227c7464736f6c634300081500330000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638f2db95d11610097578063c7acb01f11610066578063c7acb01f14610230578063f2fde38b14610250578063f4be578714610263578063fbeeca2c1461029c57600080fd5b80638f2db95d146101e657806393656c17146101f9578063a34b5ee81461020b578063b5c736e41461021e57600080fd5b80635f574d4a116100d35780635f574d4a1461018b57806378c7e138146101a057806387339817146101b35780638da5cb5b146101c657600080fd5b806312e366aa146101055780633c11e12a146101425780634502d0631461016557806350c358a414610178575b600080fd5b610118610113366004611329565b6102af565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610155610150366004611366565b6102c1565b6040519015158152602001610139565b610155610173366004611366565b6103d4565b610155610186366004611366565b610425565b61019e610199366004611391565b610476565b005b61019e6101ae3660046113c4565b6105ce565b6101186101c1366004611407565b610735565b6000546101189073ffffffffffffffffffffffffffffffffffffffff1681565b61019e6101f4366004611391565b610959565b6004545b604051908152602001610139565b61019e610219366004611391565b610aac565b6101fd61022c366004611329565b5490565b61024361023e36600461154e565b610bff565b6040516101399190611603565b61019e61025e366004611366565b610ccd565b610155610271366004611366565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6101556102aa366004611654565b610dbe565b60006102bb3083610e22565b92915050565b60008173ffffffffffffffffffffffffffffffffffffffff163b6000036102ea57506000919050565b6000808373ffffffffffffffffffffffffffffffffffffffff16604051610334907ff4b9a3fb00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d806000811461036f576040519150601f19603f3d011682016040523d82523d6000602084013e610374565b606091505b50915091508180156103c7575061039881806020019051810190610113919061167e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604081205460ff16806102bb57505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604081205460ff16806102bb57505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff811661054e576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f862a194379bf36d614b7bbc811097fc33a06ab67366fb58db1f4de91438e369f91a3505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff81166106a1576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526003602090815260408083209488168084529490915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687151590811790915590519293909290917f6dc7f25a946e48c9a5dec5f836659d8470be4b350e53b78df89037bffcdb268791a450505050565b600061074033610425565b61077a576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0a60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090205460ff166107dd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0a60048201526024016104f3565b60006004600081546107ee90611697565b918290555090506107fe816102af565b91506000808673ffffffffffffffffffffffffffffffffffffffff16868660405161082a9291906116f6565b600060405180830381855af49150503d8060008114610865576040519150601f19603f3d011682016040523d82523d6000602084013e61086a565b606091505b50915091508180156108c257506108938180602001905181019061088e9190611706565b61128c565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80156108d257506108d2846102c1565b61090c576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0f60048201526024016104f3565b604051839073ffffffffffffffffffffffffffffffffffffffff8616907f80d4769bbf5966f1c91cdab7c477bd8f74016bd5f5ed3ad18af6b32e29f6da7f90600090a35050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff8116610a2c576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f0a1c6cd77aa2e405e482adf6ee6cf190a27682b6dd1234403f7602e5203c83bb91a3505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b8173ffffffffffffffffffffffffffffffffffffffff8116610b7f576040517faeae7c0d00000000000000000000000000000000000000000000000000000000815261cf0d60048201526024016104f3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f48cc5b4660fae22eabe5e803ee595e63572773d114bcd54ecc118c1efa8d75af91a3505050565b60005460609073ffffffffffffffffffffffffffffffffffffffff163314610c83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e811560018103610cc457816000803e816000fd5b50505092915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104f3565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260036020908152604080832093851683529290529081205460ff1680610e1b575060005473ffffffffffffffffffffffffffffffffffffffff8381169116145b9392505050565b6000606082600003610e385760009150506102bb565b607f8311610f01576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b604051602081830303815290604052905061127d565b60ff8311610fde576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff00000000000000000000000000000000000000000000000000000000000000166037820152603801610eeb565b61ffff83116110bc576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b166037820152603901610eeb565b62ffffff831161119b576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a01610eeb565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b80516020909101209392505050565b600081516000036112cd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0960048201526024016104f3565b8151602083016000f0905073ffffffffffffffffffffffffffffffffffffffff81166103cf576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0960048201526024016104f3565b60006020828403121561133b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103cf57600080fd5b60006020828403121561137857600080fd5b610e1b82611342565b803580151581146103cf57600080fd5b600080604083850312156113a457600080fd5b6113ad83611342565b91506113bb60208401611381565b90509250929050565b6000806000606084860312156113d957600080fd5b6113e284611342565b92506113f060208501611342565b91506113fe60408501611381565b90509250925092565b60008060006040848603121561141c57600080fd5b61142584611342565b9250602084013567ffffffffffffffff8082111561144257600080fd5b818601915086601f83011261145657600080fd5b81358181111561146557600080fd5b87602082850101111561147757600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156115005761150061148a565b604052919050565b600067ffffffffffffffff8211156115225761152261148a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000806040838503121561156157600080fd5b61156a83611342565b9150602083013567ffffffffffffffff81111561158657600080fd5b8301601f8101851361159757600080fd5b80356115aa6115a582611508565b6114b9565b8181528660208385010111156115bf57600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156115fa5781810151838201526020016115e2565b50506000910152565b60208152600082518060208401526116228160408501602087016115df565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561166757600080fd5b61167083611342565b91506113bb60208401611342565b60006020828403121561169057600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036116ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b8183823760009101908152919050565b60006020828403121561171857600080fd5b815167ffffffffffffffff81111561172f57600080fd5b8201601f8101841361174057600080fd5b805161174e6115a582611508565b81815285602083850101111561176357600080fd5b6117748260208301602086016115df565b9594505050505056fea264697066735822122053019f29ffa92a010959310242eea0d1c89fce0dd52ccba09fb7d8f754227c7464736f6c63430008150033

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

0000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e

-----Decoded View---------------
Arg [0] : owner_ (address): 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.