PaySwap
한국인
한국인
  • 페이스왑 소개
    • 시작하다
      • 지갑 만들기
      • 토큰 받기
      • 중앙화된 교환 없이 PaySwap 사용
      • PaySwap에 지갑을 연결하세요
      • 네이티브 토큰 판매/구매
    • 도움말을 보려면 여기를 클릭하세요.
      • 오류 문제 해결
      • 승인 거래란 무엇입니까?
      • MetaMask에서 보류 중인 트랜잭션 수정
  • 🐲레비아탄
    • 👚의류, 미용, 화장품 리바이어던
    • 🚰음료 레비아탄
    • 🎥문화 및 엔터테인먼트 리바이어던
    • 🔌에너지 리바이어던
    • 🥕식품 리바이어던
    • 😷헬스케어 레비아탄
    • 🪖법과 질서 리바이어던
    • 🪓광업 리바이어던
    • 😈NSFW 레비아탄
    • 🏠부동산 리바이어던
    • 💻소프트웨어, 통신사 및 기타 Leviathan
    • 🚌교통 리바이어던
    • 🏦머니 뱅크
    • NWO
  • 제품
    • 🌉ARPs
      • 수동 ARP
        • 회사 급여 설정
        • 톤틴 설정
        • 자산으로 주식을 매도
      • 백분율 기반 ARP
        • 함께 청구서를 지불하는 룸메이트
      • 자동 ARP
      • 주조 및 청구 메모
    • 🟪감사자
      • 천연자원 감사
      • SSID 감사
      • 부동산 토큰화
      • 개인 포즈 토큰화
      • 자연 토큰
      • 현상금 사냥꾼
    • 🔮베팅 계약
      • 알파벳 인코딩 없이 베팅
      • 알파벳 인코딩을 사용한 베팅
      • 파트너 베팅 이벤트
    • 💧청구서
      • 구실
      • 부기
      • 은행 계좌
      • 자산으로 주식을 매도
    • 🖼️CanCan
      • 제품/서비스
        • 제품/서비스 나열
        • 제품/서비스 구매
          • 지갑으로 구매하기
          • 스테이크 마켓을 통한 구매
          • 스테이크 시장을 통한 판매
          • Valuepool/DAO를 통한 구매
      • 조항
        • 기사 나열
        • 팁 작가
      • 페이월
        • 페이월 나열
        • 페이월에 항목 추가
        • 페이월에서 항목 제거
        • 페이월과의 파트너십
        • 페이월 구독 구매
        • 페이월 구독 활성화
      • NFTickets
      • 할인 및 캐시백
        • 할인
        • 캐시백
        • 수동 보상
      • 파트너 가치 풀 나열
      • 공지사항
      • 리뷰
      • 동적 가격
      • 파트너십
      • 멤버십
      • 신원 요구 사항
      • 후원
      • 경매 및 입찰
      • 액
      • 투표
    • 🧑‍⚖️dRamps
      • 토큰 시장 추가
      • 추가 토큰 배포 및 추가
      • 토큰 시장 활성화
      • 토큰 시장의 가격 업데이트
      • 자동 램프
        • tFIAT 토큰 발행
        • tFIAT 토큰 소각
      • 수동 램프
        • tFIAT 토큰 발행
        • tFIAT 토큰 소각
      • 스폰서 dRamp
      • 네이티브 토큰 판매/구매
      • dRamps 가치 풀
      • 파트너십
      • 부트스트래핑
      • 토큰 시장 판매
      • 사용 사례
        • 수업료 지불
        • 제품/서비스 비용 지불
        • 송금
        • 외환
        • 블록체인 브릿지
        • 가치 저장
    • 🖼️eCollectibles
      • 기본 민터
      • 맞춤형 조폐국
      • 사전 제작된 NFT 상장
    • 🔄교환
      • 토큰 교환
      • 거래 방법
      • 수수료 및 노선
      • 유동성 풀
      • 유동성 추가/제거 방법
      • 자주하는 질문
    • 🧈미래 담보
    • 🎮계략
      • 게임 객체
      • 게임 장학금
    • 🎟️운
      • 복권 플레이 방법
      • 복권 FAQ
      • 마켓플레이스 복권
      • FT 복권
      • NFT 복권
    • 💳페이카드
      • 마켓플레이스 구매
    • 🐞프로필
      • 소셜 그래프 구축
      • 송금
      • 신용 보고서
      • 보안 및 기타
    • 💹수익 공유
      • 액셀러레이터
      • 기업
      • 기여자
      • 추천
    • 🍯후원자
    • 🍏SSI
      • 데이터 생성
      • SSID 만들기
      • 고유한 프로필 만들기
    • 📈StakeMarket
      • 등록된 제품 구매
      • 입찰 요청
      • 담보대출
      • 스테이크 신청
      • 소송
    • 🖥️TrustBounties
      • FT 바운티
      • NFT 바운티
      • 승인
    • 🌐ValuePools/DAOs
      • NFT 토큰 발행
      • Valuepool 후원
      • Valuepool로 쇼핑하기
      • Valuepool을 통한 대출 및 투자
      • 제안서 작성
    • 👾유언장
      • 유언장 설정
      • 유언장을 보관용으로 사용
    • 🛍️세계
      • 빨간 약 세계
      • 파란 약 세계
      • 녹색 세계
  • 사용 사례
    • CanCan
      • 아이템 마켓플레이스: Amazon
      • 아이템 마켓플레이스: 대여
      • 인재마켓플레이스
      • AirBnB
      • 라이드 헤일링
      • 배달앱
      • Rent The Runway
      • 구독 앱
      • 데이트 앱
      • Friend.tech
      • 원격 건강
      • 제품 리믹스
    • Valuepools
      • BNPL 앱
      • 그룹투자앱
      • 보험 앱
      • 마케팅 앱
      • 저축 앱
    • ARPs
      • Budgetting
      • Group Vacation Planning
      • 대리투자
      • Spend Management
      • Loan Management
      • Rent Management
      • Tipping
      • Play & Earn Loan Management
    • Bills
      • Flexible Loan Management
      • Bill Payment
      • Taxes
      • 대리투자
    • Auditors
      • Address Verification
      • Identity Verification
      • Luxury Item Authentication
      • Awards & Trophees
      • Credit Wothiness
    • Games
      • Play To Earn For Your Game
      • Play To Earn For Tripe A Game
      • Betting
    • Betting
      • Stock Market
      • Sports
      • General
      • Companies
      • Swaps
    • Lottery
      • Data Collection
      • Sale Incentive
    • SSI
      • Supply Chain
      • Medical Records
      • Zero Knowledge Proofs
      • Background Checks
      • 싱글 사인온(SSO)
    • StakeMarket
      • 사전 판매
      • Construction Contract
      • Collateralized Employment Contract
    • TrustBounty
      • 변동성 헤지
  • 거버넌스 및 토큰경제학
  • 문화와 비전
  • 로드맵
  • 개발자
    • Smart Contracts (EVM)
      • PaySwap Exchange
        • v3 contracts
          • PancakeV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • PancakeV3Pool
      • MasterChef
        • MasterChef V3
      • dRamps
        • dRamp Contract
      • Lottery
        • Lottery Contract
  • 팀
  • 문의하기
    • 고객 지원
    • 소셜 계정 및 커뮤니티
