metaplex-program-library
metaplex-program-library copied to clipboard
[Bug]: Error 3007 - Cannot Cancel Time-based Auction started by Auctioneer
Which package is this bug report for?
auction-house
Which Type of Package is this bug report for?
JS SDK
Issue description
I'm trying to Cancel a an Auction that I have started for an NFT with an Auctioneer with a time-base auction, but I keep getting AccountOwnedByWrongProgram
as error. I've configured the auction to last 1 hour, and I've been using this following instruction:
const accounts = {
auctionHouseProgram,
listingConfig,
wallet,
tokenAccount,
metadata,
authority,
auctionHouse,
auctionHouseFeeAccount,
sellerTradeState,
freeSellerTradeState,
auctioneerAuthority,
ahAuctioneerPda,
programAsSigner
};
const args {
tradeStateBump,
freeTradeStateBump,
programAsSignerBump,
auctioneerAuthorityBump,
tokenSize,
startTime,
endTime,
reservePrice,
minBidIncrement,
timeExtPeriod,
timeExtDelta,
allowHighBidCancel,
}
Auctioneer.createSellInstruction(acounts, args);
I've created all the flow as follows:
- Create Auction-House
- Authorize and Delegate Auctioneer to Auction-House (I've based it using this repo: https://github.com/IshaMandaviya/Auctioneer/tree/cebee6d0e3230613bdd0e0a66703fb64a93b76de)
- List an NFT using the sell Instruction (I've based it using this repo file: https://github.com/IshaMandaviya/Auctioneer/blob/cebee6d0e3230613bdd0e0a66703fb64a93b76de/sell.js)
As you can see in step 3, the repo I found is using 18446744073709551615 as
buyerPrice
to create theTradeState
for the listing. I believe they set the max price 2^64 - 1, cause in auctions there’s no fixed price. It rather uses a reserve price. - Try to cancel Listing of NFT using this repo file: https://github.com/metaplex-foundation/metaplex-program-library/blob/3a9c68ab8c48318f96379a136feaa9b66c322752/auctioneer/js/src/generated/instructions/cancel.ts)
When I try to Cancel the Auction, the Transaction throws me AccountOwnedByWrongProgram
error. I'm using 18446744073709551615 as buyerPrice
in all the places it's asking for the argument, except for the FreeTradeState
obviously.
I've been trying for a couple days different configurations/arguments for Canceling the Auction, but I cannot mange to get rid of this error. So it gets me thinking if this is some kind of bug on the SDK side.
I'm using the latest libraries of the repos.
Relevant log output
2: "Program log: AnchorError caused by account: token_account. Error Code: AccountOwnedByWrongProgram. Error Number: 3007. Error Message: The given account is owned by a different program than expected."
3: "Program log: Left:"
4: "Program log: 11111111111111111111111111111111"
5: "Program log: Right:"
6: "Program log: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
Priority this issue should have
Medium (should be fixed soon)