Swaplace
  • About Swaplace
    • Manifesto
    • Overview
    • Roadmap
    • Tokenomics (🚧)
    • Start swaping with Swaplace
    • Marketplace
    • Call for contributors
      • ✧ How to start
      • ✧ Incentives
    • Community & Links
  • Developers
    • Guides
      • ✧ Overview
      • ✧ Setting up your local environment
      • ✧ Preparing
        • Encode config
        • Encode ERC1155 Asset
        • Make Swap
      • ✧ Creating
        • ERC20/ERC721
        • ERC1155
        • Native Ether
      • ✧ Accepting
      • ✧ Canceling
    • Technical Reference
      • ✧ Overview
      • ✧ Swaplace
      • ✧ SwapFactory
      • ✧ Interfaces
        • ✧ IERC165
        • ✧ IErrors
        • ✧ ISwap
        • ✧ ISwapFactory
        • ✧ ISwaplace
    • Deployments
Powered by GitBook
On this page
  1. Developers
  2. Guides

✧ Canceling

cancelSwap

function cancelSwap(uint256 swapId) external

Cancels an active Swap by setting the expiry to zero.

Expiry with 0 seconds means that the Swap doesn't exist or is already canceled.

Requirements:

  • owner must be the caller's address.

  • expiry must be bigger than the timestamp.

Emits a {SwapCanceled} event.

Parameters

Name
Type
Description

swapId

uint256

is the ID of the Swap to be canceled.

Previous✧ AcceptingNextTechnical Reference

Last updated 11 months ago