PaySwap
Español
Español
  • Introducción a PaySwap
    • Empezar
      • Crear una billetera
      • Obtener fichas
      • Usando PaySwap sin intercambios centralizados
      • Conecte su billetera a PaySwap
      • Vender/comprar tokens nativos
    • Haga clic aquí para obtener ayuda
      • Solución de errores
      • ¿Qué es una transacción de aprobación?
      • Arreglando transacciones pendientes atascadas en MetaMask
  • 🐲Leviatanes
    • 👚Ropa, Belleza y Cosméticos Leviatán
    • 🚰Bebida Leviatán
    • 🎥Cultura y entretenimiento Leviatán
    • 🔌Leviatán energético
    • 🥕Comida Leviatán
    • 😷Leviatán Sanitario
    • 🪖Ley y orden Leviatán
    • 🪓Leviatán minero
    • 😈Leviatán NSFW
    • 🏠Leviatán inmobiliario
    • 💻Software, telecomunicaciones y otros Leviatán
    • 🚌Transporte Leviatán
    • 🏦El banco de dinero
    • NWO
  • Productos
    • 🌉ARPs
      • ARP Manuales
        • Configurar la nómina de su empresa
        • Configurar una tontina
        • Vender acciones de un activo
      • ARP basados ​​en porcentajes
        • Compañeros de cuarto que pagan facturas juntos
      • ARP Automáticos
      • Notas de acuñación y reclamación
    • 🟪Auditores
      • Auditorías de recursos naturales
      • Auditorías SSID
      • Tokenización de bienes raíces
      • Tokenización de posesiones personales
      • Fichas de naturaleza
      • Caza Recompensas
    • 🔮Contratos de apuestas
      • Apuestas sin codificación alfabética
      • Apuestas con codificación alfabética
      • Eventos de apuestas de socios
    • 💧Facturas
      • Impuestos
      • Teneduría de libros
      • Cuentas bancarias
      • Vender acciones de un activo
    • 🖼️CanCan
      • Productos y servicios
        • Listado de productos/servicios
        • Compra de productos/servicios
          • Comprar con tu billetera
          • Comprar a través de StakeMarket
          • Vender a través de StakeMarket
          • Comprar a través de Valuepools/DAO
      • Artículos
        • Listado de Artículos
        • Escritores de propinas
      • Muros de pago
        • Listado de muros de pago
        • Agregar elementos a los muros de pago
        • Eliminar elementos de los muros de pago
        • Asociarse con muros de pago
        • Comprar suscripciones de Paywall
        • Activación de suscripciones de Paywall
      • NFTickets
      • Descuentos y reembolsos
        • Descuentos
        • Reembolsos
        • Recompensas manuales
      • Listar grupos de valor de socios
      • Anuncios
      • Reseñas
      • Precio dinamico
      • Asociaciones
      • Membresías
      • Requisitos de identidad
      • Patrocinios
      • Subastas y ofertas
      • Gotas
      • Votos
    • 🧑‍⚖️dRamps
      • Agregar un mercado de tokens
      • Implementar y agregar un token adicional
      • Activando un mercado de tokens
      • Actualizar precios en un mercado de tokens
      • Rampas automáticas
        • Acuñación de tokens tFIAT
        • Quemando tokens tFIAT
      • Rampas Manuales
        • Acuñación de tokens tFIAT
        • Quemando tokens tFIAT
      • Patrocinador rampa
      • dRamp Valuepool
      • Vender/comprar tokens nativos
      • Asociaciones
      • Arranque
      • Vender mercados de tokens
      • Casos de uso
        • Pagar la matrícula
        • Pagar por productos/servicios
        • Remesas
        • Forex
        • Puente de cadena de bloques
        • Depósito de valor
    • 🖼️eCollectibles
      • La minter predeterminada
      • Mineros personalizados
      • Listado de NFT pre-acuñados
    • 🔄Intercambio
      • Intercambios de tokens
      • Cómo negociar
      • Tarifas y rutas
      • Fondos de liquidez
      • Cómo agregar/eliminar liquidez
      • Preguntas más frecuentes
    • 🧈Garantías futuras
    • 🎮Juegos
      • Objetos del juego
      • Becas de juegos
    • 🎟️Lotería
      • Cómo jugar a la lotería
      • Preguntas frecuentes sobre lotería
      • Lotería del mercado
      • FT Lotería
      • NFT Lotería
    • 💳Tarjetas de pago
      • Compras en el mercado
    • 🐞Perfil
      • Construyendo su gráfico social
      • Transferir dinero
      • Informes de crédito
      • Seguridad y otros
    • 💹Participación en los ingresos
      • Acelerador
      • Empresas
      • Colaboradores
      • Referencias
    • 🍯Patrocinadores
    • 🍏SSI
      • Creando datos
      • Creando un SSID
      • Creando un perfil único
    • 📈StakeMarket
      • Comprar un producto listado
      • Llamar a licitación
      • Préstamos garantizados
      • Aplicaciones de estaca
      • Litigios
    • 🖥️TrustBounties
      • FT Bounties
      • NFT Bounties
      • Aprobaciones
    • 🌐ValuePools/DAOs
      • Acuñar un token NFT
      • Patrocinando un Valuepool
      • Compras con un Valuepool
      • Préstamos e inversiones con Valuepool
      • Crear una propuesta
    • 👾Testamentos
      • Configurando tu testamento
      • Uso de testamentos para almacenamiento
    • 🛍️Mundos
      • Mundos de la píldora roja
      • Mundos de la píldora azul
      • Mundos verdes
  • Casos de uso
    • CanCan
      • Mercado de artículos: Amazon
      • Mercado de artículos: alquileres
      • Mercado de talentos
      • AirBnB
      • Paseo granizando
      • Aplicación de entrega
      • Rent The Runway
      • Aplicación de suscripción
      • Aplicación de citas
      • Friend.tech
      • Telesalud
      • Remezclas de productos
    • Valuepools
      • Aplicación BNPL
      • Aplicación de inversión grupal
      • Aplicación de seguro
      • Aplicación de marketing
      • Aplicación de ahorro
    • ARPs
      • Budgetting
      • Group Vacation Planning
      • Inversión proxy
      • Spend Management
      • Loan Management
      • Rent Management
      • Tipping
      • Play & Earn Loan Management
    • Bills
      • Flexible Loan Management
      • Bill Payment
      • Taxes
      • Inversión proxy
    • 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
      • Inicio de sesión único
    • StakeMarket
      • Pre ventas
      • Construction Contract
      • Collateralized Employment Contract
    • TrustBounty
      • Cobertura de volatilidad
  • Gobernanza y tokenomía
  • Cultura y Visión
  • Mapa vial
  • Desarrolladores
    • Smart Contracts (EVM)
      • PaySwap Exchange
        • v3 contracts
          • PancakeV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • PancakeV3Pool
      • MasterChef
        • MasterChef V3
      • dRamps
        • dRamp Contract
      • Lottery
        • Lottery Contract
  • Equipo
  • Contacta con nosotros
    • Atención al cliente
    • Cuentas sociales y comunidades
Powered by GitBook
On this page

Was this helpful?

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