NonfungiblePositionManager
Handles the encoding of calldata for various position NFT operations.
GitHub File: nonfungiblePositionManager.ts
Properties
Public
Property | Type | Modifier | Description |
---|---|---|---|
INTERFACE | static | The Application Binary Interface for the related Elastic contracts. |
Constructor
Private constructor that cannot be constructed.
Methods
encodeCreate() - private
static
private
static
Handles the encoding of calldata to create a new position if the pool does not exist. Additionally, unlocks/initializes a created pool to enable pool interactions.
Parameters
Params | Type | Description |
---|---|---|
pool | The pool to create and initialize. |
Returns
Type | Description |
---|---|
string | The address of the pool that has been created/initialized. Formatted as a DataHexString. |
createCallParameters() - public
static
public
static
Add 0
hex value parameter to the encodeCreate()
function.
Parameters
Params | Type | Description |
---|---|---|
pool | The pool to create and initialize. |
Returns
Type | Description |
---|---|
An object containing:
|
createCallParametersTest() - public
static
public
static
Add ETH hex value parameter to the encodeCreate()
function.
Parameters
Params | Type | Description |
---|---|---|
pool | The pool to create and initialize. | |
ethAmount | The ETH amount (in wei) to be added to the value paramter. |
Returns
Type | Description |
---|---|
An object containing:
|
addCallParameters() - public
static
public
static
Handles the encoding of calldata to mint a new position or add liquidity to an existing position.
Parameters
Params | Type | Description |
---|---|---|
position | The position(s) to create or add liquidity to. | |
ticks | number[] | number[][] | The previous ticks where liquidity was added to a position. |
options | AddLiquidityOptions | The type of liquidity addition operation:
|
Returns
Type | Description |
---|---|
An object containing:
|
encodeCollect() - private
static
private
static
Handles the encoding of calldata to collect fees accrued to the position.
Parameters
Params | Type | Description |
---|---|---|
options | An object consisting of fee collection data:
|
Returns
Type | Description |
---|---|
string[] | The hex encoded calldata to perform the collect fee operations. |
collectCallParameters() - public
static
public
static
Add 0
hex value parameter to the encodeCollect()
function.
Parameters
Params | Type | Description |
---|---|---|
options | See encodeCollect() parameters. |
Returns
Type | Description |
---|---|
An object containing:
|
removeCallParameters() - public
static
public
static
Handles the encoding of calldata to remove a position's liquidity.
Parameters
Params | Type | Description |
---|---|---|
options | An object consisting of NFT transfer data:
|
Returns
Type | Description |
---|---|
An object containing:
|
safeTransferFromParameters() - public
static
public
static
Handles the encoding of calldata to transfer the position NFT from one address to another.
Parameters
Params | Type | Description |
---|---|---|
position | ||
options | An object consisting of liquidity removal data:
|
Returns
Type | Description |
---|---|
An object containing:
|
Last updated