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

Was this helpful?

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

V3SwapRouter

Router for stateless execution of swaps against PancakeSwap V3

Solidity API

SwapCallbackData

struct SwapCallbackData {
  bytes path;
  address payer;
}

pancakeV3SwapCallback

function pancakeV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes _data) external

Called to msg.sender after executing a swap via IPancakeV3Pool#swap.

In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a PancakeV3Pool deployed by the canonical PancakeV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.

Parameters

Name
Type
Description

amount0Delta

int256

The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.

amount1Delta

int256

The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.

_data

bytes

exactInputSingle

function exactInputSingle(struct IV3SwapRouter.ExactInputSingleParams params) external payable returns (uint256 amountOut)

Swaps amountIn of one token for as much as possible of another token

Setting amountIn to 0 will cause the contract to look up its own balance, and swap the entire amount, enabling contracts to send tokens before calling this function.

Parameters

Name
Type
Description

params

struct IV3SwapRouter.ExactInputSingleParams

The parameters necessary for the swap, encoded as ExactInputSingleParams in calldata

Return Values

Name
Type
Description

amountOut

uint256

The amount of the received token

exactInput

function exactInput(struct IV3SwapRouter.ExactInputParams params) external payable returns (uint256 amountOut)

Swaps amountIn of one token for as much as possible of another along the specified path

Setting amountIn to 0 will cause the contract to look up its own balance, and swap the entire amount, enabling contracts to send tokens before calling this function.

Parameters

Name
Type
Description

params

struct IV3SwapRouter.ExactInputParams

The parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata

Return Values

Name
Type
Description

amountOut

uint256

The amount of the received token

exactOutputSingle

function exactOutputSingle(struct IV3SwapRouter.ExactOutputSingleParams params) external payable returns (uint256 amountIn)

Swaps as little as possible of one token for amountOut of another token that may remain in the router after the swap.

Parameters

Name
Type
Description

params

struct IV3SwapRouter.ExactOutputSingleParams

The parameters necessary for the swap, encoded as ExactOutputSingleParams in calldata

Return Values

Name
Type
Description

amountIn

uint256

The amount of the input token

exactOutput

function exactOutput(struct IV3SwapRouter.ExactOutputParams params) external payable returns (uint256 amountIn)

Swaps as little as possible of one token for amountOut of another along the specified path (reversed) that may remain in the router after the swap.

Parameters

Name
Type
Description

params

struct IV3SwapRouter.ExactOutputParams

The parameters necessary for the multi-hop swap, encoded as ExactOutputParams in calldata

Return Values

Name
Type
Description

amountIn

uint256

The amount of the input token

PreviousSmartRouterV3NextV2SwapRouter

Last updated 1 year ago

Was this helpful?