本接口包含任何人都可以调用的状态变量和只读方法。

1. Functions

1.1. controller

  function controller() external returns (address)

返回控制器合约地址

1.2. manager

  function manager() external returns (address)

返回基金经理地址

1.3. token

  function token() external returns (address)

返回基金本币地址

1.4. descriptor

  function descriptor() external returns (bytes)

返回 32 字节的基金名称 + 任意长度的简要说明

1.5. lockPeriod

  function lockPeriod() external returns (uint256)

返回基金存入锁定期

1.6. baseLine

  function baseLine() external returns (uint256)

返回基金收费基线

1.7. managerFee

  function managerFee() external returns (uint256)

返回基金经理收益分成比例

1.8. depositDeadline

  function depositDeadline() external returns (uint256)

返回基金可存入截止时间

1.9. lastDepositTime

  function lastDepositTime(
    address account
  ) external returns (uint256)

查询用户account的最新存入时间

Parameters:

Name Type Description
account address 要查询的目标地址

1.10. totalInvestment

  function totalInvestment() external returns (uint256)

返回总的投入本金

1.11. investmentOf

  function investmentOf(
    address owner
  ) external returns (uint256)

返回用户owner的投资本金

Parameters:

Name Type Description
owner address 要查询的目标地址

1.12. assetsOfPosition

  function assetsOfPosition(
    uint256 poolIndex,
    uint256 positionIndex
  ) external returns (uint256)

获取指定头寸的基金本币资产数量

Parameters:

Name Type Description
poolIndex uint256 池子索引位置
positionIndex uint256 头寸索引位置

1.13. assetsOfPool

  function assetsOfPool(
    uint256 poolIndex
  ) external returns (uint256)

获取指定池子的基金本币资产数量

Parameters:

Name Type Description
poolIndex uint256 池子索引位置

1.14. totalAssets

  function totalAssets() external returns (uint256)

获取基金总的基金本币数量。

该数量是用基金本币衡量的资产数量。

1.15. buyPath

  function buyPath(
    address _token
  ) external returns (bytes)

用基金本币购买某币的交易路径。

交易路径是Uniswap V3 兑换代币路径格式。

Parameters:

Name Type Description
_token address 目标代币

1.16. sellPath

  function sellPath(
    address _token
  ) external returns (bytes)

兑换代币成基金本币的交易路径。

交易路径是Uniswap V3 兑换代币路径格式。

Parameters:

Name Type Description
_token address 目标代币

1.17. pools

  function pools(
    uint256 index
  ) external returns (address)

查询指定索引位置的池子地址

Parameters:

Name Type Description
index uint256 池子索引位置

1.18. positions

  function positions(
    uint256 poolIndex,
    uint256 positionIndex
  ) external returns (bool isEmpty, int24 tickLower, int24 tickUpper)

获取指定位置的头寸信息

由于基金需要遍历所有头寸,所以使用二维动态数组来存储头寸。

Parameters:

Name Type Description
poolIndex uint256 池子索引位置
positionIndex uint256 池子索引位置

Return Values:

Name Type Description
isEmpty bool 是否是一个空头寸
tickLower uint256 tick上界
tickUpper uint256 tick下界

1.19. poolsLength

  function poolsLength() external returns (uint256)

获取基金总的池子长度

1.20. positionsLength

  function positionsLength(
    uint256 poolIndex
  ) external returns (uint256)

获取指定池子的所有头寸长度

Parameters:

Name Type Description
poolIndex uint256 池子索引位置
Copyright © hotpot fund 2021 all right reserved,powered by GitbookUpdated At: 2021-12-29 09:38:25

results matching ""

    No results matching ""