使用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
相关产品推荐
相关产品推荐

