Uniswap.Contracts.V3Migrator (Uniswap v0.0.5)

View Source

Uniswap's V3 Migrator

Summary

Functions

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

Prepares contract constructor values for deployment.

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

Prepares factory() call parameters on the contract.

Prepares migrate((address,uint256,uint8,address,address,uint24,int24,int24,uint256,uint256,address,uint256,bool) params) call parameters on the contract.

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

Prepares nonfungiblePositionManager() 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 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(factory, weth9, nonfungible_position_manager)

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
  • _nonfungiblePositionManager: :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

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

migrate(params)

Prepares migrate((address,uint256,uint8,address,address,uint24,int24,int24,uint256,uint256,address,uint256,bool) params) 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

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

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

This function does not return any values!

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}

nonfungible_position_manager()

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

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

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!

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