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

Execute_Sale(remaining_accounts) issue on NFT that is minted through CM/Sugar #852

Closed
samia-invozone opened this issue Oct 26, 2022 · 5 comments
Labels

Comments

@samia-invozone
Copy link

Which package is this bug report for?

auction-house

Which Type of Package is this bug report for?

Rust Contract

Issue description

Hi, I'm trying to run execute instruction using Auctioneer with NFT that has been minted through candy machine or sugar etc;

But actually, it looks like the auction house smart contract seems not to be compatible with these types of collections because creator on index 0 is candy machine address and when I try to pass these addresses into remaining accounts it returns an error of "An account required by the instruction is missing”. Here is the NFT for which i'm trying to run execute rpc call with remaining accounts. https://solscan.io/token/78sJUf27U45coCt1HzPMAdQKRLWWee46CfRTaRRZgASk?cluster=devnet#metadata

Following are the successful transactions for listing & bidding:

https://solscan.io/tx/5xkp1DFpKqLq2fkLM9MYFCLQdqDf9TMEhrXkuyGkzH84Fyjf92XMztfyi9VDpxJEj4ZDxPvgMPqKSCiuJhvtjvYj?cluster=devnet

https://solscan.io/tx/2niP4SNtB5xWSkaMoBaqi7e2y1i8P2kkq1DaBHh6gpMBdwk84FkAuSWRVD8h3Vgfez8Chtz9P87fVnomnYUQo8Um?cluster=devnet

Using following code for sending remaining accounts:

.remainingAccounts([ { pubkey: new PublicKey("5k2EPeEp4ZZaRKdW7uDvTxwoRgYkatk15LEhRPYXhaxD"), isWritable: false, isSigner: false, }, { pubkey: new PublicKey("4douvideaZJtZLztHJK8H5FDrr1AkVYZUWGDgyYxCwL8"), isWritable: true, isSigner: false, }, ])

Relevant log output

logs
: 
Array(5)
0
: 
"Program neer8g6yJq2mQM6KbnViEDAD4gr3gRZyMMf4F2p3MEh invoke [1]"
1
: 
"Program log: Instruction: ExecuteSale"
2
: 
"Instruction references an unknown account 5k2EPeEp4ZZaRKdW7uDvTxwoRgYkatk15LEhRPYXhaxD"
3
: 
"Program neer8g6yJq2mQM6KbnViEDAD4gr3gRZyMMf4F2p3MEh consumed 70441 of 200000 compute units"
4
: 
"Program neer8g6yJq2mQM6KbnViEDAD4gr3gRZyMMf4F2p3MEh failed: An account required by the instruction is missing"
length
: 
5
[[Prototype]]
: 
Array(0)
programErrorStack
: 
wt {stack: Array(1)}
message
: 
"failed to send transaction: Transaction simulation failed: Error processing Instruction 0: An account required by the instruction is missing"

Priority this issue should have

High (immediate attention needed)

@samuelvanderwaal
Copy link
Contributor

Is this on mainnet or devnet? The account 5k2EPeEp4ZZaRKdW7uDvTxwoRgYkatk15LEhRPYXhaxD account does not exist on mainnet.

@samia-invozone
Copy link
Author

@samuelvanderwaal This is on devnet

@samuelvanderwaal
Copy link
Contributor

@samuelvanderwaal This is on devnet

The creator account doesn't seem to exist on devnet either though? https://solscan.io/account/5k2EPeEp4ZZaRKdW7uDvTxwoRgYkatk15LEhRPYXhaxD?cluster=devnet That would be why you're getting "Instruction references an unknown account".

@KartikSoneji
Copy link
Contributor

KartikSoneji commented Feb 28, 2023

I can replicate the issue on mainnet.
The issue seems to be with sales where the nft creators are only present in remaining_accounts.

Here's a simulation for ExecuteSale for a creator that's not the same as one of the named accounts:
explorer link

Here's the link to the nft: https://explorer.solana.com/address/788MrdsXbgqC2yGijKXaVuddxaQY3tRvqeNcn1WaSzrT

@KartikSoneji
Copy link
Contributor

image

The NFT creator is added to the end of the accounts array (Account #26 here).

Changing that to one of the named accounts allows the transaction to proceed to the CPI, when then throws a mismatched public key exception.
explorer link
image

But the issue is the remaining_accounts for ExecuteSale don't seem to be passed on to AuctioneerExecuteSale.

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

No branches or pull requests

3 participants