Documentation ¶
Index ¶
- Variables
- func AddCallParameters(position *entities.Position, opts *AddLiquidityOptions) (*utils.MethodParameters, error)
- func CollectCallParameters(opts *CollectOptions) (*utils.MethodParameters, error)
- func CreateCallParameters(pool *entities.Pool) (*utils.MethodParameters, error)
- func EncodeAllowedPermit(token *entities.Token, options *AllowedPermitArguments) ([]byte, error)
- func EncodeMulticall(calldatas [][]byte) ([]byte, error)
- func EncodePermit(token *entities.Token, options *PermitOptions) ([]byte, error)
- func EncodeRefundETH() []byte
- func EncodeStandardPermit(token *entities.Token, options *StandardPermitArguments) ([]byte, error)
- func EncodeSweepToken(token *entities.Token, amountMinimum *big.Int, recipient common.Address, ...) ([]byte, error)
- func EncodeUnwrapWETH9(amountMinimum *big.Int, recipient common.Address, feeOptions *FeeOptions) ([]byte, error)
- func RemoveCallParameters(position *entities.Position, opts *RemoveLiquidityOptions) (*utils.MethodParameters, error)
- func SafeTransferFromParameters(opts *SafeTransferOptions) (*utils.MethodParameters, error)
- type AddLiquidityOptions
- type AllowedPermitArguments
- type CollectOptions
- type CollectParams
- type CommonAddLiquidityOptions
- type DecreaseLiquidityParams
- type FeeOptions
- type IncreaseLiquidityParams
- type IncreaseOptions
- type IncreaseSpecificOptions
- type MintOptions
- type MintParams
- type MintSpecificOptions
- type NFTPermitOptions
- type PermitOptions
- type RemoveLiquidityOptions
- type SafeTransferOptions
- type StandardPermitArguments
- type WrappedABI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrZeroLiquidity = errors.New("zero liquidity") ErrNoWETH = errors.New("no WETH") ErrCannotBurn = errors.New("cannot burn") )
View Source
var (
ErrInvalidOptions = errors.New("invalid options")
)
Functions ¶
func AddCallParameters ¶
func AddCallParameters(position *entities.Position, opts *AddLiquidityOptions) (*utils.MethodParameters, error)
func CollectCallParameters ¶
func CollectCallParameters(opts *CollectOptions) (*utils.MethodParameters, error)
func CreateCallParameters ¶
func CreateCallParameters(pool *entities.Pool) (*utils.MethodParameters, error)
func EncodeAllowedPermit ¶
func EncodeAllowedPermit(token *entities.Token, options *AllowedPermitArguments) ([]byte, error)
func EncodeMulticall ¶
func EncodePermit ¶
func EncodePermit(token *entities.Token, options *PermitOptions) ([]byte, error)
func EncodeRefundETH ¶
func EncodeRefundETH() []byte
func EncodeStandardPermit ¶
func EncodeStandardPermit(token *entities.Token, options *StandardPermitArguments) ([]byte, error)
func EncodeSweepToken ¶
func EncodeUnwrapWETH9 ¶
func RemoveCallParameters ¶
func RemoveCallParameters(position *entities.Position, opts *RemoveLiquidityOptions) (*utils.MethodParameters, error)
*
- Produces the calldata for completely or partially exiting a position
- @param position The position to exit
- @param options Additional information necessary for generating the calldata
- @returns The call parameters
func SafeTransferFromParameters ¶
func SafeTransferFromParameters(opts *SafeTransferOptions) (*utils.MethodParameters, error)
Types ¶
type AddLiquidityOptions ¶
type AddLiquidityOptions struct { *CommonAddLiquidityOptions *MintSpecificOptions *IncreaseSpecificOptions }
type AllowedPermitArguments ¶
type CollectOptions ¶
type CollectOptions struct { TokenID *big.Int // Indicates the ID of the position to collect for ExpectedCurrencyOwed0 *core.CurrencyAmount // Expected value of tokensOwed0, including as-of-yet-unaccounted-for fees/liquidity value to be burned ExpectedCurrencyOwed1 *core.CurrencyAmount // Expected value of tokensOwed1, including as-of-yet-unaccounted-for fees/liquidity value to be burned ExpectedTokenOwed0 *core.Token // TODO: merge this with Currency ExpectedTokenOwed1 *core.Token // TODO: merge this with Currency Recipient common.Address // The account that should receive the tokens }
type CollectParams ¶
type CommonAddLiquidityOptions ¶
type CommonAddLiquidityOptions struct { SlippageTolerance *core.Percent // How much the pool price is allowed to move Deadline *big.Int // When the transaction expires, in epoch seconds UseNative *core.Currency // Whether to spend ether. If true, one of the pool tokens must be WETH, by default false NativeToken *core.Token // TODO: merge this with UseNative Token0Permit *PermitOptions // The optional permit parameters for spending token0 Token1Permit *PermitOptions // The optional permit parameters for spending token1 }
Options for producing the calldata to add liquidity
type DecreaseLiquidityParams ¶
type FeeOptions ¶
type IncreaseLiquidityParams ¶
type IncreaseOptions ¶
type IncreaseOptions struct { *CommonAddLiquidityOptions *IncreaseSpecificOptions }
type IncreaseSpecificOptions ¶
type MintOptions ¶
type MintOptions struct { *CommonAddLiquidityOptions *MintSpecificOptions }
type MintParams ¶
type MintSpecificOptions ¶
type NFTPermitOptions ¶
type PermitOptions ¶
type PermitOptions struct { *StandardPermitArguments *AllowedPermitArguments }
type RemoveLiquidityOptions ¶
type RemoveLiquidityOptions struct { TokenID *big.Int // The ID of the token to exit LiquidityPercentage *core.Percent // The percentage of position liquidity to exit SlippageTolerance *core.Percent // How much the pool price is allowed to move Deadline *big.Int // When the transaction expires, in epoch seconds. BurnToken bool // Whether the NFT should be burned if the entire position is being exited, by default false Permit *NFTPermitOptions // The optional permit of the token ID being exited, in case the exit transaction is being sent by an account that does not own the NFT CollectOptions *CollectOptions // Parameters to be passed on to collect }
Options for producing the calldata to exit a position
type SafeTransferOptions ¶
type SafeTransferOptions struct { Sender common.Address // The account sending the NFT Recipient common.Address // The account that should receive the NFT TokenID *big.Int // The id of the token being sent Data []byte // The optional parameter that passes data to the `onERC721Received` call for the staker }
type StandardPermitArguments ¶
type WrappedABI ¶
Click to show internal directories.
Click to hide internal directories.