-
Notifications
You must be signed in to change notification settings - Fork 77
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
Error in actions.placeBid #155
Comments
since this metaplex-foundation/metaplex-program-library#101 const bidderPotToken = await AuctionProgram.findProgramAddress([
Buffer.from(AuctionProgram.PREFIX),
new PublicKey(bidderPotKey).toBuffer(),
Buffer.from("bidder_pot_token"),
]); |
Need to port this fix over metaplex-foundation/metaplex#1557 |
because simulation fails. you can use connection.sendRawTransaction(tx.serialize(), {
skipPreflight: true,
}); |
But after executing, it is still an error transaction so it's not better than. Do you think error from logic code somewhere like smart contract? Because if I use old code in JDK, error is "Bidder Pot Token must be a new account". Then I use your code, it pass but new error is "instruction requires an initialized account". Is there a conflict here? Thank for your help |
The issue is that the revoke instruction is sent after the accountclose instruction, which leads to an uninitializedaccount error. |
@basvanberckel @dtome123 I am facing this same issue, any idea on how to fix this ? |
I believe this is already enough to fix this error: metaplex-foundation/js#172 |
Yes this seems correct. I hope it gets accepted soon enough |
@basvanberckel Is there any way I can use your forked repo to test this solution, and continue on my work until your PR is committed? I have run |
What does your import/require statement look like in your app code? You shouldn't need to import from /lib, just from '@metaplex/js' |
|
On this import, I'm getting error: |
Yeah, my bad, you can't directly install from this repo as the artifacts aren't included. cd your/project/dir
git clone https://github.com/beemup/metaplex-js-sdk -b placebid-transfer-bug
cd metaplex-js-sdk
npm install
npm run build
cd ..
npm install ./metaplex-js-sdk |
@basvanberckel I'm still getting the same error btw :( Have you tested out this solution on your end? |
Just to clarify, imports are working fine, but I'm getting the initial error of "Bidder pot token must be a new account" on actions.placeBid |
I have my own implementation of placebid that fixes both these errors, the fix linked in this thread above together with my pull request should resolve both. I am not able to write a full test for this right now, there should be a unit test if this needs to be verified in the future. |
Are you talking about this fix?
|
The bidder token address should be generated like in metaplex-foundation/metaplex#1557 That will resolve the initial error of this issue. The transaction order should be changed like in my PR, that will resolve the UninitializedAccount error. It is also an option to remove the revoke instruction entirely, like in metaplex-foundation/metaplex#1557 |
I've updated the pr to fix both errors. @AmmarKhalid123 Would you be able to verify this works in your setup? |
I will check right away and let you know |
Works like a charm. |
@basvanberckel forgot, there was an import of AuctionProgram I remember missing, placeBid.ts file. I got it when tried to build the project, otherwise works great. |
Ah yes, thanks. Fixed that now |
Can also confirm that @basvanberckel fix works. |
@AmmarKhalid123 @basvanberckel @tengu-br i am also facing the same problem of bidder pot, i made the changes you have added in the pr but the issue of bidder pot token must be new is still there am i missing something |
There a bug when I call actions.placeBid function, it is "Bidder Pot Token Must be a new account". Then I read source code and everything is normal. Why did that happen?


(error)
(code)
The text was updated successfully, but these errors were encountered: