Uniswap.Contracts.NonfungiblePositionManager (Uniswap v0.0.5)

View Source

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

__default_address__()

@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

approve(to, token_id)

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_transaction/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!

balance_of(owner)

@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}

base_uri()

@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

burn(token_id)

@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_transaction/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!

collect(params)

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_transaction/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}

constructor(factory, weth9, token_descriptor_)

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

create_and_initialize_pool_if_necessary(token0, token1, fee, sqrt_price_x96)

@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_transaction/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

decrease_liquidity(params)

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_transaction/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}

domain_separator()

@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}

factory()

@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

get_approved(token_id)

@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

increase_liquidity(params)

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_transaction/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}

is_approved_for_all(owner, operator)

@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

mint(params)

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_transaction/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}

multicall(data)

@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_transaction/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}

name()

@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

owner_of(token_id)

@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

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

@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_transaction/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!

permit_typehash()

@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}

positions(token_id)

@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}

refund_eth()

@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_transaction/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!

safe_transfer_from(from, to, token_id)

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_transaction/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!

safe_transfer_from(from, to, token_id, data)

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_transaction/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!

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

@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_transaction/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!

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

@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_transaction/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!

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

@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_transaction/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!

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

@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_transaction/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!

set_approval_for_all(operator, approved)

@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_transaction/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!

supports_interface(interface_id)

@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

sweep_token(token, amount_minimum, recipient)

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_transaction/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!

symbol()

@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

token_by_index(index)

@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}

token_of_owner_by_index(owner, index)

@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}

token_uri(token_id)

@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

total_supply()

@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}

transfer_from(from, to, token_id)

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_transaction/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!

uniswap_v3_mint_callback(amount0_owed, amount1_owed, data)

@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_transaction/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!

unwrap_weth9(amount_minimum, recipient)

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_transaction/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!

weth9()

@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