【问题标题】:How to get historical data on transactions performed by smart contracts on Solana?如何获取 Solana 上智能合约执行交易的历史数据?
【发布时间】:2021-12-26 12:33:36
【问题描述】:

我应该如何从 Solana 智能合约中获取新的和历史数据?例如,我想获取有关 Raydium 最近交换的数据。

当我在以太坊上开发时,我曾经解析存储在区块链上的历史事件。 Solana上有类似的方法吗?

我更喜欢使用 Python,但其他语言也可以。

非常感谢您的帮助。

【问题讨论】:

    标签: blockchain smartcontracts solana defi


    【解决方案1】:

    您可以使用getSignaturesForAddress 获取特定程序的所有签名,例如 Raydium 程序。

    然后您可以使用getTransaction 获取每笔交易的详细信息。或者,您可以使用自己的 rpc 并使用内部 bigtable。

    https://docs.solana.com/developing/clients/jsonrpc-api#getsignaturesforaddress https://docs.solana.com/developing/clients/jsonrpc-api#gettransaction

    【讨论】:

      猜你喜欢
      • 2021-12-28
      • 2021-10-29
      • 2022-07-22
      • 1970-01-01
      • 2017-09-23
      • 2022-08-17
      • 2022-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多