[Solana] Need help for getting account information to interact with MagicEden V2 contract
Budget: €40 – €70 EUR
I am looking for 2 things :
1 : the code to get the buyer escrow account and it's bump for a wallet.
actually an API return this information (without the bump) but I want to avoid to call an API
example :
https://api-mainnet.magiceden.io/v2/wallets/YOUR_WALLET_ENTER_HERE/escrow_balance?auctionHouseAddress=E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe
This will return a JSON with the buyer escrow account.
2: In a transaction to buy an NFT there is a instruction which create an account.
ex from a random TX : https://solscan.io/tx/2kxjDTr1XAstmiMMtiupvQFiof1HaJbM6VfbxEpD6BBkRdJxSQi5QQY6q9ppaWaZ3pmuQBVTA8ZBooPsTgVQzWFt
in the 2nd instruction, 8th Keys (see the screenshots)
I want to know how to generate this PublicKey. hint : MagicEden offer an API to generate the buy instruction (you need an authentication token to use it). If you call this api many times, it will always try to create the same account.
To resume, I am expecting 2 codes:
One to get the buyer escrow account and it's bump
One to get the account to create in the selling instruction of an NFT.
for the test :
buyerwallet : 2MRNvzorfeAMU7vaTwfdoAodN1QZ7hcsyi82uMui5tkV
sellerwallet : 2hNGKqbHB7CLg1cyfH29ZPPmEz1yGvMux8c6xEyzKsir
ME's actionhouseaddress : E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe
tokenMint : GnJSZoyRzec5kPe2dQhWQnkddtVkBLZ2zS4ptfjtfm7x
tokenATA: HE5R3imTWecfLFFggzUJbzZNxK6hPz6Aum4R9KWCgCWt
price 0.1 SOL
I expect as value :
buyerescrow = "97P1RNeFQTDLp4ktkHx2SgKzeG6LfjxofbN2y2iBbcAA"
newTokenTocreate = 7j7VJ9uZ2bWqjz45j8G7UGYpJxjkypxWU78v22SXhzfN
1 : the code to get the buyer escrow account and it's bump for a wallet.
actually an API return this information (without the bump) but I want to avoid to call an API
example :
https://api-mainnet.magiceden.io/v2/wallets/YOUR_WALLET_ENTER_HERE/escrow_balance?auctionHouseAddress=E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe
This will return a JSON with the buyer escrow account.
2: In a transaction to buy an NFT there is a instruction which create an account.
ex from a random TX : https://solscan.io/tx/2kxjDTr1XAstmiMMtiupvQFiof1HaJbM6VfbxEpD6BBkRdJxSQi5QQY6q9ppaWaZ3pmuQBVTA8ZBooPsTgVQzWFt
in the 2nd instruction, 8th Keys (see the screenshots)
I want to know how to generate this PublicKey. hint : MagicEden offer an API to generate the buy instruction (you need an authentication token to use it). If you call this api many times, it will always try to create the same account.
To resume, I am expecting 2 codes:
One to get the buyer escrow account and it's bump
One to get the account to create in the selling instruction of an NFT.
for the test :
buyerwallet : 2MRNvzorfeAMU7vaTwfdoAodN1QZ7hcsyi82uMui5tkV
sellerwallet : 2hNGKqbHB7CLg1cyfH29ZPPmEz1yGvMux8c6xEyzKsir
ME's actionhouseaddress : E8cU1WiRWjanGxmn96ewBgk9vPTcL6AEZ1t6F6fkgUWe
tokenMint : GnJSZoyRzec5kPe2dQhWQnkddtVkBLZ2zS4ptfjtfm7x
tokenATA: HE5R3imTWecfLFFggzUJbzZNxK6hPz6Aum4R9KWCgCWt
price 0.1 SOL
I expect as value :
buyerescrow = "97P1RNeFQTDLp4ktkHx2SgKzeG6LfjxofbN2y2iBbcAA"
newTokenTocreate = 7j7VJ9uZ2bWqjz45j8G7UGYpJxjkypxWU78v22SXhzfN