Cancel Order

Cancel Given Order

Example JS Code

await niftyConnectExchangeInst.cancelOrder_(
    [   // address[9] addrs,
        NiftyConnectExchange.address,                       // exchange address
        nftOwner,                                           // maker address
        "0x0000000000000000000000000000000000000000",       // taker address
        makerRelayerFeeRecipient,                           // maker relayer fee recipient
        TestERC721.address,                                 // nft contract address
        "0x0000000000000000000000000000000000000000",       // staticTarget
        TestERC20.address,                                  // paymentToken
        nftOwner,                                           // from
        "0x0000000000000000000000000000000000000000"        // to
    ],
    [   // uint[9] uints,
        exchangePrice,          // uint basePrice
        web3.utils.toBN(0),     // uint extra
        listtime,               // uint listingTime
        expireTime,             // uint expirationTime
        web3.utils.toBN(salt),  // uint salt
        ERC721TransferSelector, // uint merkleValidatorSelector
        tokenId,                // uint tokenId
        ERC721_AMOUNT,          // uint amount
        0,                      // uint totalLeaf
    ],
    1,                      // side (0 buy,1 sell)
    0,                      // Kind of sale (0 fixPrice buy/sell, 1 Auction) 
    sellReplacementPattern, // replacementPattern
    [],                     // staticExtradata
    [
        "0x0000000000000000000000000000000000000000000000000000000000000000", // merkle root hash, for trait-based order
        "0x0000000000000000000000000000000000000000000000000000000000000000"  // ipfs hash which contain the metadata of merkle proof, for trait-based order
    ],                      // merkleData
    {from: nftOwner}
);

Parameter Details

Cancel All History Orders

Users can call incrementNonce to invalidate all history orders.

await niftyConnectExchangeInst.incrementNonce({from: userAccount})

Last updated