You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Metaplex JS SDK在Auction House上架代币时遇交易付费方必填错误

问题:使用Metaplex JS SDK上架代币失败及拍卖屋权限修改问题

1. 创建拍卖屋代码

const { auctionHouse } = await metaplex
        .auctions()
        .createAuctionHouse({
          auctioneerAuthority: systemKeypair.publicKey,
          authority: systemKeypair,
          feeWithdrawalDestination: systemKeypair.publicKey,
          payer: systemKeypair,
          sellerFeeBasisPoints: 300,
          treasuryWithdrawalDestinationOwner: systemKeypair.publicKey,
          requiresSignOff: true,
          canChangeSalePrice: true,
          treasuryMint: WRAPPED_SOL_MINT,
          auctioneerScopes: [
            AuthorityScope.Buy,
            AuthorityScope.Cancel,
            AuthorityScope.Deposit,
            AuthorityScope.ExecuteSale,
            AuthorityScope.PublicBuy,
            AuthorityScope.Sell,
            AuthorityScope.Withdraw,
          ],
        })
        .run()

2. 查询到的拍卖屋信息

通过metaplex.auctions().findAuctionHouseByCreatorAndMint查询得到以下信息:

{
  "address": "DSPhjY5tzm9xpeLHkAVZc1JxR2sn23ny5CvwhYXtGZ7d",
  "creatorAddress": "8YaerWbLjVptW8GmvHC8QVVTfKRBqd9r5XN1Thvam63o",
  "authorityAddress": "8YaerWbLjVptW8GmvHC8QVVTfKRBqd9r5XN1Thvam63o",
  "treasuryMint": {
    "model": "mint",
    "address": "So11111111111111111111111111111111111111112",
    "mintAuthorityAddress": null,
    "freezeAuthorityAddress": null,
    "decimals": 9,
    "supply": {
      "basisPoints": "00",
      "currency": {
        "symbol": "SOL",
        "decimals": 9,
        "namespace": "spl-token"
      }
    },
    "isWrappedSol": true,
    "currency": {
      "symbol": "SOL",
      "decimals": 9,
      "namespace": "spl-token"
    }
  },
  "feeAccountAddress": "4CpCLtfEyRpHR5kJxfqCEmYx3P7HmqLmpFWwEQntSyc7",
  "treasuryAccountAddress": "GWJBrb67aEt4hrHY6CEM16kpAXboJp5pV3iCDicoJXkS",
  "feeWithdrawalDestinationAddress": "8YaerWbLjVptW8GmvHC8QVVTfKRBqd9r5XN1Thvam63o",
  "treasuryWithdrawalDestinationAddress": "8YaerWbLjVptW8GmvHC8QVVTfKRBqd9r5XN1Thvam63o",
  "sellerFeeBasisPoints": 300,
  "requiresSignOff": true,
  "canChangeSalePrice": true,
  "isNative": true,
  "hasAuctioneer": true,
  "auctioneer": {
    "address": "8nMN6zC957r6rrh4w8EjDHFXwW7KbeKrXUdUva224MpV",
    "authority": "8YaerWbLjVptW8GmvHC8QVVTfKRBqd9r5XN1Thvam63o",
    "scopes": []
  }
}

3. 上架代币代码

const response = await metaplex
    .auctions()
    .for(
      auctionHouse,
      systemKeypair
    )
    .list({
      authority: systemKeypair,
      bookkeeper: systemKeypair,
      mintAccount: new PublicKey(mintAddress),
      seller: userKeypair,
      price: sol(price),
    })
    .run()

遇到的问题

  • 调用list方法时始终抛出错误:Transaction fee payer required
  • 当前场景不需要auctioneerAuthority,但无法通过metaplex.auctions().updateAuctionHouse将其设为undefined移除

内容的提问来源于stack exchange,提问作者Lucas Silva

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 12:54:24