Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error 3007 - Cannot Cancel Time-based Auction started by Auctioneer #634

Open
c4b4d4 opened this issue Jul 31, 2022 · 1 comment
Open

Comments

@c4b4d4
Copy link

c4b4d4 commented Jul 31, 2022

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:

  1. Create Auction-House
  2. Authorize and Delegate Auctioneer to Auction-House (I've based it using this repo: https://github.com/IshaMandaviya/Auctioneer/tree/cebee6d0e3230613bdd0e0a66703fb64a93b76de)
  3. 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 the TradeState 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.
  4. 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)

@c4b4d4 c4b4d4 added the bug label Jul 31, 2022
@c4b4d4 c4b4d4 changed the title [Bug]: Cannot Cancel Time-based Auction started by Auctioneer [Bug]: Error 3007 - Cannot Cancel Time-based Auction started by Auctioneer Aug 1, 2022
@sriharsh1104
Copy link

any solution regarding this? getting same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants