Category Archives: web3

Error matching this listing: Must match target. Please contact the maker or try again later!

Error matching this listing: Must match target. Please contact the maker or try again later!
const provider = new HDWalletProvider({
  mnemonic: {
    phrase: MNEMONIC
  },
  providerOrUrl: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`
});

const seaport = new opensea.OpenSeaPort(
    provider, {
        networkName: opensea.Network.Main,
        apiKey: API_KEY
    },
    (arg) => {
        console.log("From OpenSeaPort CB:");
        console.log(arg);
    }
);
const buyItem = async (contractAddress, tokenId) => {
    const accountAddress = BUYER_ADDRESS;
    const order = await seaport.api.getOrder({
        side: types.OrderSide.Sell,
        asset_contract_address: contractAddress,
        token_id: tokenId
    });

    try {
        const transactionHash = await seaport.fulfillOrder({ order, accountAddress });
        return transactionHash;
    } catch (error) {
        console.log(error);
    }
}

Fix: Update opensea-js node module from 1.x to 2.0.0

#