This is a thread to discuss Moralis OpenSea Plugin we covered on YouTube.
We are here to help! If you have any questions about how to use it or how to set it up you can ask here!
This is a thread to discuss Moralis OpenSea Plugin we covered on YouTube.
We are here to help! If you have any questions about how to use it or how to set it up you can ask here!
Not sure what happened here. It worked, but then when I logged out of metamask and tried to use a different address it is totally stuck in this state.
did you authenticate again? there it looks like it tries to get the address for current authenticated user and not from what is in metamask now
I got it fixed my just deleting the server and starting a new one. If that happens again, how should I authenticate again? What would I need to change in the code?
I mean to authenticate with Moralis.authenticate()
If I have a erc1155 contract with 500 items (of the same tokenID) minted to my address. How can I list them all for sale in one transaction? I have the createSellOrder working for doing one at a time but what is a good way to loop through that for a large number of already existing tokens?
Hi @Aditya
Please provide NFT token info you tried to work with
Looks like you are trying to get info for non existing NFT
Token Address: 0xA32Ba4034F9AF9d558665c6a0C9ED9c1472f0752
Token No: 11
https://opensea.io/assets/0xa32ba4034f9af9d558665c6a0c9ed9c1472f0752/11
Hey @Aditya looks like the tokenAddress
and tokenId
is different to the one you have in the screenshot, this one with the opensea link should be working~
How do I use fulfilOrder when it comes to buying/selling? I followed your How to List NFT’s youtube tutorial so getOrders, getAsset, etc all work. I’m just not sure how to use fulfilOrder.
So I believe fulfill orders can be used in two ways:
fulfillOrder
fulfillOrder
Hope this helps~
So, fulfilOrder is basically an Approve button? For example, if I have an NFT listed and someone makes a buyOrder, I would have to click Approve (button with fulfilOrder)?
You can think of it like that, it’s basically fulfilling the buy/sell order, but I wouldn’t call it approve because usually approve is a term used for approving ERC20 token, but essentially it is an approval mechanism
Yeah I know, it just seemed like the easiest way to say how I was picturing it.
I guess I can try it with something like:
const cost = 1;
if (buyOrder >= cost) {
fulfilOrder;
console.log("Buy Complete");
}
else if (buyOrder < cost) {
console.log("Buy Order Canceled. Insufficient Funds")
}
Obviously not the actual code I would use, but shows what I’m thinking.
Yeah gotcha what’s the cost here btw?
Cost would be the price of an NFT. The dapp I’m building focuses on NFT’s.
I don’t think you need to have the cost
price of NFT included into the logic (unless you have custom logic in your dApp), just need to know which buy/sell order you would like to choose and input it into the fulfillOrder
function
@YosephKS
Hi, I’m getting following error web3Sign trigger signer address missing or invalid while creating sell order. Do you know why this happens?
Thank you
ohhh what did you do to get that error?
This is my code:
let sellOrder = await this.openSeaPlugin.createSellOrder(tokenId, 0.03);
//
createSellOrder(tokenId, price) {
console.log("from address: ", this.fromAddress);
return Moralis.Plugins.opensea.createSellOrder({
network: this.network,
tokenAddress: this.nftContractAddress,
tokenId: tokenId,
tokenType: this.tokenType,
userAddress: this.fromAddress,
startAmount: price,
endAmount: price,
// expirationTime: expirationTime, Only set if you startAmount > endAmount
});
}
This is the response in network tab but it didn’t have signer
property.
this.is where the error message comes from
Thank you