0

I am using swap sdk to verify nft swap order in polygon chain.

const pKey = new ethers.Wallet.createRandom();
const signer = new ethers.Wallet(pKey, provider);
const nftSwapSdk = new NftSwapV3(provider, signer, 137);
const result = nftSwapSdk.verifyOrderSignature(
  order,
  order.signature,
  137,
  "0xdef1c0ded9bec7f1a1670819833240f027b25eff"
);

the result is always false. the order is valid.

2 Answers 2

1

I'm not familiar with Trader's Swap SDK but it seems you're trying to use V3 orders but 0xdef1c0ded9bec7f1a1670819833240f027b25eff is the address of the V4 Exchange on Polygon. There is no official V3 exchange on polygon.

0

If you join us in #dev-help channel on Discord (https://discord.com/channels/879789553060282388/915257624050663495), happy to walk you through validating a 0x v4 order (or v3 if you prefer)!

tl;dr if you're using v4, be sure to import { NftSwapV4 } from '@traderxyz/nft-swap-sdk instead of V3 (the current default).

1
  • Is this an official channel? I've no problem with social networks but an unnamed link is easy to replace for a malicious one, since anyone can edit an answer I'd suggest to add that link to your profile and remove it from the answer.
    – Ismael
    Commented Mar 17, 2022 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.