Contains events that can be generated by fund contract.

1. Events

1.1. Deposit

  event Deposit(
    address owner,
    uint256 amount,
    uint256 share
  )

This event will be triggered when the fund token is deposited

Parameters:

Name Type Description
owner address Depositor address
amount uint256 Deposit amount
share uint256 Amount of fund share token

1.2. Withdraw

  event Withdraw(
    address owner,
    uint256 amount,
    uint256 share
  )

When the fund is withdrawn, the event will be triggered

Parameters:

Name Type Description
owner address Fund asset owner address
amount uint256 Withdraw amount
share uint256 Amount of fund share token

1.3. SetDescriptor

  event SetDescriptor(
    bytes descriptor
  )

Triggered when setDescriptor is called

Parameters:

Name Type Description
descriptor bytes Fund's descriptor information

1.4. SetDeadline

  event SetDeadline(
    uint256 deadline
  )

Triggered when setDepositDeadline is called

Parameters:

Name Type Description
deadline uint256 Fund deposit's deadline

1.5. SetPath

  event SetPath(
    address distToken,
    bytes path
  )

Triggered when setPath is called

Parameters:

Name Type Description
distToken address Traget token address
path bytes Token swap token

1.6. Init

  event Init(
    uint256 poolIndex,
    uint256 positionIndex,
    uint256 amount
  )

Triggered when 'Init' is called

Parameters:

Name Type Description
poolIndex uint256 Pool index number
positionIndex uint256 Position index number
amount uint256 Investment amount

1.7. Add

  event Add(
    uint256 poolIndex,
    uint256 positionIndex,
    uint256 amount,
    bool collect
  )

Triggered when 'Add' is called

Parameters:

Name Type Description
poolIndex uint256 Pool index number
positionIndex uint256 Position index number
amount uint256 Investment amount
collect bool Whether to collect the fees that have been incurred and reinvest

1.8. Sub

  event Sub(
    uint256 poolIndex,
    uint256 positionIndex,
    uint256 proportionX128
  )

Triggered when 'Sub' is called

Parameters:

Name Type Description
poolIndex uint256 Pool index number
positionIndex uint256 Position index number
proportionX128 uint256 The percentage of divestment, shifted to the left by 128 bits; 0 is allowed, and 0 means that only handling fees are collected

1.9. Move

  event Move(
    uint256 poolIndex,
    uint256 subIndex,
    uint256 addIndex,
    uint256 proportionX128
  )

Triggered when 'Move' is called

Parameters:

Name Type Description
poolIndex uint256 Pool index number
subIndex uint256 The index number of the position to be subtracted
addIndex uint256 The index number of the position to be added
proportionX128 uint256 Adjust the ratio, move 128 bits to the left
Copyright © hotpot fund 2021 all right reserved,powered by GitbookUpdated At: 2021-12-28 10:33:50

results matching ""

    No results matching ""