LBBaseHooks
Last updated
Last updated
Inherits:
Base contract for LBPair hooks This contract is meant to be inherited by any contract that wants to implement LBPair hooks
Modifier to check that the caller is the trusted caller
Returns the LBPair contract
Returns
<none>
ILBPair
The LBPair contract
Returns whether the contract is linked to the pair or not
Returns
<none>
bool
Whether the contract is linked to the pair or not
Hook called by the pair when the hooks parameters are set
Only callable by the pair
Parameters
hooksParameters
bytes32
The hooks parameters
onHooksSetData
bytes
The onHooksSet data
Returns
<none>
bytes4
The function selector
Hook called by the pair before a swap
Only callable by the pair
Parameters
sender
address
The address that initiated the swap
to
address
The address that will receive the swapped tokens
swapForY
bool
Whether the swap is for token Y
amountsIn
bytes32
The amounts in
Returns
<none>
bytes4
The function selector
Hook called by the pair after a swap
Only callable by the pair
Parameters
sender
address
The address that initiated the swap
to
address
The address that received the swapped tokens
swapForY
bool
Whether the swap was for token Y
amountsOut
bytes32
The amounts out
Returns
<none>
bytes4
The function selector
Hook called by the pair before a flash loan
Only callable by the pair
Parameters
sender
address
The address that initiated the flash loan
to
address
The address that will receive the flash loaned tokens
amounts
bytes32
The amounts
Returns
<none>
bytes4
The function selector
Hook called by the pair after a flash loan
Only callable by the pair
Parameters
sender
address
The address that initiated the flash loan
to
address
The address that received the flash loaned tokens
fees
bytes32
The flashloan fees
feesReceived
bytes32
The fees received
Returns
<none>
bytes4
The function selector
Hook called by the pair before minting
Only callable by the pair
Parameters
sender
address
The address that initiated the mint
to
address
The address that will receive the minted tokens
liquidityConfigs
bytes32[]
The liquidity configurations
amountsReceived
bytes32
The amounts received
Returns
<none>
bytes4
The function selector
Hook called by the pair after minting
Only callable by the pair
Parameters
sender
address
The address that initiated the mint
to
address
The address that received the minted tokens
liquidityConfigs
bytes32[]
The liquidity configurations
amountsIn
bytes32
The amounts in
Returns
<none>
bytes4
The function selector
Hook called by the pair before burning
Only callable by the pair
Parameters
sender
address
The address that initiated the burn
from
address
The address that will burn the tokens
to
address
The address that will receive the burned tokens
ids
uint256[]
The token ids
amountsToBurn
uint256[]
The amounts to burn
Returns
<none>
bytes4
The function selector
Hook called by the pair after burning
Only callable by the pair
Parameters
sender
address
The address that initiated the burn
from
address
The address that burned the tokens
to
address
The address that received the burned tokens
ids
uint256[]
The token ids
amountsToBurn
uint256[]
The amounts to burn
Returns
<none>
bytes4
The function selector
Hook called by the pair before a batch transfer
Only callable by the pair
Parameters
sender
address
The address that initiated the transfer
from
address
The address that will transfer the tokens
to
address
The address that will receive the tokens
ids
uint256[]
The token ids
amounts
uint256[]
The amounts
Returns
<none>
bytes4
The function selector
Hook called by the pair after a batch transfer
Only callable by the pair
Parameters
sender
address
The address that initiated the transfer
from
address
The address that transferred the tokens
to
address
The address that received the tokens
ids
uint256[]
The token ids
amounts
uint256[]
The amounts
Returns
<none>
bytes4
The function selector
Checks that the caller is the trusted caller, otherwise reverts
Checks if the contract is linked to the pair
Returns
<none>
bool
Whether the contract is linked to the pair or not
Returns the LBPair contract
Internal function to be overridden that is called when the hooks parameters are set
Parameters
hooksParameters
bytes32
The hooks parameters
onHooksSetData
bytes
The onHooksSet data
Internal function to be overridden that is called before a swap
Parameters
sender
address
The address that initiated the swap
to
address
The address that will receive the swapped tokens
swapForY
bool
Whether the swap is for token Y
amountsIn
bytes32
The amounts in
Internal function to be overridden that is called after a swap
Parameters
sender
address
The address that initiated the swap
to
address
The address that received the swapped tokens
swapForY
bool
Whether the swap was for token Y
amountsOut
bytes32
The amounts out
Internal function to be overridden that is called before a flash loan
Parameters
sender
address
The address that initiated the flash loan
to
address
The address that will receive the flash loaned tokens
amounts
bytes32
The amounts
Internal function to be overridden that is called after a flash loan
Parameters
sender
address
The address that initiated the flash loan
to
address
The address that received the flash loaned tokens
fees
bytes32
The flashloan fees
feesReceived
bytes32
The fees received
Internal function to be overridden that is called before minting
Parameters
sender
address
The address that initiated the mint
to
address
The address that will receive the minted tokens
liquidityConfigs
bytes32[]
The liquidity configurations
amountsReceived
bytes32
The amounts received
Internal function to be overridden that is called after minting
Parameters
sender
address
The address that initiated the mint
to
address
The address that received the minted tokens
liquidityConfigs
bytes32[]
The liquidity configurations
amountsIn
bytes32
The amounts in
Internal function to be overridden that is called before burning
Parameters
sender
address
The address that initiated the burn
from
address
The address that will burn the tokens
to
address
The address that will receive the burned tokens
ids
uint256[]
The token ids
amountsToBurn
uint256[]
The amounts to burn
Internal function to be overridden that is called after burning
Parameters
sender
address
The address that initiated the burn
from
address
The address that burned the tokens
to
address
The address that received the burned tokens
ids
uint256[]
The token ids
amountsToBurn
uint256[]
The amounts to burn
Internal function to be overridden that is called before a batch transfer
Parameters
sender
address
The address that initiated the transfer
from
address
The address that will transfer the tokens
to
address
The address that will receive the tokens
ids
uint256[]
The token ids
amounts
uint256[]
The amounts
Internal function to be overridden that is called after a batch transfer
Parameters
sender
address
The address that initiated the transfer
from
address
The address that transferred the tokens
to
address
The address that received the tokens
ids
uint256[]
The token ids
amounts
uint256[]
The amounts