Skip to content

FluidDexT1DeploymentLogic ​

Git Source

Inherits:Error

Constants ​

POOL_T1_CREATIONCODE_ADDRESS_1 ​

SSTORE2 pointers for PoolT1 creation code - stored in two parts for concat

solidity
address internal immutable POOL_T1_CREATIONCODE_ADDRESS_1

POOL_T1_CREATIONCODE_ADDRESS_2 ​

solidity
address internal immutable POOL_T1_CREATIONCODE_ADDRESS_2

COL_OPERATIONS_CREATIONCODE_ADDRESS_1 ​

SSTORE2 pointers for col operations creation code

solidity
address internal immutable COL_OPERATIONS_CREATIONCODE_ADDRESS_1

COL_OPERATIONS_CREATIONCODE_ADDRESS_2 ​

solidity
address internal immutable COL_OPERATIONS_CREATIONCODE_ADDRESS_2

DEBT_OPERATIONS_CREATIONCODE_ADDRESS_1 ​

SSTORE2 pointers for debt operations creation code

solidity
address internal immutable DEBT_OPERATIONS_CREATIONCODE_ADDRESS_1

DEBT_OPERATIONS_CREATIONCODE_ADDRESS_2 ​

solidity
address internal immutable DEBT_OPERATIONS_CREATIONCODE_ADDRESS_2

LIQUIDITY ​

address of liquidity contract

solidity
address public immutable LIQUIDITY

DEX_FACTORY ​

address of dexfactory contract

solidity
address public immutable DEX_FACTORY

ADMIN_IMPLEMENTATION ​

address of Admin implementation

solidity
address public immutable ADMIN_IMPLEMENTATION

SHIFT_IMPLEMENTATION ​

address of Shift implementation

solidity
address public immutable SHIFT_IMPLEMENTATION

CONTRACT_DEPLOYER ​

address of Deployer Contract

solidity
address public immutable CONTRACT_DEPLOYER

MINI_DEPLOYER ​

address of MiniDeployer Contract

solidity
MiniDeployer public immutable MINI_DEPLOYER

ADDRESS_THIS ​

address of this contract

solidity
address public immutable ADDRESS_THIS

Functions ​

constructor ​

solidity
constructor(
    address liquidity_,
    address dexFactory_,
    address contractDeployer_,
    address colOperations1_,
    address colOperations2_,
    address debtOperations1_,
    address debtOperations2_,
    address mainAddress1_,
    address mainAddress2_
) ;

dexT1 ​

solidity
function dexT1(address token0_, address token1_, uint256 oracleMapping_)
    external
    returns (bytes memory dexCreationBytecode_);

dexT1CreationBytecode ​

returns the stored DexT1 creation bytecode

solidity
function dexT1CreationBytecode() public view returns (bytes memory);

colOperationsCreationCode ​

Retrieves the creation code for the FluidDexT1OperationsCol contract

solidity
function colOperationsCreationCode() public view returns (bytes memory);

debtOperationsCreationCode ​

Retrieves the creation code for the FluidDexT1OperationsDebt contract

solidity
function debtOperationsCreationCode() public view returns (bytes memory);

perfectOperationsCreationCode ​

Retrieves the creation code for the FluidDexT1PerfectOperations contract

solidity
function perfectOperationsCreationCode() public pure returns (bytes memory);

_calculateLiquidityDexSlots ​

Calculates the liquidity dex slots for the given supply token, borrow token, and dex (dex_).

solidity
function _calculateLiquidityDexSlots(IFluidDexT1.ConstantViews memory constants_, address dex_)
    private
    pure
    returns (IFluidDexT1.ConstantViews memory);

Parameters

NameTypeDescription
constants_IFluidDexT1.ConstantViewsConstants struct as used in Dex T1
dex_addressThe address of the dex.

Returns

NameTypeDescription
<none>IFluidDexT1.ConstantViewsliquidityDexSlots_ Returns the calculated liquidity dex slots set in the IFluidDexT1.ConstantViews struct.

Events ​

DexT1Deployed ​

Emitted when a new dexT1 is deployed.

solidity
event DexT1Deployed(address indexed dex, uint256 dexId, address indexed supplyToken, address indexed borrowToken);

Parameters

NameTypeDescription
dexaddressThe address of the newly deployed dex.
dexIduint256The id of the newly deployed dex.
supplyTokenaddressThe address of the supply token.
borrowTokenaddressThe address of the borrow token.