简体   繁体   English

如何使用 Metaplex Solana 获得所有已确认的已售交易?

[英]How to get all confirmed sold transactions by using Metaplex Solana?

I'm wondering if anyone here knows to use Metaplex to get all confirmed sold transactions by using mint address?我想知道这里是否有人知道使用 Metaplex 通过使用铸币厂地址来获取所有已确认的已售交易? SolScan.io has a sample endpoint SolScan.io 有一个示例端点

https://api.solscan.io/nft/trade?mint=Cipp5qJe9XGcZ4bMcSYC5RdoewmEjpkLo12RytkyDsQC&offset=0&limit=20 . https://api.solscan.io/nft/trade?mint=Cipp5qJe9XGcZ4bMcSYC5RdoewmEjpkLo12RytkyDsQC&offset=0&limit=20 Can we do something like this using Metaplex Solana?我们可以使用 Metaplex Solana 做这样的事情吗?

I understood that you want to find all sale transactions for a given mint from chain.我了解到您想从链中查找给定铸币厂的所有销售交易。 My answer will be using node package @solana/web3.js我的答案将是使用节点包@solana/web3.js

To achieve this you have to要实现这一点,您必须

  1. get all transaction signatures of the mint with getConfirmedSignaturesForAddress2使用getConfirmedSignaturesForAddress2获取铸币厂的所有交易签名
  2. get the parsed transaction content with getParsedTransactions .使用getParsedTransactions获取解析后的交易内容。
  3. Check the programs that are involved in the tx.检查 tx 中涉及的程序。 eg MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8 is Magic eden V1.例如 MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8 是魔法伊甸园 V1。
  4. Verify if it was a sale.验证它是否是销售。 How this can be done depends on the marketplace program.如何做到这一点取决于市场计划。 One idea could be to check if there was sol transferred to the creators.一个想法可能是检查是否有溶胶转移给创作者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM