View Source Uniswap.Contracts.NonfungiblePositionManager (Uniswap v0.0.2-dev)

Uniswap's NFT Position Manager

Summary

Functions

Default address of the contract. Returns nil if not specified.

Prepares approve(address to, uint256 tokenId) call parameters on the contract.

Prepares balanceOf(address owner) call parameters on the contract.

Prepares baseURI() call parameters on the contract.

Prepares burn(uint256 tokenId) call parameters on the contract.

Prepares collect((uint256,address,uint128,uint128) params) call parameters on the contract.

Prepares contract constructor values for deployment.

Prepares createAndInitializePoolIfNecessary(address token0, address token1, uint24 fee, uint160 sqrtPriceX96) call parameters on the contract.

Prepares decreaseLiquidity((uint256,uint128,uint256,uint256,uint256) params) call parameters on the contract.

Prepares DOMAIN_SEPARATOR() call parameters on the contract.

Prepares factory() call parameters on the contract.

Prepares getApproved(uint256 tokenId) call parameters on the contract.

Prepares increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256) params) call parameters on the contract.

Prepares isApprovedForAll(address owner, address operator) call parameters on the contract.

Prepares mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256) params) call parameters on the contract.

Prepares multicall(bytes[] data) call parameters on the contract.

Prepares name() call parameters on the contract.

Prepares ownerOf(uint256 tokenId) call parameters on the contract.

Prepares permit(address spender, uint256 tokenId, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

Prepares PERMIT_TYPEHASH() call parameters on the contract.

Prepares positions(uint256 tokenId) call parameters on the contract.

Prepares refundETH() call parameters on the contract.

Prepares safeTransferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

Prepares safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) call parameters on the contract.

