Reputation: 1074
I have a question about canceling auctions in the Metaplex’s Auction House.
I’m currently creating an Auction with the 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);
Is there any way to cancel a listed auction of this type?
I know that other types of listings such as AuctionHouse.createSellInstruction
(https://github.com/metaplex-foundation/metaplex-program-library/blob/master/auction-house/js/src/generated/instructions/sell.ts) do have a Cancel Instruction, and I’ve used them before.
But how can I cancel the English Auction type? Is it even possible? Like, what if I accidently made an Auction last for years, or put a wrong Listing Configuration value?
All Cancel instructions take as an argument the buyerPrice
. But in this case there is no buyerPrice
, it rather uses reservePrice
.
I've tried to pass the buyerPrice
as 18446744073709551615
to try to execute the Auctioneer.createCancelInstruction
, which is the same buyerPrice
value I used to create the TradeState
for listing it. But I get the following error:
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"
Also...
ListingReceipt
for this type of
listing? I want to keep track of creation date, canceled date, etc.Address { address: GkX7ZE4sz6mtvueoWT6KGpjZLUd3wkohy3ha3VZNh2Fz, base: None } already in use
So I believe cancelation is needed. Cause now it’s on a weird unknown status where Auction has ended due to time constraints and Token cannot be listed again.Upvotes: 0
Views: 421
Reputation: 145
You can cancel your listing Using THIS.
You can you normal listing receipts of AH for this as well.
The previous account should be closed in order to create a new listing. In order to close that account you need to cancel listing or the Nft should be sold.
Upvotes: 0