Rarible Plugin - Tests and implementation

Testing the Plugin in the search of the right solution to integrate some marketplace function in my platform without having my own solidity contract (safety, optim).

First test is for me to understand if I can list any NFT I own contract/tokens from Rinkeby chain.
Using the documentation call for CreateSellOrder
Only parameters changed are

  • userAddress : my wallet (owning both contract and tokens),
  • makeTokenAddress : contract address for the NFT
  • makeTokenID: not sure what should go there ? tokenID in the contract ?

async function raribleCreateSellOrder(){
await Moralis.Plugins.rarible.createSellOrder({
chain: ‘rinkeby’,
userAddress: ‘4234’,
makeTokenId: ‘1’,
makeTokenAddress: ‘5235’,
makeAssetClass: ‘ERC721’,
makeValue: ‘4’,
takeAssetClass: ‘ETH’,
takeValue: 10 ** 18,

This returns an error:
moralis.js:26233 POST https://dod24uqsbvvz.usemoralis.com:2053/server/functions/rarible_createSellOrder 400
moralis.js:26369 Uncaught (in promise) Error: [object Object]
at handleError (moralis.js:26369:17)

Thanks for your help.

Yes, This is the NFT ID as per the NFT contract.

Make value represents the NFT token amount. This will be one for all ERC721 standard NFT’s and it will be >= 1 for all ERC1155 standard NFT’s.

you can look in your browser network tab for more details for that error, you will find that url when it was accessed and what it returned as response

it looks like it is not 404, and it is 400

I don’t know why it gives that error

If Rarible SDK has a feature to sell the lazy minted nft’s, then it can be suggested hers here to be added in Moralis Rarible Plugin.

Basically, you only need Nft id, contract address, and chain for listing using rarible plugin.
These data you can get the data from Moralis getNFTs function and you can pass the parameters to rarible listing function.

I didn’t get what you mean by this. If you want to check if a user is already signed in before running the sell order function, then you can use Moralis.User.current() to check if the logged in user exists.