NFT Positions

将学习如何扩展 Uniswap 合约,以及将它集成到第三方的协议中。

Uniswap V3 的一个额外特性是能够把流动性位置转换成 NFT。这是其中一个的例子:

Uniswap V3 NFT example

它展示了 token 的信息:

[ positions(uint256) method Response ]
  nonce   uint96 :  0
  operator   address :  0x0000000000000000000000000000000000000000
  token0   address :  0xB035723D62e0e2ea7499D76355c9D560f13ba404
  token1   address :  0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
  fee   uint24 :  10000
  tickLower   int24 :  -96600
  tickUpper   int24 :  -82800
  liquidity   uint128 :  0
  feeGrowthInside0LastX128   uint256 :  19275342891285237278050788030132407641
  feeGrowthInside1LastX128   uint256 :  151805030514340226583840194092093
  tokensOwed0   uint128 :  0
  tokensOwed1   uint128 :  0
 ]

完整合约代码