Uniswap.Contracts.NonfungibleTokenPositionDescriptor (Uniswap v0.0.5)

View Source

Uniswap's NFT Position Descriptor

Summary

Functions

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

Prepares contract constructor values for deployment.

Prepares flipRatio(address token0, address token1, uint256 chainId) call parameters on the contract.

Prepares nativeCurrencyLabel() call parameters on the contract.

Prepares nativeCurrencyLabelBytes() call parameters on the contract.

Prepares tokenRatioPriority(address token, uint256 chainId) call parameters on the contract.

Prepares tokenURI(address positionManager, uint256 tokenId) 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

constructor(weth9, native_currency_label_bytes)

@spec constructor(Ethers.Types.t_address(), <<_::256>>) :: binary()

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

  • _WETH9: :address
  • _nativeCurrencyLabelBytes: {:bytes, 32}

flip_ratio(token0, token1, chain_id)

Prepares flipRatio(address token0, address token1, uint256 chainId) 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

  • token0: :address
  • token1: :address
  • chainId: {:uint, 256}

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

  • :bool

native_currency_label()

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

Prepares nativeCurrencyLabel() 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

native_currency_label_bytes()

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

Prepares nativeCurrencyLabelBytes() 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}

token_ratio_priority(token, chain_id)

@spec token_ratio_priority(Ethers.Types.t_address(), non_neg_integer()) ::
  Ethers.TxData.t()

Prepares tokenRatioPriority(address token, uint256 chainId) 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

  • token: :address
  • chainId: {:uint, 256}

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

  • {:int, 256}

token_uri(position_manager, token_id)

Prepares tokenURI(address positionManager, 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

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

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

  • :string

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