Prepares selfPermit(address token, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

Prepares selfPermitAllowed(address token, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

Prepares selfPermitAllowedIfNecessary(address token, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

Prepares selfPermitIfNecessary(address token, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

Prepares setApprovalForAll(address operator, bool approved) call parameters on the contract.

Prepares supportsInterface(bytes4 interfaceId) call parameters on the contract.

Prepares sweepToken(address token, uint256 amountMinimum, address recipient) call parameters on the contract.

Prepares symbol() call parameters on the contract.

Prepares tokenByIndex(uint256 index) call parameters on the contract.

Prepares tokenOfOwnerByIndex(address owner, uint256 index) call parameters on the contract.

Prepares tokenURI(uint256 tokenId) call parameters on the contract.

Prepares totalSupply() call parameters on the contract.

Prepares transferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

Prepares uniswapV3MintCallback(uint256 amount0Owed, uint256 amount1Owed, bytes data) call parameters on the contract.

Prepares unwrapWETH9(uint256 amountMinimum, address recipient) call parameters on the contract.

Prepares WETH9() call parameters on the contract.

Functions

@spec __default_address__() :: Ethers.Types.t_address()

Default address of the contract. Returns nil if not specified.

To specify a default address see Ethers.Contract

Prepares approve(address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

@spec balance_of(Ethers.Types.t_address()) :: Ethers.TxData.t()

Prepares balanceOf(address owner) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • owner: :address

Return Types (when called with Ethers.call/2)

  • {:uint, 256}
@spec base_uri() :: Ethers.TxData.t()

Prepares baseURI() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: pure

Return Types (when called with Ethers.call/2)

  • :string
@spec burn(non_neg_integer()) :: Ethers.TxData.t()

Prepares burn(uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Prepares collect((uint256,address,uint128,uint128) params) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • params: {:tuple, [{:uint, 256}, :address, {:uint, 128}, {:uint, 128}]}

Return Types (when called with Ethers.call/2)

  • amount0: {:uint, 256}
  • amount1: {:uint, 256}
Link to this function

constructor(factory, weth9, token_descriptor_)

View Source

Prepares contract constructor values for deployment.

To deploy a contracts use Ethers.deploy/2 and pass the result of this function as :encoded_constructor option.

Parameters

  • _factory: :address
  • _WETH9: :address
  • tokenDescriptor: :address
Link to this function

create_and_initialize_pool_if_necessary(token0, token1, fee, sqrt_price_x96)

View Source
@spec create_and_initialize_pool_if_necessary(
  Ethers.Types.t_address(),
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer()
) :: Ethers.TxData.t()

Prepares createAndInitializePoolIfNecessary(address token0, address token1, uint24 fee, uint160 sqrtPriceX96) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token0: :address
  • token1: :address
  • fee: {:uint, 24}
  • sqrtPriceX96: {:uint, 160}

Return Types (when called with Ethers.call/2)

  • pool: :address
Link to this function

decrease_liquidity(params)

View Source

Prepares decreaseLiquidity((uint256,uint128,uint256,uint256,uint256) params) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • params: {:tuple, [uint: 256, uint: 128, uint: 256, uint: 256, uint: 256]}

Return Types (when called with Ethers.call/2)

  • amount0: {:uint, 256}
  • amount1: {:uint, 256}
@spec domain_separator() :: Ethers.TxData.t()

Prepares DOMAIN_SEPARATOR() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • {:bytes, 32}
@spec factory() :: Ethers.TxData.t()

Prepares factory() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :address
@spec get_approved(non_neg_integer()) :: Ethers.TxData.t()

Prepares getApproved(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :address
Link to this function

increase_liquidity(params)

View Source

Prepares increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256) params) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • params: {:tuple, [uint: 256, uint: 256, uint: 256, uint: 256, uint: 256, uint: 256]}

Return Types (when called with Ethers.call/2)

  • liquidity: {:uint, 128}
  • amount0: {:uint, 256}
  • amount1: {:uint, 256}
Link to this function

is_approved_for_all(owner, operator)

View Source
@spec is_approved_for_all(Ethers.Types.t_address(), Ethers.Types.t_address()) ::
  Ethers.TxData.t()

Prepares isApprovedForAll(address owner, address operator) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • owner: :address
  • operator: :address

Return Types (when called with Ethers.call/2)

  • :bool

Prepares mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256) params) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • params: {:tuple, [:address, :address, {:uint, 24}, {:int, 24}, {:int, 24}, {:uint, 256}, {:uint, 256}, {:uint, 256}, {:uint, 256}, :address, {:uint, 256}]}

Return Types (when called with Ethers.call/2)

  • tokenId: {:uint, 256}
  • liquidity: {:uint, 128}
  • amount0: {:uint, 256}
  • amount1: {:uint, 256}
@spec multicall([binary()]) :: Ethers.TxData.t()

Prepares multicall(bytes[] data) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • data: {:array, :bytes}

Return Types (when called with Ethers.call/2)

  • results: {:array, :bytes}
@spec name() :: Ethers.TxData.t()

Prepares name() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :string
@spec owner_of(non_neg_integer()) :: Ethers.TxData.t()

Prepares ownerOf(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :address
Link to this function

permit(spender, token_id, deadline, v, r, s)

View Source
@spec permit(
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  <<_::256>>,
  <<_::256>>
) :: Ethers.TxData.t()

Prepares permit(address spender, uint256 tokenId, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • spender: :address
  • tokenId: {:uint, 256}
  • deadline: {:uint, 256}
  • v: {:uint, 8}
  • r: {:bytes, 32}
  • s: {:bytes, 32}

Return Types (when called with Ethers.call/2)

This function does not return any values!

@spec permit_typehash() :: Ethers.TxData.t()

Prepares PERMIT_TYPEHASH() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • {:bytes, 32}
@spec positions(non_neg_integer()) :: Ethers.TxData.t()

Prepares positions(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • nonce: {:uint, 96}
  • operator: :address
  • token0: :address
  • token1: :address
  • fee: {:uint, 24}
  • tickLower: {:int, 24}
  • tickUpper: {:int, 24}
  • liquidity: {:uint, 128}
  • feeGrowthInside0LastX128: {:uint, 256}
  • feeGrowthInside1LastX128: {:uint, 256}
  • tokensOwed0: {:uint, 128}
  • tokensOwed1: {:uint, 128}
@spec refund_eth() :: Ethers.TxData.t()

Prepares refundETH() call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

safe_transfer_from(from, to, token_id)

View Source

Prepares safeTransferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

safe_transfer_from(from, to, token_id, data)

View Source

Prepares safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}
  • _data: :bytes

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

self_permit(token, value, deadline, v, r, s)

View Source
@spec self_permit(
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  <<_::256>>,
  <<_::256>>
) :: Ethers.TxData.t()

Prepares selfPermit(address token, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token: :address
  • value: {:uint, 256}
  • deadline: {:uint, 256}
  • v: {:uint, 8}
  • r: {:bytes, 32}
  • s: {:bytes, 32}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

self_permit_allowed(token, nonce, expiry, v, r, s)

View Source
@spec self_permit_allowed(
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  <<_::256>>,
  <<_::256>>
) :: Ethers.TxData.t()

Prepares selfPermitAllowed(address token, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token: :address
  • nonce: {:uint, 256}
  • expiry: {:uint, 256}
  • v: {:uint, 8}
  • r: {:bytes, 32}
  • s: {:bytes, 32}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

self_permit_allowed_if_necessary(token, nonce, expiry, v, r, s)

View Source
@spec self_permit_allowed_if_necessary(
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  <<_::256>>,
  <<_::256>>
) :: Ethers.TxData.t()

Prepares selfPermitAllowedIfNecessary(address token, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token: :address
  • nonce: {:uint, 256}
  • expiry: {:uint, 256}
  • v: {:uint, 8}
  • r: {:bytes, 32}
  • s: {:bytes, 32}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

self_permit_if_necessary(token, value, deadline, v, r, s)

View Source
@spec self_permit_if_necessary(
  Ethers.Types.t_address(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  <<_::256>>,
  <<_::256>>
) :: Ethers.TxData.t()

Prepares selfPermitIfNecessary(address token, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token: :address
  • value: {:uint, 256}
  • deadline: {:uint, 256}
  • v: {:uint, 8}
  • r: {:bytes, 32}
  • s: {:bytes, 32}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

set_approval_for_all(operator, approved)

View Source
@spec set_approval_for_all(Ethers.Types.t_address(), boolean()) :: Ethers.TxData.t()

Prepares setApprovalForAll(address operator, bool approved) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • operator: :address
  • approved: :bool

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

supports_interface(interface_id)

View Source
@spec supports_interface(<<_::32>>) :: Ethers.TxData.t()

Prepares supportsInterface(bytes4 interfaceId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • interfaceId: {:bytes, 4}

Return Types (when called with Ethers.call/2)

  • :bool
Link to this function

sweep_token(token, amount_minimum, recipient)

View Source

Prepares sweepToken(address token, uint256 amountMinimum, address recipient) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • token: :address
  • amountMinimum: {:uint, 256}
  • recipient: :address

Return Types (when called with Ethers.call/2)

This function does not return any values!

@spec symbol() :: Ethers.TxData.t()

Prepares symbol() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :string
@spec token_by_index(non_neg_integer()) :: Ethers.TxData.t()

Prepares tokenByIndex(uint256 index) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • index: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • {:uint, 256}
Link to this function

token_of_owner_by_index(owner, index)

View Source
@spec token_of_owner_by_index(Ethers.Types.t_address(), non_neg_integer()) ::
  Ethers.TxData.t()

Prepares tokenOfOwnerByIndex(address owner, uint256 index) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • owner: :address
  • index: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • {:uint, 256}
@spec token_uri(non_neg_integer()) :: Ethers.TxData.t()

Prepares tokenURI(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :string
@spec total_supply() :: Ethers.TxData.t()

Prepares totalSupply() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • {:uint, 256}
Link to this function

transfer_from(from, to, token_id)

View Source

Prepares transferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

uniswap_v3_mint_callback(amount0_owed, amount1_owed, data)

View Source
@spec uniswap_v3_mint_callback(non_neg_integer(), non_neg_integer(), binary()) ::
  Ethers.TxData.t()

Prepares uniswapV3MintCallback(uint256 amount0Owed, uint256 amount1Owed, bytes data) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • amount0Owed: {:uint, 256}
  • amount1Owed: {:uint, 256}
  • data: :bytes

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

unwrap_weth9(amount_minimum, recipient)

View Source

Prepares unwrapWETH9(uint256 amountMinimum, address recipient) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • amountMinimum: {:uint, 256}
  • recipient: :address

Return Types (when called with Ethers.call/2)

This function does not return any values!

@spec weth9() :: Ethers.TxData.t()

Prepares WETH9() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :address