Skip to content

Error when Listing an ERC-721 and fulfilling it #564

Answered by JasperAlexander
Harvey44 asked this question in Q&A
Discussion options

You must be logged in to vote

Try this code.

const sell = async() => {
    if(typeof seaport !== 'undefined') {
      const { executeAllActions } = await seaport.createOrder({
        offer: [
          {
            itemType: ItemType.ERC721,
            token: testERC721Address, // The ERC721 token address
            identifier: "1"
          }
        ],
        consideration: [
          {
            amount: parseEther("10").toString(),
            token: testERC20Address, // The ERC20 token address
            recipient: offerer // Account address of offerer
          }
        ]
      })

      const executedOrder = await executeAllActions()
      setCurrentOrder(executedOrder)  // Save to state
    }
  }

  c…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Harvey44
Comment options

@JasperAlexander
Comment options

@Harvey44
Comment options

@JasperAlexander
Comment options

Answer selected by Slokh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants