Closed neverything closed 2 years ago
What $seeds and $programId are you using?
Seeds were:
metadata
metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s
ApqMgGY9sbseui4QKoerDui61PbUADD1CfZZGWC6eWF5
To reproduce:
$METADATA_PUBKEY = new \Tighten\SolanaPhpSdk\PublicKey(Tighten\SolanaPhpSdk\Programs\MetaplexProgram::METAPLEX_PROGRAM_ID);
$transaction = \Tighten\SolanaPhpSdk\PublicKey::findProgramAddress(
[
'metadata',
$METADATA_PUBKEY,
(new \Tighten\SolanaPhpSdk\PublicKey('ApqMgGY9sbseui4QKoerDui61PbUADD1CfZZGWC6eWF5')),
],
$METADATA_PUBKEY,
);
dd($transaction[0]->toBase58());
@exzachlyvv D you need me to jump in here to try to be helpful? Even as ignorant as I am? 😆 or can you handle this some time?
No rush at all my workaround is working for now 😎.
Btw are you guys at Solana Breakpoint in Lisbon this week? Would love to say thanks for the work you have been putting into this.
Hey guys! I've gotten pulled away from Solana development for now so not sure I'll have too much time helping out with this project in the short term. Happy to step in if you get in a pinch 😄
I won't be at Solana Breakpoint 😢 but have fun 🕺
Hey @exzachlyvv ohh sad to hear and thanks for offering your help, I guess I'll need it eventually 😅. @mattstauffer should I try and prepare a seperate version for borsh-php based on the amazing work @exzachlyvv did so far? Still learning how to properly use it, but might have some time this weekend after breakpoint.
Btw. amazing event and good vibes only.
@neverything Sorry I missed this question! I'd love that, if you're up for it!
hi @neverything can i ask question? where did you add your workaround? can you please share, i believe i need your workaround too, i hope you can share
hi @mattstauffer does the Metadata::fromBuffer
return creator? im getting array but no value, is that correct? just confirming
@danieljao sorry just saw your question. The workaround is in my job class to get the NFT metadata.
@danieljao sorry just saw your question. The workaround is in my job class to get the NFT metadata.
Hi @neverything just wondering if the Job class you have is in the repo? just wondering if i can check it out, thank you
This morning I ran into an issue with
PublicKey::findProgramAddress()
. When I try to get the proper address for https://solscan.io/token/ApqMgGY9sbseui4QKoerDui61PbUADD1CfZZGWC6eWF59ajTce3dAtFaG6jJrNPq9vBVW4mwWDgmPqbZybvZYrzj
, nonce255
5zhP1LiHVw6rgZRRWqzV6Vh97RBJM7kZ9i3HjtynKu6S
, nonce254
In order to quickly fix it in my job, I did the following:
So basically as long as the
getAccountInfo
call returns an array that is missing the Borsh data$this->canGetProgramAddress
is calling a custom version offindProgramAddress
that accepts the nonce as a third parameter.Not very elegant and I have to rate limit the calls to the enpoints 😅, but it does the trick for me.