Powered by GitBook
On this page
  • Contract Info
  • Solidity API

Was this helpful?

  1. 개발자
  2. Smart Contracts (EVM)
  3. PaySwap Exchange
  4. v3 contracts

NonfungiblePositionManager

Wraps Pancake V3 positions in the ERC721 non-fungible token interface

PreviousStableSwapRouterNextPancakeV3Pool

Last updated 1 year ago

Was this helpful?

Contract Info

Solidity API

Position

struct Position {
  uint96 nonce;
  address operator;
  uint80 poolId;
  int24 tickLower;
  int24 tickUpper;
  uint128 liquidity;
  uint256 feeGrowthInside0LastX128;
  uint256 feeGrowthInside1LastX128;
  uint128 tokensOwed0;
  uint128 tokensOwed1;
}

constructor

constructor(address _deployer, address _factory, address _WETH9, address _tokenDescriptor_) public

positions

function positions(uint256 tokenId) external view returns (uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)

Returns the position information associated with a given token ID.

Throws if the token ID is not valid.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the token that represents the position

Return Values

Name
Type
Description

nonce

uint96

The nonce for permits

operator

address

The address that is approved for spending

token0

address

The address of the token0 for a specific pool

token1

address

The address of the token1 for a specific pool

fee

uint24

The fee associated with the pool

