PaySwap
Bahasa Indonesia
Bahasa Indonesia
  • Pengenalan Tukar Pembayaran
    • Memulai
      • Buat Dompet
      • Dapatkan Token
      • Menggunakan PaySwap tanpa Pertukaran Terpusat
      • Hubungkan Dompet Anda ke PaySwap
      • Jual/Beli Token Asli
    • Klik Di Sini untuk Bantuan
      • Mengatasi Masalah Kesalahan
      • Apa itu Transaksi Persetujuan?
      • Memperbaiki Transaksi Stuck Pending di MetaMask
  • 🐲Leviathan
    • 👚Pakaian, Kecantikan & Kosmetik Leviathan
    • 🚰Minuman Leviathan
    • 🎥Budaya & Hiburan Leviathan
    • 🔌Energi Leviathan
    • 🥕Makanan Leviathan
    • 😷Leviathan Perawatan Kesehatan
    • 🪖Hukum & Ketertiban Leviathan
    • 🪓Menambang Leviathan
    • 😈NSFW Leviathan
    • 🏠Leviathan Real Estat
    • 💻Perangkat Lunak, Telco & Leviathan Lainnya
    • 🚌Transportasi Leviathan
    • 🏦Bank Uang
    • NWO
  • Produk
    • 🌉ARPs
      • ARP manual
        • Menyiapkan Penggajian Perusahaan Anda
        • Menyiapkan Tontine
        • Menjual Saham Dalam Suatu Aset
      • ARP Berbasis Persentase
        • Teman Sekamar Membayar Tagihan Bersama
      • ARP otomatis
      • Mencetak & Mengklaim Catatan
    • 🟪Auditor
      • Audit Sumber Daya Alam
      • Audit SSID
      • Tokenisasi Real Estat
      • Tokenisasi Kepemilikan Pribadi
      • Token Alam
      • Pemburu Hadiah
    • 🔮Kontrak Taruhan
      • Taruhan tanpa pengkodean alfabet
      • Taruhan dengan pengkodean alfabet
      • Acara Taruhan Mitra
    • 💧Tagihan
      • Pajak
      • Pembukuan
      • Akun bank
      • Menjual Saham Dalam Suatu Aset
    • 🖼️CanCan
      • Produk dan Layanan
        • Mendaftarkan Produk/Layanan
        • Membeli Produk/Jasa
          • Membeli Dengan Dompet Anda
          • Membeli Melalui Pasar Pasak
          • Menjual Melalui Pasar Pasak
          • Membeli Melalui Valuepools/DAO
      • Artikel
        • Daftar Artikel
        • Memberi Tip kepada Penulis
      • Paywall
        • Mencantumkan Paywall
        • Menambahkan Item ke Paywall
        • Menghapus Item Dari Paywall
        • Bermitra Dengan Paywall
        • Membeli Langganan Paywall
        • Mengaktifkan Langganan Paywall
      • NFTickets
      • Diskon & Uang Kembali
        • Diskon
        • Uang kembali
        • Hadiah Manual
      • Daftar Mitra Valuepools
      • Pengumuman
      • Ulasan
      • Penetapan Harga Dinamis
      • Kemitraan
      • Keanggotaan
      • Persyaratan Identitas
      • Sponsor
      • Lelang & Tawaran
      • Tetes
      • Suara
    • 🧑‍⚖️dRamps
      • Menambahkan Pasar Token
      • Menyebarkan & Menambahkan Token Ekstra
      • Mengaktifkan Pasar Token
      • Perbarui Harga Di Pasar Token
      • dRamp Otomatis
        • Mencetak Token tFIAT
        • Membakar Token tFIAT
      • dRamp Manual
        • Mencetak Token tFIAT
        • Membakar Token tFIAT
      • Sponsor dRamp
      • dRamp Valuepool
      • Jual/Beli Token Asli
      • Kemitraan
      • Bootstrap
      • Jual Pasar Token
      • Kasus Penggunaan
        • Membayar Uang Sekolah
        • Membayar Produk/Layanan
        • Pengiriman uang
        • Valas
        • Jembatan Blockchain
        • Penyimpan Nilai
    • 🖼️eCollectibles
      • Menteri Default
      • Miner Kustom
      • Mencantumkan NFT yang Sudah Dicetak Sebelumnya
    • 🔄Menukarkan
      • Pertukaran Token
      • Cara Berdagang
      • Biaya dan Rute
      • Kumpulan Likuiditas
      • Cara Menambah/Menghilangkan Likuiditas
      • Pertanyaan Umum
    • 🧈Jaminan Masa Depan
    • 🎮Permainan
      • Objek Permainan
      • Beasiswa Permainan
    • 🎟️Lotre
      • Cara Bermain Lotere
      • FAQ lotere
      • Lotere Pasar
      • FT Lotere
      • NFT Lotere
    • 💳Kartu Pembayaran
      • Pembelian Pasar
    • 🐞Profil
      • Membangun Grafik Sosial Anda
      • Mentransfer Uang
      • Laporan Kredit
      • Keamanan & Lainnya
    • 💹Pembagian keuntungan
      • Akselerator
      • Bisnis
      • Kontributor
      • Referensi
    • 🍯Sponsor
    • 🍏SSI
      • Membuat Data
      • Membuat SSID
      • Membuat Profil Unik
    • 📈StakeMarket
      • Membeli Produk Terdaftar
      • Panggilan Untuk Tender
      • Pinjaman yang Diagunkan
      • Aplikasi Pasak
      • Litigasi
    • 🖥️TrustBounties
      • FT Bounties
      • NFT Bounties
      • Persetujuan
    • 🌐ValuePools/DAOs
      • Mencetak Token NFT
      • Mensponsori Valuepool
      • Berbelanja Dengan Valuepool
      • Meminjamkan & Berinvestasi Dengan Valuepool
      • Membuat Proposal
    • 👾Surat wasiat
      • Menyiapkan Kehendak Anda
      • Menggunakan Surat Wasiat Untuk Penyimpanan
    • 🛍️Dunia
      • Dunia Pil Merah
      • Dunia Pil Biru
      • Dunia Hijau
  • Kasus Penggunaan
    • CanCan
      • Pasar Barang: Amazon
      • Pasar Barang: Penyewaan
      • Pasar Bakat
      • AirBnB
      • Naik Hailing
      • Aplikasi Pengiriman
      • Rent The Runway
      • Aplikasi Berlangganan
      • Aplikasi Kencan
      • Friend.tech
      • TeleKesehatan
      • Remix Produk
    • Valuepools
      • Aplikasi BNPL
      • Aplikasi Investasi Grup
      • Aplikasi Asuransi
      • Aplikasi Pemasaran
      • Aplikasi Tabungan
    • ARPs
      • Budgetting
      • Group Vacation Planning
      • Investasi Proksi
      • Spend Management
      • Loan Management
      • Rent Management
      • Tipping
      • Play & Earn Loan Management
    • Tagihan
      • Flexible Loan Management
      • Bill Payment
      • Taxes
      • Investasi Proksi
    • 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
      • Sistem Masuk Tunggal
    • StakeMarket
      • Pre Sales
      • Construction Contract
      • Collateralized Employment Contract
    • TrustBounty
      • Volatility Hedge
  • Tata Kelola & Tokenomics
  • Budaya & Visi
  • Peta jalan
  • Pengembang
    • Smart Contracts (EVM)
      • PaySwap Exchange
        • v3 contracts
          • PancakeV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • PancakeV3Pool
      • MasterChef
        • MasterChef V3
      • dRamps
        • dRamp Contract
      • Lottery
        • Lottery Contract
  • Tim
  • Hubungi kami
    • Dukungan Pelanggan
    • Akun & Komunitas Sosial
Powered by GitBook
On this page

Was this helpful?

  1. Pengembang
  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?