Skip to content

FluidVaultT4DeploymentLogic ​

Git Source

Inherits:Error

Constants ​

NATIVE_TOKEN ​

solidity
address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE

LIQUIDITY ​

address of liquidity contract

solidity
address public immutable LIQUIDITY

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_T4_CREATIONCODE_MAIN_OPERATE ​

solidity
address public immutable VAULT_T4_CREATIONCODE_MAIN_OPERATE

VAULT_T4_CREATIONCODE_MAIN_ADDRESS_1 ​

SSTORE2 pointer for the VaultT4 creation code. Stored externally to reduce factory bytecode (in 2 parts)

solidity
address internal immutable VAULT_T4_CREATIONCODE_MAIN_ADDRESS_1

VAULT_T4_CREATIONCODE_MAIN_ADDRESS_2 ​

solidity
address internal immutable VAULT_T4_CREATIONCODE_MAIN_ADDRESS_2

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 deployer_,
    address vaultAdminImplementation_,
    address vaultSecondaryImplementation_,
    address vaultOperateImplementation_,
    address vaultMainImplementation1_,
    address vaultMainImplementation2_
) ;

vaultT4 ​

solidity
function vaultT4(address smartCol_, address smartDebt_) external returns (bytes memory vaultCreationBytecode_);

operateCreationCode ​

Retrieves the creation code for the Operate contract

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

mainCreationCode ​

returns the stored DexT1 creation bytecode

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

_calculateVaultSlots ​

solidity
function _calculateVaultSlots(IFluidVaultT4.ConstantViews memory constants_, address vault_)
    private
    pure
    returns (IFluidVaultT4.ConstantViews memory);

Events ​

VaultT4Deployed ​

Emitted when a new vaultT4 is deployed.

solidity
event VaultT4Deployed(address indexed vault, uint256 vaultId, address indexed smartCol, address indexed smartDebt);

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.
smartDebtaddressThe address of the dex for which the smart debt is used.