tickLower

int24

The lower end of the tick range for the position

tickUpper

int24

The higher end of the tick range for the position

liquidity

uint128

The liquidity of the position

feeGrowthInside0LastX128

uint256

The fee growth of token0 as of the last action on the individual position

feeGrowthInside1LastX128

uint256

The fee growth of token1 as of the last action on the individual position

tokensOwed0

uint128

The uncollected amount of token0 owed to the position as of the last computation

tokensOwed1

uint128

The uncollected amount of token1 owed to the position as of the last computation

mint

function mint(struct INonfungiblePositionManager.MintParams params) external payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1)

Creates a new position wrapped in a NFT

Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized a method does not exist, i.e. the pool is assumed to be initialized.

Parameters

Name
Type
Description

params

struct INonfungiblePositionManager.MintParams

The params necessary to mint a position, encoded as MintParams in calldata

Return Values

Name
Type
Description

tokenId

uint256

The ID of the token that represents the minted position

liquidity

uint128

The amount of liquidity for this position

amount0

uint256

The amount of token0

amount1

uint256

The amount of token1

isAuthorizedForToken

modifier isAuthorizedForToken(uint256 tokenId)

tokenURI

function tokenURI(uint256 tokenId) public view returns (string)

baseURI

function baseURI() public pure returns (string)

_Returns the base URI set via {setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.

increaseLiquidity

function increaseLiquidity(struct INonfungiblePositionManager.IncreaseLiquidityParams params) external payable returns (uint128 liquidity, uint256 amount0, uint256 amount1)

Increases the amount of liquidity in a position, with tokens paid by the msg.sender

Parameters

Name
Type
Description

params

struct INonfungiblePositionManager.IncreaseLiquidityParams

tokenId The ID of the token for which liquidity is being increased, amount0Desired The desired amount of token0 to be spent, amount1Desired The desired amount of token1 to be spent, amount0Min The minimum amount of token0 to spend, which serves as a slippage check, amount1Min The minimum amount of token1 to spend, which serves as a slippage check, deadline The time by which the transaction must be included to effect the change

Return Values

Name
Type
Description

liquidity

uint128

The new liquidity amount as a result of the increase

amount0

uint256

The amount of token0 to acheive resulting liquidity

amount1

uint256

The amount of token1 to acheive resulting liquidity

decreaseLiquidity

function decreaseLiquidity(struct INonfungiblePositionManager.DecreaseLiquidityParams params) external payable returns (uint256 amount0, uint256 amount1)

Decreases the amount of liquidity in a position and accounts it to the position

Parameters

Name
Type
Description

params

struct INonfungiblePositionManager.DecreaseLiquidityParams

tokenId The ID of the token for which liquidity is being decreased, amount The amount by which liquidity will be decreased, amount0Min The minimum amount of token0 that should be accounted for the burned liquidity, amount1Min The minimum amount of token1 that should be accounted for the burned liquidity, deadline The time by which the transaction must be included to effect the change

Return Values

Name
Type
Description

amount0

uint256

The amount of token0 accounted to the position's tokens owed

amount1

uint256

The amount of token1 accounted to the position's tokens owed

collect

function collect(struct INonfungiblePositionManager.CollectParams params) external payable returns (uint256 amount0, uint256 amount1)

Collects up to a maximum amount of fees owed to a specific position to the recipient

Parameters

Name
Type
Description

params

struct INonfungiblePositionManager.CollectParams

tokenId The ID of the NFT for which tokens are being collected, recipient The account that should receive the tokens, amount0Max The maximum amount of token0 to collect, amount1Max The maximum amount of token1 to collect

Return Values

Name
Type
Description

amount0

uint256

The amount of fees collected in token0

amount1

uint256

The amount of fees collected in token1

burn

function burn(uint256 tokenId) external payable

Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens must be collected first.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the token that is being burned

_getAndIncrementNonce

function _getAndIncrementNonce(uint256 tokenId) internal returns (uint256)

Gets the current nonce for a token ID and then increments it, returning the original value

getApproved

function getApproved(uint256 tokenId) public view returns (address)

_Returns the account approved for tokenId token.

Requirements:

  • tokenId must exist._

_approve

function _approve(address to, uint256 tokenId) internal

_Overrides approve to use the operator in the position, which is packed with the position permit nonce

Contract address