Skip to content

FluidVaultT2DeploymentLogic ​

Git Source

Inherits:Error

State Variables ​

NATIVE_TOKEN ​

solidity
address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

LIQUIDITY ​

address of liquidity contract

solidity
address public immutable LIQUIDITY;

DEX_FACTORY ​

solidity
address public immutable DEX_FACTORY;

DEPLOYER ​

solidity
address public immutable DEPLOYER;

MINI_DEPLOYER ​

address of MiniDeployer Contract

solidity
MiniDeployer public immutable MINI_DEPLOYER;

ADMIN_IMPLEMENTATION ​

address of Admin implementation

solidity
address public immutable ADMIN_IMPLEMENTATION;

SECONDARY_IMPLEMENTATION ​

address of Secondary implementation

solidity
address public immutable SECONDARY_IMPLEMENTATION;

VAULT_T2_CREATIONCODE_MAIN_OPERATE ​

solidity
address public immutable VAULT_T2_CREATIONCODE_MAIN_OPERATE;

VAULT_T2_CREATIONCODE_MAIN ​

solidity
address public immutable VAULT_T2_CREATIONCODE_MAIN;

ADDRESS_THIS ​

address of this contract

solidity
address public immutable ADDRESS_THIS;

Functions ​

constructor ​

each vault type has different vaultAdminImplementation but same vaultSecondaryImplementatio

solidity
constructor(
    address liquidity_,
    address vaultFactory_,
    address dexFactory_,
    address deployer_,
    address vaultAdminImplementation_,
    address vaultSecondaryImplementation_,
    address vaultOperateImplementation_,
    address vaultMainImplementation_
);

vaultT2 ​

solidity
function vaultT2(address smartCol_, address borrowToken_) external returns (bytes memory vaultCreationBytecode_);

_calculateLiquidityVaultSlots ​

solidity
function _calculateLiquidityVaultSlots(IFluidVaultT2.ConstantViews memory constants_, address vault_)
    private
    pure
    returns (IFluidVaultT2.ConstantViews memory);

Events ​

VaultT2Deployed ​

Emitted when a new vaultT2 is deployed.

solidity
event VaultT2Deployed(address indexed vault, uint256 vaultId, address indexed smartCol, address indexed borrowToken);

Parameters

NameTypeDescription
vaultaddressThe address of the newly deployed vault.
vaultIduint256The id of the newly deployed vault.
smartColaddressThe address of the dex for which the smart collateral is used.
borrowTokenaddressThe address of the borrow token.