PaySwap
Français
Français
  • Introduction à PaySwap
    • Commencer
      • Créer un portefeuille
      • Obtenir des Jetons
      • Utiliser PaySwap sans bourses centralisées
      • Connectez votre portefeuille à PaySwap
      • Vendre/acheter des jetons natifs
    • Cliquez ici pour obtenir de l'aide
      • Dépannage des erreurs
      • Qu'est-ce qu'une transaction d'approbation?
      • Correction des transactions en attente bloquées sur MetaMask
  • 🐲Les Léviathans
    • 👚Léviathan de l'habillement, de la beauté et des cosmétiques
    • 🚰Léviathan des boissons
    • 🎥Léviathan de la culture et du divertissement
    • 🔌Léviathan de l'énergie
    • 🥕Léviathan de l'alimentation
    • 😷Léviathan des soins de santé
    • 🪖Léviathan de la loi et de l'ordre
    • 🪓Léviathan de l'exploitation minière
    • 😈Léviathan NSFW
    • 🏠Léviathan de l'immobilier
    • 💻Léviathan des logiciels, des télécommunications et autres
    • 🚌Léviathan des transports
    • 🏦Le Money Bank
    • NWO
  • Produits
    • 🌉ARPs
      • Les ARPs Manuels
        • Configurer la paie de votre entreprise
        • Mettre en place une tontine
        • Vendre des actions dans un actif
      • ARPs basés sur un pourcentage
        • Colocataires payant leurs factures ensemble
      • Les ARPs automatiques
      • Frappe et réclamation de billets
    • 🟪Les Auditeurs
      • Audits des ressources naturelles
      • Les Audits SSID
      • Tokenisation de l'immobilier
      • Tokenisation des biens personnels
      • Les Jetons Nature
      • Des chasseurs de primes
    • 🔮Les Contrats de paris
      • Paris sans codage alphabétique
      • Paris avec codage alphabétique
      • Événements de paris avec les partenaires
    • 💧Factures
      • Impôts
      • Tenue de livre compte
      • Comptes bancaires
      • Vendre des actions dans un actif
    • 🖼️CanCan
      • Produits/Services
        • Listing de Produits/Services
        • Acheter des Produits/Services
          • Acheter avec votre portefeuille
          • Acheter via le StakeMarket
          • Vendre via le StakeMarket
          • Acheter via les Valuepools/DAOs
      • Articles
        • Listing d'Articles
        • Pourboires aux écrivains
      • Les Paywalls
        • Listing de Paywalls
        • Ajout d'articles aux Paywalls
        • Supprimer des articles des Paywalls
        • Partenariat avec Paywalls
        • Acheter des abonnements Paywall
        • Activation des abonnements Paywall
      • NFTickets
      • Réductions et remises en argent
        • Réductions
        • Remises en argent
        • Récompenses manuelles
      • Listing de Valuepools Partenaires
      • Annonces
      • Avis
      • Tarification Dynamique
      • Partenariats
      • Adhésions
      • Exigences en matière d'identité
      • Parrainages
      • Enchères et Offres
      • Drops
      • Votes
    • 🧑‍⚖️dRamps
      • Ajout d'un Marché de Jetons
      • Déploiement et ajout d'un jeton supplémentaire
      • Activation d'un Marché de Jetons
      • Mise à jour des prix sur un marché de jetons
      • dRamps automatiques
        • Création de jetons tFIAT
        • Brûler des jetons tFIAT
      • dRamps Manuels
        • Minting des jetons tFIAT
        • Brûler des jetons tFIAT
      • Commanditaire de dRamp
      • dRamps de Valuepool
      • Vendre/acheter des jetons natifs
      • Partenariats
      • Bootstrapping
      • Vendre des marchés de jetons
      • Cas d'usages
        • Paiement des Frais de Scolarité
        • Paiement de Produits/Services
        • Envois d'Argent (Remittances)
        • Forex
        • Pont Blockchain
        • Réserve de Valeur
    • 🖼️eCollectibles
      • Le Minter par Défaut
      • Déploiement de Minteurs Personnalisés
      • Listing des NFT pré-mintés
    • 🔄Échange
      • Échanges de jetons
      • Comment échanger
      • Tarifs et itinéraires
      • Pools de liquidités
      • Comment ajouter/supprimer des liquidités
      • FAQ
    • 🧈Garanties futures
    • 🎮Jeux
      • Objets de jeu
      • Bourses de jeu
    • 🎟️Loterie
      • Comment jouer à la loterie
      • FAQ sur la loterie
      • Loterie du marché
      • Loterie FT
      • Loterie NFT
    • 💳Cartes de paiement
      • Achats sur le marché
    • 🐞Profil
      • Construire votre graphique social
      • Transférer de l'argent
      • Rapports de crédit
      • Sécurité et autres
    • 💹Le partage des revenus
      • Accélérateur
      • Entreprises
      • Contributeurs
      • Références
    • 🍯Sponsors
    • 🍏SSI
      • Création de données
      • Créer un SSID
      • Créer un profil unique
    • 📈StakeMarket
      • Acheter un produit répertorié
      • Appel d'offres
      • Prêts garantis
      • Demandes de participation
      • Contentieux
    • 🖥️TrustBounties
      • Bounties FT
      • Bounties NFT
      • Approbations
    • 🌐ValuePools/DAOs
      • Créer un jeton NFT
      • Parrainer un pool de valeur
      • Faire du shopping avec un pool de valeur
      • Prêter et investir avec un pool de valeur
      • Créer une proposition
    • 👾Testaments
      • Établir votre testament
      • Utiliser les testaments pour le stockage
    • 🛍️Mondes
      • Mondes de la pilule rouge
      • Mondes de la pilule bleue
      • Mondes verts
  • Cas d'Usage
    • CanCan
      • Place de marché : Amazon
      • Place de marché : Locations
      • Place de marché des talents
      • AirBnB
      • Service de covoiturage
      • Application de Livraison
      • Rent The Runway
      • Application d'abonnement
      • Application de Rencontre
      • Friend.tech
      • Téléconsultation médicale
      • Remixes de Produits
    • Valuepools
      • Application BNPL
      • Application d'Investissement de Groupe
      • Application d'Assurance
      • Application de Marketing
      • Application d'Épargne
    • ARPs
      • Budgetting
      • Group Vacation Planning
      • Investissement par procuration
      • Spend Management
      • Loan Management
      • Rent Management
      • Tipping
      • Play & Earn Loan Management
    • Factures
      • Flexible Loan Management
      • Bill Payment
      • Taxes
      • Investissement par procuration
    • Auditeurs
      • Address Verification
      • Identity Verification
      • Luxury Item Authentication
      • Awards & Trophees
      • Credit Wothiness
    • Jeux
      • Play To Earn For Your Game
      • Play To Earn For Tripe A Game
      • Betting
    • Pari
      • Stock Market
      • Sports
      • General
      • Companies
      • Swaps
    • Loterie
      • Data Collection
      • Sale Incentive
    • SSI
      • Supply Chain
      • Medical Records
      • Zero Knowledge Proofs
      • Background Checks
      • Connexion unique (SSO)
    • StakeMarket
      • Ventes Préliminaires
      • Construction Contract
      • Collateralized Employment Contract
    • TrustBounty
      • Protection contre la Volatilité
  • Gouvernance & Tokenomie
  • Culture & Vision
  • Feuille de route
  • Developeurs
    • Smart Contracts (EVM)
      • PaySwap Exchange
        • v3 contracts
          • PancakeV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • PancakeV3Pool
      • MasterChef
        • MasterChef V3
      • dRamps
        • dRamp Contract
      • Lottery
        • Lottery Contract
  • Equipe
  • Nous Contacter
    • Support Client
    • Comptes sociaux et communautés
Powered by GitBook
On this page
  1. Developeurs
  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